Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cuDNN tests #8189

Merged
merged 1 commit into from
Oct 20, 2017
Merged

Fix cuDNN tests #8189

merged 1 commit into from
Oct 20, 2017

Conversation

taehoonlee
Copy link
Contributor

Move times = [] from the outer to the inner loop (because the speed-up is calculated for each inner loop)
Delete clear_session() which is redundant with keras_test (thus the outer loop should be transformed to pytest.mark.parametrize)
Reduce the example size under the 3x speed-up is satisfied (the sample size 10000 is too large)

@@ -122,46 +122,45 @@ def test_cudnn_rnn_canonical_to_params_gru():


@keras_test
@pytest.mark.parametrize("rnn_type", ['lstm', 'gru'], ids=['LSTM', 'GRU'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ' as string delimiter for consistency

input_size = 30
timesteps = 50
units = 128
num_samples = 640
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend a greater number of units, timesteps, and samples (like the original values). This test does not run on CI so it does not need to be fast. Think of it as a benchmark, not a unit test.

Move `times = []` from the outer to the inner loop
Delete `clear_session()` which is redundant with `keras_test`
Reduce the example size under the 3x speed-up is satisfied
@taehoonlee
Copy link
Contributor Author

Updated. Thank you for the comments @fchollet!

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@fchollet fchollet merged commit 7b35041 into keras-team:master Oct 20, 2017
@taehoonlee taehoonlee deleted the fix_cudnn_rnn_tests branch September 5, 2018 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants