Open
Description
Describe the bug
Using PT-MAP with code adapted from episodic training.ipynb, recieve error message:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [150, 5]], which is output 0 of ExpBackward0, is at version 579; 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).
To Reproduce
Steps to reproduce the behavior:
- Python version 3.12
- Episodic training
- Features Dataset
Additional context
'Fixed' error message by changing all in place operations in pt_map.py. EX: x *= y -> x = x*y.
I've tried most other FSL algorithms here and not experienced this problem. Seems to be in the compute_optimal_transport method.