Skip to content

Instantly share code, notes, and snippets.

@ihoromi4
Last active November 28, 2018 12:51
Show Gist options
  • Save ihoromi4/a9f52b5bebe4de763b04bf748689f2f8 to your computer and use it in GitHub Desktop.
Save ihoromi4/a9f52b5bebe4de763b04bf748689f2f8 to your computer and use it in GitHub Desktop.
import tensorflow as tf
from keras.backend.tensorflow_backend
config = tf.ConfigProto(device_count={'CPU': 1})
session = tf.Session(config=config)
tensorflow_backend.set_session(session)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment