mlx/python/mlx
Nripesh Niketan 79c859e2e0
feat: implement clip_grad_norm (#1043)
* feat: implement `clip_grad_norm`

* pre-commit

* Add test for clip_grad_norm function in test_optimizers.py

* small fixes

* fix

* lint

* Update tree_reduce

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update python/mlx/utils.py

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Refactor clip_grad_norm function to include documentation and improve readability

* format docstring

* Add acknowlegements

* text wrap

* pre-commit

* nits in docs

---------

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
Co-authored-by: Awni Hannun <awni@apple.com>
2024-05-03 09:07:02 -07:00
..
nn avgpool, not maxpool (#1002) 2024-04-17 08:26:22 -07:00
optimizers feat: implement clip_grad_norm (#1043) 2024-05-03 09:07:02 -07:00
_os_warning.py Version bump and os error (#807) 2024-03-07 13:57:58 -08:00
_reprlib_fix.py copyright + ack 2023-11-30 11:12:53 -08:00
extension.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
py.typed Add py.typed to support PEP-561 (type-hinting) for mlx (#588) 2024-01-31 12:05:42 -08:00
utils.py feat: implement clip_grad_norm (#1043) 2024-05-03 09:07:02 -07:00