insct
insct copied to clipboard
Allow user to set cpu cores used
https://github.com/lkmklsmn/insct/blob/master/tnn/tnn.py#L39
As far as I can see TNN
uses all available cores.
Don't want the HPC people angry.
As a quick solution (which I havent tested myself). You could try running
import tensorflow as tf
import keras
config = tf.ConfigProto(device_count={"CPU": 3})
keras.backend.tensorflow_backend.set_session(tf.Session(config=config))
before you train the model.