Hi I have a tensor x of shape: [8, 8, 89] and a second tensor s of shape [8,8] containing only values 1 and -1.
Now I want to expand s to the same shape of x:
s = s.unsqueeze(2).expand(x.shape)

and multiple them element-wise:
x = x*s

Two questions:

Why do I get a RuntimeError: CUDA error: invalid configuration argument when running this code with CUDA.
Is there a better operator which does this inplace?

Thank You!