进行迁移学习时,加载完别人的模型,想要进行一些微调,就需要想办法获取到该网络中某些张良的名称,尤其是输入和输出。
with tf.Session() as sess:
#此处加载模型
tensor_name_list = [tensor.name for tensor in tf.get_default_graph().as_graph_def().node]
for tensor_name in tensor_name_list:
print(tensor_name,'\n')
进行迁移学习时,加载完别人的模型,想要进行一些微调,就需要想办法获取到该网络中某些张良的名称,尤其是输入和输出。
with tf.Session() as sess:
#此处加载模型
tensor_name_list = [tensor.name for tensor in tf.get_default_graph().as_graph_def().node]
for tensor_name in tensor_name_list:
print(tensor_name,'\n')