ITSD-pytorch
ITSD-pytorch copied to clipboard
About training
I am very interested in your work. I runned your codes, but i met some problems. Could you help me ? /src/Metrics.py TPs = [torch.sum(torch.sum((_Y >= threshold) & (self.Y), -1), -1).float() for threshold in self.thresholds] RuntimeError: Expected object of scalar type Bool but got scalar type Byte for argument #2 'other'
Thanks for your attention. I've never met this error. It seems to be due to the wrong type of some tensor.
@panmyuan Do you meet my problem as https://github.com/moothes/ITSD-pytorch/issues/2 ? Thx.
@panmyuan Do you meet my problem as #2 ? Thx. I just change the the type of the tensor to solve this problem. The following is my operation: TPs = [torch.sum(torch.sum((_Y >= threshold).int() & (self.Y), -1).int(), -1).float()
@panmyuan Do you meet my problem as #2 ? Thx. I just change the the type of the tensor to solve this problem. The following is my operation: TPs = [torch.sum(torch.sum((_Y >= threshold).int() & (self.Y), -1).int(), -1).float()
I follow your operation,but I fail to solve this problem. I'm so confused.
The following is my operation, and it works: torch.sum(torch.sum((_Y >= threshold).byte() & (self.Y), -1), -1).float()