torchmd / torchmd-net

Training neural network potentials
MIT License
335 stars 75 forks source link

Gradient Checkpointing Error #310

Open shenoynikhil opened 8 months ago

shenoynikhil commented 8 months ago

I was trying to use gradient checkpointing with TorchMD model. For some reason, I get this gradient mismatch whenever the warning pops up

https://github.com/torchmd/torchmd-net/blob/8a1be712a397d88eed82ae12066f1533f12152ee/torchmdnet/models/utils.py#L492-L499

RaulPPelaez commented 8 months ago

I believe this should be ok to ignore if you are ok with its message (a.i. you know the cutoff is such that some atoms are left alone). If you know for a fact this is not the case but the message pops up anyway then this is a bug.