I run lower and lower on the CPU. I run the sample process / examples / label_image takes 7 ~ 8 seconds. As I know, python takes about 0.5 seconds to process the same sample, and this is because "the Session TensorFlow object is multi-threaded, so multiple threads can easily use the same session and run ops in parallel." BUT, how can I set multithreading in a session with C ++.
What am I trying ... I hardcode the string 81 to "tensorflow / tensorflow / core / common_runtime / direct_session.cc": "const int32 num_threads = 16;" However, this does not work.
How to configure any configure or what should I do?
source share