ResidualAttentionNetwork-pytorch
ResidualAttentionNetwork-pytorch copied to clipboard
Errors when I try to run train.py
I follow the insturction and run: CUDA_VISIBLE_DEVICES=0 python train.py but I get TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:
- (tuple of ints size, *, tuple of names names, torch.memory_format memory_format, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
- (tuple of ints size, *, torch.memory_format memory_format, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
what's wrong with this code?
Did you find the solution?
Edit ResidualBlock in basic_layers.py by replacing all / with //. For example, in line 16, you should write as
self.conv1 = nn.Conv2d(input_channels, output_channels//4, 1, 1, bias = False)