MMSRL

Our Multimodal Semantic Role Labeling model for CONSTRAINT 2022
git clone https://esimon.eu/repos/MMSRL.git
Log | Files | Refs | Submodules | README

ofa_old_best.py (658B)


      1 dataname = "all"
      2 model = "ofa"
      3 
      4 multilabel = False
      5 from configs.label_distribution import label_frequencies
      6 subsample_labels = "macro"
      7 subsample_other = 0.5
      8 
      9 # OFA parameters
     10 ofa_task = "vqa_gen"
     11 ofa_dir = "OFA/checkpoints/"
     12 ofa_path = f"{ofa_dir}/ofa_base.pt"
     13 vqa_input = "question ocr"
     14 decoder_input = ""
     15 unfreeze = "all"
     16 ofa_classification_head = True
     17 
     18 keep_all_batches = True
     19 group_image_entities = True
     20 
     21 # Optimizer parameters
     22 learning_rate = 1e-5
     23 weight_decay = 0.0001
     24 max_grad_norm = 1
     25 
     26 # Trainer parameters
     27 batch_size = 1
     28 accumulation = 16
     29 max_epoch = 35
     30 patience = 25
     31 
     32 max_text_len = 128
     33 max_nb_ent = 10
     34 image_max_edge = 384
     35 
     36 amp = True
     37 workers = 3