Hi,
You just need to change the view of second tensor to match shapes in corresponding dimension, then PyTorch’s tensor broadcasting will take care of that. e.g.
t1 = torch.arange(0, 196*14*14).view((196, 14, 14))  # shape (196, 14, 14)
t2 = torch.arange(196).view(-1, 1, 1)  # shape (196, 1, 1)
result = t1*t2

Bests