Hi,
You should access the weights by calling data. Here is an example:
for x in model.parameters():
    print(x.size(), x.data)

p = list(disc_one.parameters())

p[1].data[0] = 3 #####
p[1]


Actually, here is your code:
n_in, n_h0, n_h1, n_h2, n_out, batch_size = 12, 0, 0, 0, 8, 32

class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.fc1 = nn.Linear(n_in, n_out)

    def forward(self, x):
        x = self.fc1(x)
        x = nn.Tanh()(x)
        return x
model = Net()

model.fc1.weight.data[0][0] = 0.5


By the way, you can format your code by putting “```” before and at the end of your code.
best