A = torch.ones(0, 3)
print('tensor-A', A)
if min(A.shape) == 0 :
print('此处张量为空'
pytorch 如何判断张量为空?
最新推荐文章于 2024-10-15 15:56:54 发布
A = torch.ones(0, 3)
print('tensor-A', A)
if min(A.shape) == 0 :
print('此处张量为空'