Closed easezyc closed 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.
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)