When you divide a tensor of size (64,128,32,32) by a tensor of size (64,1,32,32) you get an error because the size must match, yet in situations like these expand() is implicit and numpy does it this way. torch’s div() doesn’t operate that way, am I missing something or is this intentional?
The solution is of course expand_as() but the fact that it’s not default leads me to believe that perhaps I missed something.