YuanXue1993 / SegAN

SegAN: Semantic Segmentation with Adversarial Learning
MIT License
182 stars 58 forks source link

there is an error in line 125 #20

Open Qiaohao501 opened 1 year ago

Qiaohao501 commented 1 year ago

Traceback (most recent call last): File "train.py", line 125, in output_masked[:,d,:,:] = (input_mask[:,d,:,:].unsqueeze(1)) * output RuntimeError: expand(torch.cuda.FloatTensor{[36, 1, 128, 128]}, size=[36, 128, 128]): the number of sizes provided (3) must be greater or equal to the number of dimensions in the tensor (4)

Aut0matas commented 1 year ago

origin: output_masked[:,d,:,:] = input_mask[:,d,:,:].unsqueeze(1) output fix: output_masked[:,d,:,:] = torch.squeeze(input_mask[:,d,:,:].unsqueeze(1) output)