VL-T5 icon indicating copy to clipboard operation
VL-T5 copied to clipboard

No model.zero_grad()

Open Richar-Du opened this issue 2 years ago • 1 comments

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?

Richar-Du avatar Jan 13 '22 06:01 Richar-Du

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

Don-Joey avatar Mar 21 '22 14:03 Don-Joey

param.grad=None replaces model.zero_grad() here.

j-min avatar Aug 19 '22 17:08 j-min