pytorch_DAN
pytorch_DAN copied to clipboard
An implementation of Deep Adaptation Network with pytorch
RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
你好,我看了下您这代码的日期,您用的pytorch版本是0.3.1吗?还是其他版本呢?
How should I operate my own data set, how should I write the file hierarchy and code?
With PyTorch>=0.5, the index of 0-dim tensor is invalid, so in train.py line 59 to 67, [0] should be replaced with .item(): e.g. loss.data[0] --> loss.data.item()