Closed JiwonKKim closed 6 months ago
Hi there! Thanks for your feedback, I'll take a look at this and return soon.
@JiwonKKim Hi again!
One more time - many thanks for your feedback, much appreciate it
You are right, the output_hook doesn't work, because there are no named modules.
The correct way to fix it is to change
for module in model.named_modules():
to
for module in model.modules():
I'll update my repository today later, Have a good day!
@JiwonKKim I've committed a fix for the issue, please check out my latest commit. Please, feel free to ask any question you have.
Thanks!
Hi. thanks for your awesome source code.
I'm training the model with your example code with l1 & l2 regularization. I tried to check the gradient flow of the tensor during the backward process. However, I noticed that in train/trainer.py, output_hook was not storing the gradient tensors. Seems like the registering hook function is not working in train/trainer.py, line 186.
Should I fix the code from
to
in train/trainer.py, line 184? Or did I miss something?
My torch version is 2.1
Thanks.