torch 常用函数

Tensor的内容以及信息

z = torch.Tensor(3,4)
x = z:nDimension() – 2
y = z:size() – y的值为size2的一维数组。3和4
t = z:nElement() – 12

请作者喝一杯咖啡☕️