更新时间:2023-11-17 23:30:40
tf.custom_gradient 是在此处使用的***工具.它使您可以在调用站点上定义渐变函数,具有比覆盖图更好的界面,并且可以很好地执行.
tf.custom_gradient is the best tool to use here. It lets you define the gradient function at the call site, has a nicer interface than the override map, and works well with eager execution.