尝试使用经过训练的模型进行预测,似乎初始化会话需要一段时间。有没有从命令行获得模型预测的快速方法?
import tensorflow as tf
import time
graph = tf.Graph()
with graph.as_default():
t0 = time.time()
sess = tf.Session()
t1 = time.time()
print('time: %s ' % (t1-t0))
>>> time: 11.136097192764282