Hello everyone,
I have the following two tensors:
E
with size (3, 2, 4)
, lets visualize it as
e11, e12
e21, e22
e31, e32
where every e
is a vector with dimension 4
G
with size (3, 2)
, lets visualize it as
g11, g12
g21, g22
g31, g32
where every g
is a scalar
As a result I want to multiply every vector e of E with the corresponding scalar g from G as following:
g11*e11, g12*e12
g21*e21, g22*e22
g31*e31, g32*e32
where * is element wise multiplication, or in other words every vector e from the tensor E
(let’s say e11
), I want it multiplied with the corresponding scalar (or g11
for e11
), etc… The size of the result should be (2, 2, 4)
, same as the E
tensor.
Thank you.