szagoruyko / attention-transfer

Improving Convolutional Networks via Attention Transfer (ICLR 2017)
https://arxiv.org/abs/1612.03928
1.43k stars 274 forks source link

invalid variables #20

Closed vkadykova closed 6 years ago

vkadykova commented 6 years ago

When I run cifar.py I have the error: new() received an invalid combination of arguments - got (Tensor, int, int, int), but expected one of:

bupt-zsp commented 6 years ago

I meet the same problem, did you solve it now?

vkadykova commented 6 years ago

Still no. Write, please, if you solve it:)

bupt-zsp commented 6 years ago

It's a version problem, I can run it in pytorch 0.2.0.

szagoruyko commented 6 years ago

thats due to torch.IntTensor becoming a variable, so creating a new tensor with shape from torch.IntTensor is not possible without explicit cast to int now. going to update the code for PyTorch 0.4 now

szagoruyko commented 6 years ago

fixed by #21

vkadykova commented 6 years ago

Thanks a lot!