This small code:
import torch
import torch.nn as nn

class M(nn.Module):
    def __init__(self):
        super().__init__()
        self.l1 = nn.Linear(10,100)        
        
    
    def forward(self, inp): 
        out = self.l1(inp)
        return out
        

m = M()
inp = torch.empty(10, 100)
out = m(inp)
print(out)

RuntimeError: size mismatch, m1: [10 x 100], m2: [10 x 100] at /pytorch/aten/src/TH/generic/THTensorMath.cpp:961