W3cubDocs

/TensorFlow 1.15

tf.keras.backend.stop_gradient

View source on GitHub

Returns variables but with zero gradient w.r.t. every other variable.

Arguments
variables Tensor or list of tensors to consider constant with respect to any other variable.
Returns
A single tensor or a list of tensors (depending on the passed argument) that has no gradient with respect to any other variable.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/stop_gradient