TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.73k stars 423 forks source link

MobileFaceNet is not right #3

Closed tensorboy closed 6 years ago

tensorboy commented 6 years ago

The Flatten function in here https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py:

class Flatten(Module):
    def forward(self, input):
        return input.view(input.size(0), -1)

Will not guarantee the output of this layer has 512 channels which used by:

self.linear = Linear(512, embedding_size, bias=False)

in the definition of MobileFaceNet: https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py#L209

Really appreciate your work!

tensorboy commented 6 years ago

It's my mistake. :)