linear_model = nn.Linear(in_size, out_size) # Torch takes care of initializing weights prediction = linear_model(input) # Forward pass