Tensor product 1d, 3d

batch_size = 3

x = [1,2,3]
y = [[[1, 1, 1, 1],
[2, 2, 2, 2]],
[[1, 1, 1, 1],
[2, 2, 2, 2]],
[[1, 1, 1, 1],
[2, 2, 2, 2]]]

x*y = [[[1, 1, 1, 1],
[2, 2, 2, 2]],
[[2, 2, 2, 2],
[4, 4, 4, 4]],
[[3, 3, 3, 3],
[6, 6, 6, 6]]]

Pytorch is too difficult…
What do you do with this method of multiplication?

Help me, please.

Could you explain the question a bit more?
Are you wondering when or why broadcasting is used?
If so, I think the numpy broadcasting docs might be helpful to see a more detailed explanation and some examples.