修改margin参数
This commit is contained in:
@@ -52,8 +52,10 @@ TASKS = {
|
||||
batch_size=32,
|
||||
lr=5e-4,
|
||||
aug_strength='medium',
|
||||
cosface_s=60.0, # 菜品分类:类内差异大,使用中等scale
|
||||
cosface_m=0.32, # 较小margin,适应类内多样性(不同做法、角度)
|
||||
# cosface_s=60.0, # 菜品分类:类内差异大,使用中等scale
|
||||
cosface_s=64.0, # 菜品分类:类内差异大,使用中等scale
|
||||
# cosface_m=0.32, # 较小margin,适应类内多样性(不同做法、角度)
|
||||
cosface_m=0.40, # 较小margin,适应类内多样性(不同做法、角度)
|
||||
),
|
||||
'whole_ingredient': TaskConfig(
|
||||
name='WholeIngredientRecognition',
|
||||
@@ -406,7 +408,8 @@ if __name__ == '__main__':
|
||||
# parser.add_argument('task', choices=list(TASKS.keys()), nargs='?', default='whole_ingredient')
|
||||
parser.add_argument('--s', type=float, default=None, help='CosFace scale factor (默认使用任务配置值)')
|
||||
parser.add_argument('--m', type=float, default=None, help='CosFace margin (默认使用任务配置值)')
|
||||
parser.add_argument('--epochs', type=int, default=60)
|
||||
# parser.add_argument('--epochs', type=int, default=60)
|
||||
parser.add_argument('--epochs', type=int, default=100)
|
||||
parser.add_argument('--patience', type=int, default=10, help='早停容忍轮数')
|
||||
parser.add_argument('--min_delta', type=float, default=0.001, help='早停最小改善阈值')
|
||||
parser.add_argument('--min_epochs', type=int, default=25, help='最小训练轮数(早停保护)')
|
||||
|
||||
Reference in New Issue
Block a user