wrappers_test.py quick fix for flaky TimeDistributed test (#7062)
full issue: https://github.com/fchollet/keras/pull/7033
Esse commit está contido em:
@@ -93,11 +93,12 @@ def test_TimeDistributed():
|
||||
reason='cntk does not support dropout yet')
|
||||
def test_TimeDistributed_learning_phase():
|
||||
# test layers that need learning_phase to be set
|
||||
np.random.seed(1234)
|
||||
x = Input(shape=(3, 2))
|
||||
y = wrappers.TimeDistributed(core.Dropout(.999))(x, training=True)
|
||||
model = Model(x, y)
|
||||
y = model.predict(np.random.random((10, 3, 2)))
|
||||
assert_allclose(0., y, atol=1e-2)
|
||||
assert_allclose(np.mean(y), 0., atol=1e-1, rtol=1e-1)
|
||||
|
||||
|
||||
@keras_test
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário