tengshaofeng / ResidualAttentionNetwork-pytorch

a pytorch code about Residual Attention Network. This code is based on two projects from
681 stars 166 forks source link

Errors when I run train.py #36

Closed KrystalCWT closed 3 years ago

KrystalCWT commented 3 years ago

Traceback (most recent call last): File "train.py", line 93, in model = ResidualAttentionModel().cuda() File "/home/ResidualAttentionNetwork-pytorch-master/Residual-Attention-Network/model/residual_attention_network.py", line 136, in init self.residual_block1 = ResidualBlock(64, 256) File "/home/ResidualAttentionNetwork-pytorch-master/Residual-Attention-Network/model/basic_layers.py", line 16, in init self.conv1 = nn.Conv2d(input_channels, output_channels/4, 1, 1, bias = False) File "/home//.local/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 412, in init False, _pair(0), groups, bias, padding_mode) File "/home//.local/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 78, in init out_channels, in_channels // groups, *kernel_size)) TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expected one of: