DanJun6737 / TransFace

[ICCV 2023] TransFace: Calibrating Transformer Training for Face Recognition from a Data-Centric Perspective
63 stars 8 forks source link

when inference a image ,parameters about num_classes #5

Closed yjdqk closed 8 months ago

yjdqk commented 8 months ago

why the file named init.py in backbone,all vit model's num_classes is setted the same as num_features?

DanJun6737 commented 8 months ago

Hi @yjdqk !

In fact, the value of variable num_classes in file init.py represents the dimension of the features extracted by the Transformer Encoder,so it is equivalent to the value of variable num_features.

If you wish to set the number of classes for the classification head, we recommend modifying the value of variable config.num_classes in the configs, which will correspond to the num_classes in the Partial FC file.

yjdqk commented 8 months ago

ok, thanks for your reply