Thank you for the link. I actually read through that link yesterday and as you can see in my discriminator class I’ve used a Sigmoid at the final output. I also used the target tensors using the following code snippet -
def ones_target(size):
‘’’
Tensor containing ones, with shape = size
‘’’
data = Variable(torch.ones(size, 1)).cuda(gpu_id)
return data
def zeros_target(size):
‘’’
Tensor containing zeros, with shape = size
‘’’
data = Variable(torch.zeros(size, 1)).cuda(gpu_id)
return data
I’m pretty sure, I’ve done all the fixes that link suggests. I’m now confused about what could be wrong. What really annoying is that the error generates after running few epochs!