DanJun6737 / TransFace

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

train the model using my own images #4

Closed yjdqk closed 6 months ago

yjdqk commented 6 months ago

when I trained the model using my own images,how to fix the config.val_targets in the config. I always got the error: stack expects each tensor to be equal size,bot got [3,364,458] at entry 0 and [3,215,317] at entry 1

DanJun6737 commented 6 months ago

hi @yjdqk config.val_targets is used to select the validation set (e.g., config.val_targets = ['lfw', 'cfp_fp', "agedb_30"]) during training. You can also speed up the training of the model by not using any validation set (e.g., config.val_targets = []). When training on your own dataset, please ensure that the input images undergo proper preprocessing (see paper for details). Regarding this error, I may need you to provide more details in order to answer it.

yjdqk commented 6 months ago

thanks,I have solved the problem by add transform.Resize()