TensorFlow function: tf.stop_gradient

Stop gradient calculation.

In the drawing, when executed, the operation is output as its input tensor.

When calculating a gradient of a build operation, this operation will prevent its shared input into account consideration. Typically, a gradient generator operation to the graph, which helps locate recursive calculation calculates input designated "loss" of the derivative. If this is inserted in the drawing, it is input from the shielded gradient builder. They are not considered when calculating the gradient.

Guess you like

Origin www.cnblogs.com/elitphil/p/11897717.html