Get the loss that a given optimizer is minimizing in Tensorflow
问题 I am working in a unit test system for my tensorflow workspace and I would like to know if there is any method or attribute, given a graph with an optimizer operation (after calling .minimize()), to obtain the final loss tensor that it is optimizing and the variables that it controls. For example if I call train_op = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy) I would like to retrieve cross_entropy only having access to train_op. I have access to the train_op object, I only want to