Created
March 13, 2017 16:03
-
-
Save oak-tree/7f1d57a52b1e439a79f73c072adcf2f6 to your computer and use it in GitHub Desktop.
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
from keras import backend as K | |
if K.backend() == "tensorflow": | |
print("Using tensorflow - try to use jit") | |
import keras.backend.tensorflow_backend as bck | |
config = bck.tf.ConfigProto() | |
config.graph_options.optimizer_options.global_jit_level = bck.tf.OptimizerOptions.ON_1 | |
bck.set_session(bck.tf.Session(config=config)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment