The get_tensor_by_name
to understanding the get_tensor_by_name
function is to understand that the TensorFlow
model TensorFlow
first shown as a graph during the build phase. In this question, example
is the name of the node operation in this graph. When this operation is performed during the execution phase, the output is done using this example
node. This result is indexed by a number indicating its production order. In this case, it is 1
.
The graph and its outputs described above were saved during an earlier launch. Later, in another project execution, this runtime was restored, possibly using tf.train.import_meta_graph
and graph
becomes a link to it. The get_tensor_by_name
function simply restores the link to the saved second output of the example
node from the restored run-time metadata. Now you can use this restored tensor in your own task during another session.
Taimi source share