TensorMultiplication.png1000×500 43 KB

I am trying to multiply a 1D tensor by a 2D tensor as shown in the picture above (whereby each element of the first tensor is multiplied by each element in the corresponding row of the second tensor). If I were to run a*b, I would get RuntimeError: inconsistent tensor size. I could of course iterate through each tensor and multiply each of the corresponding elements, but I assume that there exists a ‘better’ way than this?