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
I am currently trying to get Class Activation Maps for a SegResNet model I have trained, which is pretty much defined in the same way as in the tutorial . The final model works quite well for the task that I have applied it to, but I cannot get the MONAI GradCAM implementation to work with SegResNet.
I have tried multiple different layers (conv_final, conv_final.2.conv, up_layers.2, etc.) but have in all cases gotten the following error:
OutOfMemoryError: CUDA out of memory. Tried to allocate 6400.00 GiB.
This seems like something is completely misconfigured on my end, but Im a bit stumped on what to try next.
The only other error I have gotten was triggered, when I tried using 'up_layers.2.0.conv2.conv' as my target layer:
RuntimeError: Output 0 of BackwardHookFunctionBackward is a view and is being modified inplace. 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.
Does this mean, that the way SegResNet is currently implemented makes it incompatible with the GradCAM implementation, or am I still missing something?
P.S.: The above asserts are also repro with the following snippet (depending on the chosen target layer):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently trying to get Class Activation Maps for a SegResNet model I have trained, which is pretty much defined in the same way as in the tutorial . The final model works quite well for the task that I have applied it to, but I cannot get the MONAI GradCAM implementation to work with SegResNet.
I have tried multiple different layers (conv_final, conv_final.2.conv, up_layers.2, etc.) but have in all cases gotten the following error:
This seems like something is completely misconfigured on my end, but Im a bit stumped on what to try next.
The only other error I have gotten was triggered, when I tried using 'up_layers.2.0.conv2.conv' as my target layer:
Does this mean, that the way SegResNet is currently implemented makes it incompatible with the GradCAM implementation, or am I still missing something?
P.S.: The above asserts are also repro with the following snippet (depending on the chosen target layer):
Beta Was this translation helpful? Give feedback.
All reactions