Tensor element wise multiplication, dimension is different

the .view(-1) approach should work fine for you then