0

Currently I'm working with NCA's, and I ran into the notebook authored by Magnus Petersen. However, I get custom error message that I'm not able to solve. In the first cell of the training loop, I get the following error:

"RuntimeError: A view was created in no_grad mode and is being modified inplace with grad mode enabled. This view was created inside a custom Function (or because an input was returned as-is) and the autograd logic to handle view+inplace would override the custom backward associated with the custom Function, leading to incorrect gradients. This behavior is forbidden. You can fix this by cloning the output of the custom Function.".

I've made various changes to the code but the error persists. How do I solve this?

0 Answers0