Have a look at this:
class netG(nn.Module):
  def __init__(self,nChannels=256,channel_rate=64,drop_rate=0.0,dilation=1):
    super(netG, self).__init__()
    self.channel_rate = channel_rate
    self.nChannels = 4*self.channel_rate
    self.drop_rate = drop_rate
    self.dilation = 1
 
  def forward(self,x):
    #head
    x = F.conv2d(x, nn.Parameter(torch.Tensor(3, 4*self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False)
    x1 = x
    #dense_block-1
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-2
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-3
    self.nChannels = x.size(1)
    self.dilation = 2
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-4
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-5
    self.nChannels = x.size(1)
    self.dilation = 3
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-6
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-7
    self.nChannels = x.size(1)
    self.dilation = 2
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)
    #dense_block-8
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)

    #dense_block-9
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    x = torch.cat([x,d],1)

    #dense_block-10
    self.nChannels = x.size(1)
    self.dilation = 1
    d = F.batch_norm(x,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.leaky_relu(d,0.2)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    d = F.batch_norm(d,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    d = F.conv2d(d, nn.Parameter(torch.Tensor(4*self.channel_rate,self.channel_rate, 3, 3).normal_(0,0.0001)),bias=False,padding=self.dialtion,dilation=self.dilation)
    d = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    d = F.dropout2d(d,p=0.0)
    
    #tail
    x = F.batch_norm(d,torch.zeros(self.nChannels),torch.ones(self.nChannels),training=True,momentum=0.9)
    x = F.conv2d(x, nn.Parameter(torch.Tensor(self.nChannels, 4*self.channel_rate, 1, 1).normal_(0,0.0001)),bias=False)
    x = F.batch_norm(x,torch.zeros(4*self.channel_rate),torch.ones(4*self.channel_rate),training=True,momentum=0.9)
    x = F.dropout2d(x,p=0.0)

    x = torch.cat([x,x1],1)
    
    #last_layer
    x = F.conv2d(x,nn.Parameter(torch.Tensor(self.nChannels, self.channel_rate,3,3).normal_(0,0.0001)),bias=False)
    x = F.prelu(x,nn.Parameter(torch.Tensor(self.channel_rate)))
    x = F.conv2d(x,nn.Parameter(torch.Tensor(self.channel_rate,3,3,3).normal_(0,0.0001)),bias=False)
    x = F.tanh(x)

    return x

Let me know what the problem is, how should I pass parameter list to optimizer ?
As I am getting an error:
ValueError: optimizer got an empty parameter list