How can I set the name of my loss operation in Tensorflow?
问题 In Tensorflow I can assign names to operations and tensors to retrieve them later. For example in one function I can do input_layer=tf.placeholder(tf.float32, shape= [None,300], name='input_layer') And then in another function later, I can do input_layer=get_tensor_by_name('input_layer:0') I came to believe that this is handy for making my tf code as modular as possible. I would like to be able to do the same with my loss but how can I assign a custom name to that operation? The problem is