datawhalechina / torch-rechub

A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
MIT License
374 stars 69 forks source link

add gradnorm and run_gradnorm example #30

Closed yinpu closed 2 years ago

yinpu commented 2 years ago

add gradnorm and run_gradnorm example modify mtl_trainer and utils\mtl.py

references: (1)Chen Z, Badrinarayanan V, Lee C Y, et al. Gradnorm: Gradient normalization for adaptive loss balancing in deep multitask networks[C]//International conference on machine learning. PMLR, 2018: 794-803. (2)https://github.com/brianlan/pytorch-grad-norm