|
@@ -27,7 +27,6 @@ else:
|
|
|
keras_model_path = os.path.abspath(os.path.dirname(__file__)) + "/best.hdf5"
|
|
|
# keras模型加载预测都使用同一个session、同一个graph,即可多进程推理
|
|
|
session_conf = tf.ConfigProto(
|
|
|
- device_count={"CPU": 5},
|
|
|
intra_op_parallelism_threads=5,
|
|
|
inter_op_parallelism_threads=5)
|
|
|
sess = tf.Session(graph=tf.Graph(), config=session_conf)
|