Ok,


First, you must check which is m1 and m2, just identifying object.

Second, you must check matrix operation how it work.

Third, you must check shape of tensor of operands (m1 and m2) for the fully-connected layer.

Through these checks,  you can find out where you take misunderstand. I do not recommend to skip the three-step check, it makes more confusion. STEP by STEP is SHORTEST PATH.