Change "Do whatever you need" to "Process"
This commit is contained in:
parent
31eb0e012e
commit
1485fc5838
@ -139,7 +139,7 @@ class OptimizerV2(trackable.Trackable):
|
|||||||
vars = <list_of_variables>
|
vars = <list_of_variables>
|
||||||
grads = tape.gradient(loss, vars)
|
grads = tape.gradient(loss, vars)
|
||||||
|
|
||||||
# Do whatever you need to the gradients, for example cap them, etc.
|
# Process the gradients, for example cap them, etc.
|
||||||
# capped_grads = [MyCapper(g) for g in grads]
|
# capped_grads = [MyCapper(g) for g in grads]
|
||||||
processed_grads = [process_gradient(g) for g in grads]
|
processed_grads = [process_gradient(g) for g in grads]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user