JeiKeiLim / kindle

Making a PyTorch model easier than ever!
https://limjk.ai/kindle/
MIT License
78 stars 7 forks source link

Custom yaml module activation gradient fails #17

Closed JeiKeiLim closed 3 years ago

JeiKeiLim commented 3 years ago

How to reproduce

Try to train with custom yaml module

Error Message

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [64, 48, 16, 16]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

How it should work

Training should be proceeded normally.

JeiKeiLim commented 3 years ago

Turns out, this error was from Add operation. I will fix this in a bit.