IndexError:The shape of the mask[32] at index 0 does not match the shape of the indexed tensor[224,]

debug并检查输入,可能是输入的尺寸不对,debug看中间的向量的shape,重点关注出错处shape为32,224的变量,一般需要进行维度的转化,可能需要permute()函数对训练输入的data形状进行调整

猜你喜欢

转载自blog.csdn.net/qq_43663979/article/details/129226066