使用多个CPU使用Keras模型进行预测

时间:2019-11-21 11:57:00

标签: python-3.x multithreading tensorflow keras multiprocessing

我正在尝试使用多个CPU的Keras模型(使用Tensorflow 2.0)进行预测。

我已经尝试过了:     tf.config.threading.set_intra_op_parallelism_threads(4)     tf.config.threading.set_inter_op_parallelism_threads(4)

虽然没有出错,但是我不确定这是否是正确的方法。

预测可以是多线程的吗?

非常感谢

0 个答案:

没有答案