In the first line of forward method under your network GenderSimpleNNModel, you do lin1_out = self.linear1(x) which expects the input dims as 12.
But from the exception size mismatch, m1: [46 x 20], m2: [12 x 12] , it seems you are feeding an input of dimension 20. That’s why the size mismatch. Make sure the 2nd dimension is of size 12.