Closed Richar-Du closed 2 years ago
I don't know whether this page can help you?https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/c967c71b525d3cbe07b940373140aaef/tuning_guide.ipynb#scrollTo=9_w6Pso10xBR
param.grad=None replaces model.zero_grad() here.
Thanks for your awesome work! I noticed you comment the mode.zero_grad() in https://github.com/j-min/VL-T5/blob/18699e2b1d5b4559f76c88a48cdec7176d356c34/VL-T5/src/caption.py#L225 So how could the model update its parameters?