Clipping only helps if you know how often it fires. Counting the steps whose gradient norm exceeds the threshold tells you whether the threshold is set too low or the run is unstable.
Implement exploding_steps(grad_norms, threshold), the count of steps above the threshold.
Count the norms that are larger than the threshold.
No results yet
Run your code to check it against the examples, or submit to run every test.