I have two tensors: binary tensor A of dimension (Nx1) and B of dimensions (NxCxHxW). I want to multiply them in such a way that each element in A serves as a scalar multiplier to each tensor in B, hence the output should be of size (NxCxHxW). Considering A is binary, what is the fastest way to do this in a forward pass ? Both A and B are outputs of some modules.  I tried resizing A to the same size as B but that’s time consuming since B can be of a larger size.