ITSD-pytorch icon indicating copy to clipboard operation
ITSD-pytorch copied to clipboard

About training

Open panmyuan opened this issue 5 years ago • 5 comments

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'

panmyuan avatar Jun 17 '20 15:06 panmyuan

Thanks for your attention. I've never met this error. It seems to be due to the wrong type of some tensor.

moothes avatar Jun 19 '20 01:06 moothes

@panmyuan Do you meet my problem as https://github.com/moothes/ITSD-pytorch/issues/2 ? Thx.

fu123456 avatar Jun 19 '20 15:06 fu123456

@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 avatar Jun 21 '20 07:06 panmyuan

@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.

zuogenulideren avatar Dec 03 '21 12:12 zuogenulideren

The following is my operation, and it works: torch.sum(torch.sum((_Y >= threshold).byte() & (self.Y), -1), -1).float()

zuogenulideren avatar Dec 03 '21 12:12 zuogenulideren