grey-eye / talking-heads

Our implementation of "Few-Shot Adversarial Learning of Realistic Neural Talking Head Models" (Egor Zakharov et al.)
GNU General Public License v3.0
593 stars 110 forks source link

Discriminator applies sum-pooling *after* ReLU at the end #47

Open RohitSaha opened 4 years ago

RohitSaha commented 4 years ago

The sequence of operations need to be reversed on line 256 of network.py. According to the paper, "Downsampling is performed via average pooling. Then, after applying ReLU activation function to the output tensor, we perform sum-pooling over spatial dimensions."

However, according to the code, sum-pooling is first applied followed by ReLU.

mrgloom commented 4 years ago

https://github.com/adobe/antialiased-cnns/issues/29

Jarvisss commented 4 years ago

@RohitSaha Also notice in paper Sec.3.4, "To obtain the vectorized outputs in both networks, we perform global sum pooling over spatial dimensions followed by ReLU." seems the two statements in paper conflict.

Jarvisss commented 4 years ago

For me, another question is, is in the code, the pooling is implemented as follow: self.pooling = nn.AdaptiveMaxPool2d((1, 1)), is this the same as "sum-pooling" according to the paper?