在训练过程中,权值通常不保存在 file format 中, 我觉着对这句话更精确的解释是:在训练过程中保存模型的时候,是将 权值保存在 ckpt文件中的,回想一下 Saver, 在训练过程中,权值还是保存在内存中的...加载GraphDef,将所有的变量从最近的 检查点文件中取出,然后将GraphDef中的Variable op 替换成 Const op, 这些Const op中保存着 检查点中保存的变量的值。...当在不同的框架之间进行转换时,卷积权重的顺序是很难处理的。...保存为pb
import tensorflow as tf
t = tf.constant([[[1,2,3],[4,5,6]],[[1,2,3],[4,5,6]]])
paddings = tf.constant...tf.train.write_graph(graph_or_graph_def, logdir, name, as_text=True)
# logdir: 导出的文件目录
# name: 导出时的文件名