Is there any API to clip the gradients of a network? Or, I need to develop myself?
Best, Afshin
I found one:
Tensorat::clamp(const Tensor &self, c10::optional<Scalar> min = c10::nullopt, c10::optional<Scalar> max = c10::nullopt)
, though I also implemented myself.