DeepLearning[GradientTape]
Reset
reset GradientTape and clear all data
Watch
ensure Tensor is watched by GradientTape
WatchedVariables
list Variables watched by GradientTape
Calling Sequence
Parameters
Description
Details
Compatibility
gt:-Reset()
gt:-Watch(t)
gt:-WatchedVariables()
gt
-
a GradientTape object
t
a Tensor or Variable
gt:-Reset(t) empties the list of watched Tensors and clears all accumulated data from the GradientTape gt.
gt:-Watch(t) adds the Tensor or Variable t to the list of quantities tracked by the GradientTape gt. Note that Variables created with trainable=true (the default) are watched automatically and do not need to be explicitly added with Watch.
gt:-WatchedVariables(t) command returns the list of all Variables being tracked by the GradientTape gt.
The implementations of Reset, Watch, and WatchedVariables use the similarly named methods from tf.GradientTape in the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.GradientTape for more information.
The DeepLearning[GradientTape][Reset], DeepLearning[GradientTape][Watch] and DeepLearning[GradientTape][WatchedVariables] commands were introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
DeepLearning Overview
GradientTape
Download Help Document