any() missing 1 required positional arguments: "dim"
scores = torch.linspace(0.5, 0.6, steps=2).view(2) # b = torch.FloatTensor(0.5).seqence() # print(b)
if np.any(scores != -1):
print(111)
解决方法:
np.any(np.array(scores >5))
any() missing 1 required positional arguments: "dim"
scores = torch.linspace(0.5, 0.6, steps=2).view(2) # b = torch.FloatTensor(0.5).seqence() # print(b)
if np.any(scores != -1):
print(111)
解决方法:
np.any(np.array(scores >5))