heykeetae / Self-Attention-GAN

Pytorch implementation of Self-Attention Generative Adversarial Networks (SAGAN)
2.53k stars 475 forks source link

the imsize #5

Closed easezyc closed 6 years ago

easezyc commented 6 years ago

In your code, there is the imsize, howerver in the paper there is no imsize. The int(indim / 8)*(imsize ** 2) means the channel of the output(the \hat{C} right?). self.f = nn.Conv2d(in_dim, int(indim / 8)*(imsize ** 2), 1) self.g = nn.Conv2d(in_dim, int(in_dim / 8)*(imsize ** 2), 1)

heykeetae commented 6 years ago

Yes imsize refers to image size, 64 in this implementation. To be compared with the paper, the feature nunber N is the same as imsize^2. Imsize is also interchangeably used as f_size in the Self_Attn module, but let me make notations clear soon.