lyongo / NWPU-MOC

This is a repository about NWPU-MOC dataset and code.
19 stars 2 forks source link

gradient computation problems #4

Open mokby opened 2 months ago

mokby commented 2 months ago

I follow the instruction as described in readme.md, and when I running python3 train.py‘, errors occured, I googled and try to modifyinplace=True' into 'inplace=False', but that does not help.

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [4, 128, 64, 64]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
KaibingHu commented 2 months ago

You can try to edit the 101 row of /models/FPN/FPN_Head.py.Chage += into =

mokby commented 1 month ago

Thanks ,that works