Skip to content

Commit

Permalink
Deflake TensorBoard callback tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jun 7, 2017
1 parent 75d9415 commit 43e418d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/keras/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ def make_model():
@pytest.mark.skipif((K.backend() != 'tensorflow'),
reason='Requires tensorflow backend')
def test_TensorBoard():
np.random.seed(1337)
np.random.seed(np.random.randint(1, 1e7))
filepath = './logs_' + str(np.random.randint(1, 1e4))

filepath = './logs'
(X_train, y_train), (X_test, y_test) = get_test_data(
num_train=train_samples,
num_test=test_samples,
Expand Down Expand Up @@ -387,9 +387,9 @@ def data_generator_graph(train):
@pytest.mark.skipif((K.backend() != 'tensorflow'),
reason='Requires tensorflow backend')
def test_TensorBoard_convnet():
np.random.seed(1337)
np.random.seed(np.random.randint(1, 1e7))
filepath = './logs_' + str(np.random.randint(1, 1e4))

filepath = './logs'
input_shape = (16, 16, 3)
(x_train, y_train), (x_test, y_test) = get_test_data(num_train=500,
num_test=200,
Expand Down Expand Up @@ -512,7 +512,9 @@ def f():
reason="Requires tensorflow backend")
def test_TensorBoard_with_ReduceLROnPlateau():
import shutil
filepath = './logs'
np.random.seed(np.random.randint(1, 1e7))
filepath = './logs_' + str(np.random.randint(1, 1e4))

(X_train, y_train), (X_test, y_test) = get_test_data(num_train=train_samples,
num_test=test_samples,
input_shape=(input_dim,),
Expand Down

0 comments on commit 43e418d

Please sign in to comment.