Add clip_grad_norm (#5299)
* Adapt to new structure * auto format by CI * fix bug Co-authored-by:oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> Co-authored-by:
oneflow-ci-bot <ci-bot@oneflow.org>
Showing
- python/oneflow/nn/__init__.py 1 addition, 0 deletionspython/oneflow/nn/__init__.py
- python/oneflow/nn/graph.py 1 addition, 1 deletionpython/oneflow/nn/graph.py
- python/oneflow/nn/graph_block.py 1 addition, 1 deletionpython/oneflow/nn/graph_block.py
- python/oneflow/nn/util.py 0 additions, 0 deletionspython/oneflow/nn/util.py
- python/oneflow/nn/utils/__init__.py 16 additions, 0 deletionspython/oneflow/nn/utils/__init__.py
- python/oneflow/nn/utils/clip_grad.py 138 additions, 0 deletionspython/oneflow/nn/utils/clip_grad.py
- python/oneflow/test/modules/test_clip_grad.py 81 additions, 0 deletionspython/oneflow/test/modules/test_clip_grad.py
Please register or sign in to comment