nn.Linear vs torch.matmul

obv. you have to compare the module with something like matmul(my_data, linear.weights.T) + linear.bias

1 Like