Hi I implemented a Gan network. the discriminator does not change  during training… loss is BCEloss and the last layer  has a sigmoid activation function…
list(discriminator.parameters())[0].grad is all zeros…
import torch.nn.functional as F
class Discriminator(nn.Module):
    def __init__(self):
        super(Discriminator,self).__init__()
        self.conv1= nn.Sequential(
            nn.Conv2d(2,128, kernel_size=(4,4), stride=2,padding=5),
            nn.BatchNorm2d(128),
            nn.LeakyReLU(0.2)
        )#32
        self.conv2= nn.Sequential(
            nn.Conv2d(128,256,kernel_size=(4,4), stride=2,padding=5),
            nn.BatchNorm2d(256),
            nn.LeakyReLU(0.2)
        )#16
        self.conv3= nn.Sequential(
            nn.Conv2d(256,1, kernel_size=(4,4), stride=2,padding=5),
            nn.Sigmoid()
        )#8
    def forward(self,kr):
        
        out_conv1=self.conv1(kr)
        out_conv2=self.conv2(out_conv1)
        out_conv3=self.conv3(out_conv2)        
        return out_conv3

inputsize=(batch,2,32,32)
outputsize=(batch,1,8,8)
loss=nn.BCELoss()