ofa.py (503B)
1 dataname = "all" 2 model = "ofa" 3 4 from configs.label_distribution import label_frequencies 5 from configs.micro_to_macro import multilabel, batch_per_epoch, cyclic_subsample, subsample_labels 6 7 # OFA parameters 8 unfreeze = "all" 9 ofa_classification_head = True 10 11 # Optimizer parameters 12 learning_rate = 2e-5 13 weight_decay = 0.0001 14 max_grad_norm = 1 15 16 # Trainer parameters 17 batch_size = 8 18 accumulation = 16 19 max_epoch = 25 20 patience = 3 21 22 max_text_len = 128 23 max_nb_ent = 10 24 image_max_edge = 384 25 26 amp = True 27 workers = 3