MMSRL

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

baseline.py (570B)


      1 dataname = "all"
      2 model = "baseline"
      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 # Baseline model parameters
      8 modelname = "bert-base-uncased"
      9 hidden_size = 256
     10 dropout = 0
     11 use_caption = False
     12 
     13 # Optimizer parameters
     14 learning_rate = 2e-5
     15 weight_decay = 0.0001
     16 max_grad_norm = 1
     17 
     18 # Trainer parameters
     19 batch_size = 8
     20 accumulation = 16
     21 max_epoch = 25
     22 patience = 3
     23 
     24 max_text_len = 128
     25 max_nb_ent = 10
     26 max_ent_len = 15
     27 image_max_edge = 384
     28 
     29 amp = True
     30 workers = 3