valeoai / ADVENT

Adversarial Entropy Minimization for Domain Adaptation in Semantic Segmentation
https://arxiv.org/abs/1811.12833
Other
382 stars 70 forks source link

Why doesn't the output shape of the discriminator have to be (B,1,1,1)? #32

Open tylin7111095022 opened 1 year ago

tylin7111095022 commented 1 year ago

From the code, I know the structure of discriminator used fully convolution network(like discriminator in DCGAN), but when we input some any size self-information map , I(x),we can't fix the output shape of discriminator to (B, C, 1, 1), maybe we get a output whose shape is (B, 1, 4, 4) and then create a ground truth tensor whose all elements is 1 or 0 (source or target) to calculate BCE loss. I can't know why the output shape of discriminator don't have to be (B, 1, 1, 1), and we can directly use them for BCE loss. Thank you!