Pytorch-RuntimeError: size mismatch m1: [a x b], m2: [c x d]
Pytorch-RuntimeError: size mismatch m1: [a x b], m2: [c x d]在进行深度学习的代码中,在采用线性层进行转化的时候可能出现size mismatch的问题,首先要了解到[a x b], [c x d]都代表什么m1 is [a x b] which is [batch size x in features]m2 is [c x d] which is [in features x out features]了解了这个以后,我们可以清楚的