Both your examples have small errors inside:

When you want to save a Variable as a parameter of a module you should use nn.Parameter class. It is a very very simple subclass of Variable, but it has a special behaviour when assigned as a module attribute - it gets added to the parameter list, and is returned when you call model.parameters(). Variables aren’t added automatically, we thought of many cases where you’d want to cache some Variable in your model, without adding them to parameters (e.g. when writing an recurrent network you might want to save the last hidden state so you don’t have to pass it over and over).
Also Parameters are convenient, because they require_grad by default.
If you inspect list(model.parameters()) you’ll see that it’s empty. I’ll improve the error message though, it’s hard to trace what’s wrong.

You have a bug in forward - your model always just returns the input. Try this:
class Model(torch.nn.Module):
    
    def __init__(self):
        super(Model, self).__init__()
        self.fc = torch.nn.Linear(2, 1)
        
    def forward(self, x):
        return self.fc(x) # it was just x there