Hi,
I have tested your model separately and together with ResidulBlock and it never gererates NaN values.
Here is the code I have tested:

model = Generator()
model.eval()
x = torch.randn(1, 40, 1, 1)
x[x>0] = 0
x[x<0] = 1
o = model(x)
print(o.size())  #torch.Size([1, 3, 64, 64])