Not sure what you are trying to do, but the error is because nn.ParameterList takes an iterable as input, see https://pytorch.org/docs/stable/nn.html#torch.nn.ParameterList 80, try
self.myparameters = nn.ParameterList([self.w, self.out_w1, self.out_b1, self.out_w2, self.out_b2])