What is the fastest way to do an element-wise multiplication between a tensor and an array in Tensorflow 2?
For example, if the tensor T (of type tf.Tensor) is:
[[0, 1],
[2, 3]]
and we have an array a (of type np.array):
[0, 1, 2]
I wand to have:
[[[0, 0],
[0, 0]],
[[0, 1],
[2, 3]],
[[0, 2],
[4, 6]]]
as output.