Skip to content
Snippets Groups Projects
Commit 9b807793 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix

parent 4a6cdd89
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,8 @@ def set_keras_backend(backend=None, gpu_device_nums=None, num_threads=None):
"""
os.environ["KERAS_BACKEND"] = "tensorflow"
original_backend = backend
if not backend:
backend = "tensorflow-default"
......@@ -60,9 +62,10 @@ def set_keras_backend(backend=None, gpu_device_nums=None, num_threads=None):
session = tensorflow.Session(config=config)
K.set_session(session)
else:
warnings.warn(
"Only tensorflow backend can be customized. Ignoring customization."
"Backend: %s" % K.backend())
if original_backend or gpu_device_nums or num_threads:
warnings.warn(
"Only tensorflow backend can be customized. Ignoring "
" customization. Backend: %s" % K.backend())
def configure_logging(verbose=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment