Solved by ptrblck in post #2 
              
              
                I’ve tested it in my 0.1.12 environment and it should work like you tried it: 
a = torch.randn(1, 49, 1)
b = torch.randn(1, 49, 256)
c = a.expand_as(b) * b