Last active
February 13, 2021 03:33
-
-
Save seahrh/4c068bb3d10b1ac0f2026ef2998cc65a to your computer and use it in GitHub Desktop.
Faster than Keras model.predict. If you are using tf.keras.Model and predicting via the functional call (as done in Jane Street: Neural Network Starter and other Notebooks), try using:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.call = tf.function(model.call, experimental_relax_shapes=True) | |
for (test_df, pred_df) in tqdm(env.iter_test()): | |
pred = model(data, training = False).numpy() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment