nz = 100
ngf = 64
nc = 3

I am just trying to create a built in optimizer for b using torch.optim, from the feedback in my previous posts, for b to be optimized, I had to add self.b = nn.Parameter(torch.tensor(b)) in my definition of ShiftLayer().
As my code is right now, b is being passed as a parameter when I instantiate my generator and then call
optimizerG = optim.Adam(generator.parameters(), lr=lr, betas=(beta1, 0.999))
All I’m trying to do is instead of optimizing b through the Generator’s optimizer, create an optimizer for itself using torch.optim
Hope that makes sense.