Skip to content

Commit

Permalink
Speed up Theano tests (keras-team#7011)
Browse files Browse the repository at this point in the history
  • Loading branch information
taehoonlee authored and fchollet committed Jun 17, 2017
1 parent 4135aee commit 7766ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ matrix:
- python: 3.5
env: KERAS_BACKEND=tensorflow
- python: 2.7
env: KERAS_BACKEND=theano
env: KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile
- python: 3.5
env: KERAS_BACKEND=theano
env: KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile
- python: 2.7
env: KERAS_BACKEND=cntk
- python: 3.5
Expand Down
8 changes: 1 addition & 7 deletions tests/keras/backend/backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def test_logsumexp(self, x_np, axis, keepdims, K):
np.log(np.sum(np.exp(x_np), axis=axis, keepdims=keepdims)),
rtol=1e-5)

@pytest.mark.parametrize('K', [KTH, KTF], ids=["KTH", "KTF"])
@pytest.mark.parametrize('K', [KTF], ids=["KTF"])
def test_logsumexp_optim(self, K):
'''
Check if optimization works.
Expand Down Expand Up @@ -1387,12 +1387,6 @@ def test_batchnorm(self):
ztf = KTF.eval(ztf)
assert zth.shape == ztf.shape

# TODO remove this if statement when Theano without
# T.nnet.bn.batch_normalization_train is deprecated
zth2, _, _ = KTH._old_normalize_batch_in_training(xth, None, None,
reduction_axes=[0, 1, 2, 3])
assert zth.shape == tuple(KTH.eval(zth2.shape))

def test_ctc(self):
# simplified version of TensorFlow's test

Expand Down

0 comments on commit 7766ab3

Please sign in to comment.