使用python输出某tensor的维度:
print(tensor.size)
出现报错:
built-in method size of Tensor object at 0x7f2051c31ea0
原因是size后面少了括号,加上即可
print(tensor.size())