摘要:
1、scatter_(dim, index, src(tensor)) 2、scatter_(dim, index, value(number)) #dim=0 self[index[x][y]][y]=src[x][y] #dim=1 self[x][index[x][y]]=src[x][y] 阅读全文
摘要:
pytorch中size是函数,shape是属性,都是表示的数据的尺寸。( [3,4]它的shape是2,而不是(1, 2)) OpenCV中size和shape都是属性,size表示像素的个数,shape表示的是尺寸 numpy中size和shape都是属性,size表示元素的个数,shape表示 阅读全文