Open EnQing626 opened 5 years ago
Hi,
can you try changing the line for the true_1_hot, and adding a cast to int64.
Like this
true_1_hot = torch.eye(num_classes)[true.squeeze(1).to(torch.int64)]
Hi,
can you try changing the line for the true_1_hot, and adding a cast to int64.
Like this
true_1_hot = torch.eye(num_classes)[true.squeeze(1).to(torch.int64)]
It works for me. Thanks for your reply :)
Very thanks for your code. When I use the "jaccard_loss" function, some error happened:
Too many indices for tensor of dimension 2
in line 110.(The num_classes is 1)My input size of true is 3177 and the input size of logits is 3177. Can you help me to solve the problem~? Thanks