You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello !
Thank you very much for sharing these functions to the PyTorch community,
I am successfully using the "torch_two_sample.statistics_diff.MMDStatistic" both at training/backprop and evaluation, running on GPU.
I am trying to have an alternative criterion, using instead the SmoothKNN that I set as the MMD (with the additional True boolean for cuda and the k parameter).
The code is absolutely identical to when using the MMD for the criterion but with the SmoothKNN function it gives a "RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation"
Does anyone have a fix to that please ?
Thanks in advance !
The text was updated successfully, but these errors were encountered:
May be a bit late for you but I fixed it by changing statistics_diff.py in the SmoothKNNStatistic.__call__ function as follows (showing the lines that were commented out and replaced)
Hello !
Thank you very much for sharing these functions to the PyTorch community,
I am successfully using the "torch_two_sample.statistics_diff.MMDStatistic" both at training/backprop and evaluation, running on GPU.
I am trying to have an alternative criterion, using instead the SmoothKNN that I set as the MMD (with the additional True boolean for cuda and the k parameter).
The code is absolutely identical to when using the MMD for the criterion but with the SmoothKNN function it gives a "RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation"
Does anyone have a fix to that please ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: