>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2
>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2
本文标题:size函数(numpy和pytorch不同)
本文链接:https://www.haomeiwen.com/subject/wulqfdtx.html
网友评论