ResidualAttentionNetwork-pytorch icon indicating copy to clipboard operation
ResidualAttentionNetwork-pytorch copied to clipboard

model = ResidualAttentionModel() error with python3

Open carol007 opened this issue 5 years ago • 1 comments

TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expected one of:

  • (torch.device device)
  • (torch.Storage storage)
  • (Tensor other)
  • (tuple of ints size, torch.device device)
  • (object data, torch.device device)

carol007 avatar Nov 20 '19 08:11 carol007

You need to convert the input and output filters parameters of the Conv2d layers to int. If you look at the current arguments, they are float ( eg : 2.0 instead of 2) which is not accepted by torch.

victorruelle avatar Nov 26 '19 11:11 victorruelle