We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am trying to use WHD in order to optimize a semantic segmentation model. I have written this code:
import torch
from losses import *
whd = WeightedHausdorffDistance(resized_height = 192, resized_width = 192) prob_map = torch.rand(1, 192, 192, requires_grad = True) prob_map.requires_grad = True gt = [torch.randint(0, 2, (192, 192))] orig_sizes = np.array([[192, 192]]) whd(prob_map, gt, orig_sizes)
The code gives me the next error:
AttributeError: 'WeightedHausdorffDistance' object has no attribute '_backward_hooks'
¿Can someone help me?
Thanks in advance
The text was updated successfully, but these errors were encountered:
You can add super(WeightedHausdorffDistance, self).__init__() instead of super(nn.Module, self).__init__()
super(WeightedHausdorffDistance, self).__init__()
super(nn.Module, self).__init__()
Sorry, something went wrong.
No branches or pull requests
Hi,
I am trying to use WHD in order to optimize a semantic segmentation model. I have written this code:
import torch
from losses import *
whd = WeightedHausdorffDistance(resized_height = 192, resized_width = 192)
prob_map = torch.rand(1, 192, 192, requires_grad = True)
prob_map.requires_grad = True
gt = [torch.randint(0, 2, (192, 192))]
orig_sizes = np.array([[192, 192]])
whd(prob_map, gt, orig_sizes)
The code gives me the next error:
AttributeError: 'WeightedHausdorffDistance' object has no attribute '_backward_hooks'
¿Can someone help me?
Thanks in advance
The text was updated successfully, but these errors were encountered: