Checking whether a pytorch tensor is empty tensor is very simple: if torch_tensor == torch.Size([]): print("this tensor is empty") else: print("this tensor ...
確定! 回上一頁