I’ve rewritten the bits that broke, and now it is running without error. Will paste my Net class as can’t pin down the cause…
class Net(nn.Module):
    def __init__(self, feature_number, hidden_number, output_number):
        super(Net, self).__init__()
        self.hidden1 = nn.Linear(feature_number, hidden_number)
        self.hidden2 = nn.Linear(hidden_number, hidden_number)
        self.out = nn.Linear(hidden_number, output_number)

    def forward(self, x):
        x = self.hidden1(x)
        x = self.hidden2(x)
        x = torch.sigmoid(x)
        x = self.out(x)
        return x

What I am trying to do is create a NN with two hidden layers. Each with six hidden neurons. The activation function used is a sigmoid
function in the hidden neurons, and a linear activation
function in the output neuron. Think that’s about right??
Thanks again for your help!!