adjidieng / DETM

MIT License
130 stars 39 forks source link

bug: RuntimeError, Can't call numpy() on Variable that requires grad.… #11

Open quynhneo opened 3 years ago

quynhneo commented 3 years ago

… Use var.detach().numpy() instead on Line 507 (Tested on PyTorch 1.1.0 with Ubuntu 20.04, Mac OS 10.15)

ref: https://stackoverflow.com/questions/55466298/pytorch-cant-call-numpy-on-variable-that-requires-grad-use-var-detach-num/56023903

ALSO: deleted trailing white spaces