I have this in my graph:
output_layer = tf.contrib.layers.fully_connected(input, output_size, activation_fn=None)
I would like to refer to it within another function. Usually, we can name an operation or tensor and use get_tensor_by_name(name)
to refer to it later. The fully_connected()
function does not have name
as an argument.
Is there another way to refer to output_layer?
您可以通过访问.name
属性获取张量的完整“路径”:
print(output_layer.name)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.