debug并检查输入,可能是输入的尺寸不对,debug看中间的向量的shape,重点关注出错处shape为32,224的变量,一般需要进行维度的转化,可能需要permute()函数对训练输入的data形状进行调整
IndexError:The shape of the mask[32] at index 0 does not match the shape of the indexed tensor[224,]
最新推荐文章于 2024-07-20 17:12:48 发布
debug并检查输入,可能是输入的尺寸不对,debug看中间的向量的shape,重点关注出错处shape为32,224的变量,一般需要进行维度的转化,可能需要permute()函数对训练输入的data形状进行调整