# Set the correct data type and shape; shape can be (None, 224, 224, 3) also
new_placeholder = tf.placeholder(tf.float32, shape=(1, 224, 224, 3), name='inputs_new_name')
# here you need to state the name of the placeholder you used in your original input placeholder
saver = tf.import_graph_def(path/to/.meta, input_map={"original_inputs_placeholder_name:0": new_placeholder})
saver.restore(/path/to/your_checkpoint)
1 回答
如果您有已保存检查点的* .meta文件,则可以将输入重置为图形 .