Open dangbinghoo opened 4 years ago
Please change shape [4, 480, 480, 3] to [4, 3, 480, 480].
Just like: image = image.transpose(0, 3, 1, 2)
.
Please change shape [4, 480, 480, 3] to [4, 3, 480, 480]. Just like:
image = image.transpose(0, 3, 1, 2)
.
it seems torch.transpose only support 2 arguments, and I just added:
images = images.transpose(1, 3)
after
images = images.to(self.device)
targets = targets.to(self.device)
and validation method in train.py also has such a problem, I added :
image = image.transpose(1, 3)
after target = target.to(self.device)
and the trainning now seems to going on, but I don't know whether it's the correct way.
Thanks!
我google搜索了一番,说是image通道不正确,但不知道怎么改代码能够转换对: