查找张量不同维度的大小

查找张量不同维度的大小

代码:


import torch

x = torch.ones([4, 3, 160, 160])

print(x.shape[0])


运行结果:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_34848334/article/details/129755200