You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README it is written that the last layer of the discriminator maps the output to a scalar.
So the output shape of the discriminator should be (?,1,1,1) or (?,1), but in fact it is (?,4,4,1).
Is this intended?
To see this, add self.dis_real = dis_real in line 199 and print(self.sess.run(self.dis_real, feed_dict=feed_dic).shape) in line 55 of models.py.
An easy fix for this problem, would be to use the padding="VALID" for the last layer of the discriminator.
Best regards,
Jannis
The text was updated successfully, but these errors were encountered:
@JannisBush This was intended! We have to update the readme!
This class of discriminators is known as PatchGAN. The output of the discriminator is a 4x4 matrix with each index corresponding an image patch in the input. The receptive field of the network is 70x70 which means our discriminator evaluates 70x70 overlapping patches of the input image!
This is all mathematically equivalent to if we had manually chopped up the image into 70x70 overlapping patches, run a regular discriminator over each patch, and averaged the results.
Hey,
In the README it is written that the last layer of the discriminator maps the output to a scalar.
So the output shape of the discriminator should be (?,1,1,1) or (?,1), but in fact it is (?,4,4,1).
Is this intended?
To see this, add
self.dis_real = dis_real
in line 199 and print(self.sess.run(self.dis_real, feed_dict=feed_dic).shape) in line 55 ofmodels.py
.An easy fix for this problem, would be to use the
padding="VALID"
for the last layer of the discriminator.Best regards,
Jannis
The text was updated successfully, but these errors were encountered: