Solved by Nikronic in post #2 
              
              
                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…