问题描述
还原模型时, get_collection
, get_tensor_by_name
和 get_operation_by_name ?谢谢!
When restoring the model, what's the difference between get_collection
, get_tensor_by_name
and get_operation_by_name
? Thanks!
推荐答案
您可以 add_collection(name,operation / tensor)
到图形,然后 get_collection(name)
返回具有给定 name $的集合中值的列表 c $ c>。
You could add_collection(name, operation/tensor)
to the graph, and get_collection(name)
returns a list of values in the collection with the given name
.
get_tensor_by_name(name)
返回具有给定张量 >名称。
get_tensor_by_name(name)
returns a tensor with the given name
.
get_operation_by_name(name)
返回操作指定给定的名称
。
get_operation_by_name(name)
returns a operation with the given name
.
这篇关于Tensorflow:get_collection,get_tensor_by_name和get_operation_by_name的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!