MCPcopy Create free account
hub / github.com/pytorch/tutorials / zeroing_out_gradients.py

File zeroing_out_gradients.py

recipes_source/recipes/zeroing_out_gradients.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2Zeroing out gradients in PyTorch
3================================
4It is beneficial to zero out gradients when building a neural network.

Callers

nothing calls this directly

Calls 3

stepMethod · 0.80
NetClass · 0.70
backwardMethod · 0.45

Tested by

no test coverage detected