Skip to content

Problem with PT_MAP #164

Open
Open
@callumHub

Description

@callumHub

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:

  1. Python version 3.12
  2. Episodic training
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions