I try to run sequential with Keras; I found that the thread running sequential model generated about 13 sub-threads. How to control the number of sub-threads?
part of my code:
model = Sequential()
model.add(...)
.....
model.compile(loss='binary_crossentropy', optimizer=params['optimizer'])
model.fit(.....)
Please help me with this problem. Thanks in advance!
More detail to be added, the backbench for my Keras is Tensor Flow.
This is what I use.
from keras import backend as K
import tensorflow as tf
config = tf.ConfigProto(intra_op_parallelism_threads=args.jobs, \
inter_op_parallelism_threads=args.jobs, \
allow_soft_placement=True, \
device_count = {'CPU': args.jobs})
session = tf.Session(config=config)
K.set_session(session)
Most helpful comment
This is what I use.