1

I have quite strange case. On new Mac (mid 2017 2,3 GHz Intel Core i5) Keras don't use all 4 cores. I run the same code on my old machine and everything is fine - CPU usage shows 300-400%.

I've read this thread but nothing helps:

K.set_session(K.tf.Session(config=K.tf.ConfigProto(intra_op_parallelism_threads=128, inter_op_parallelism_threads=128)))

or config = tf.ConfigProto(device_count={"CPU": 4})

for example i use scikit-learn on new Mac and CPu usage is more than 200-300%

my guess is that problem has connection with python version i've used 3.5 and now use 3.6, but can't understand how to solve it

UPDATE

i re-install Keras and everything works fine

Community
  • 1
  • 1
Karmanoid
  • 31
  • 1
  • 7
  • As you already found the answer, please specify whether or not you are using any external Python libraries (i.e., Anaconda Python, etc.), or native Python. Also, since Keras builds on backends of another Frameworks (like TensorFlow or Theano), please specify which backend you are using. You can also answer your own question with this information and use this as an answer (see here: [answer]). – dennlinger Oct 01 '18 at 07:19
  • 1
    I'm using Anaconda Navigator 1.9.2 and Spyder 3.3.1. I re-installed Keras using: conda install -c conda-forge keras and now using Keras 2.2.2 with TensorFlow – Karmanoid Oct 01 '18 at 14:36
  • why did you set 128 threads? where are those coming from? – Michael Ramos Aug 30 '20 at 01:50

0 Answers0