msg=f"The training strategy in config files provided by PaddleClas is based on 4 gpus. But the number of gpus is {world_size} in current training. Please modify the stategy (learning rate, batch size and so on) if use config files in PaddleClas to train."
std_gpu_num=8ifself.config["Optimizer"][
"name"]=="AdamW"else4
ifworld_size!=std_gpu_num:
msg=f"The training strategy provided by PaddleClas is based on {std_gpu_num} gpus. But the number of gpu is {world_size} in current training. Please modify the stategy (learning rate, batch size and so on) if use this config to train."
@@ -23,6 +23,11 @@ from .comfunc import rerange_index
...
@@ -23,6 +23,11 @@ from .comfunc import rerange_index
classEmlLoss(paddle.nn.Layer):
classEmlLoss(paddle.nn.Layer):
"""Ensemble Metric Learning Loss
paper: [Large Scale Strongly Supervised Ensemble Metric Learning, with Applications to Face Verification and Retrieval](https://arxiv.org/pdf/1212.6094.pdf)