raise ValueError("An input is not of the right dimension.")
z = torch.zeros(2, x.size()[1], y.size()[1], dtype=x.dtype, device=x.device)
z[0] = torch.ger(x[0], y[0]) - torch.ger(x[1], -y[1])
z[1] = torch.ger(x[0], -y[1]) + torch.ger(x[1], y[0])
return z
After Change
raise ValueError("An input is not of the right dimension.")
z = torch.zeros(2, x.size()[1], y.size()[1], dtype=x.dtype, device=x.device)
z[0] = torch.ger(real(x), real(y)) - torch.ger(imag(x), -imag(y))
z[1] = torch.ger(real(x), -imag(y)) + torch.ger(imag(x), real(y))
return z