2a4f6b942db5da321c627ebc1f0ca448bf491556,tests/keras/layers/test_core.py,,test_activity_regularization,#,116

Before Change


def test_activity_regularization():
    layer_test(core.ActivityRegularization,
               kwargs={"l1": 0.01, "l2": 0.01},
               input_shape=(3, 2, 3))


def test_maxout_dense():

After Change


    layer = core.ActivityRegularization(l1=0.01, l2=0.01)

    // test in functional API
    x = Input(shape=(3,))
    z = core.Dense(2)(x)
    y = layer(z)
    model = Model(input=x, output=y)
    model.compile("rmsprop", "mse", mode="FAST_COMPILE")

    model.predict(np.random.random((2, 3)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: 2a4f6b942db5da321c627ebc1f0ca448bf491556
Time: 2016-04-01
Author: francois.chollet@gmail.com
File Name: tests/keras/layers/test_core.py
Class Name:
Method Name: test_activity_regularization


Project Name: keras-team/keras
Commit Name: b5a02391e003c33c8f8258a7e3d0736503c3c048
Time: 2017-03-15
Author: farizrahman4u@gmail.com
File Name: examples/babi_memnn.py
Class Name:
Method Name:


Project Name: keras-team/autokeras
Commit Name: 2e3ecf5ad4817912b14f8e17625aaa24185081c6
Time: 2020-05-20
Author: jin@tamu.edu
File Name: tests/autokeras/hypermodels/wrapper_test.py
Class Name:
Method Name: test_timeseries_block