Tensor([-1]), a) # fails: TypeError: where(): argument 'input' (position 2) must be Tensor, not int c = torch.where(a == 1, -1, a) # works in numpy ...
確定! 回上一頁