hy-struggle / PRGC

PRGC: Potential Relation and Global Correspondence Based Joint Relational Triple Extraction
107 stars 16 forks source link

训练时,10个epoch中第七个epoch,loss_mat就为0了,请问如何设置超参数平衡各个loss #31

Open vv521 opened 4 months ago

vv521 commented 4 months ago
 self.max_seq_length = 100
    self.data_cache = False
    self.train_batch_size = 4 if 'WebNLG' in corpus_type else 64
    # 6  6 2
    self.val_batch_size = 16
    # 24 20 8
    self.test_batch_size = 48
    # 64  60 24
    # PRST parameters
    self.seq_tag_size = len(Label2IdxSub)
    # load label2id
    self.rel2idx = json.load(open(self.data_dir/'rel2id.json', 'r', encoding='utf-8'))[-1]
    self.rel_num = len(self.rel2idx)

    # early stop strategy
    self.min_epoch_num = 5
    self.patience = 0.00001
    self.patience_num = 10

    # learning rate
    self.fin_tuning_lr = 1e-4
    self.downs_en_lr = 1e-3
    self.clip_grad = 2.
    self.drop_prob = 0.5  # dropout 0.3
    self.weight_decay_rate = 0.01
    self.warmup_prop = 0.1
    self.gradient_accumulation_steps = 2
   超参数设置如上
liguochun0304 commented 4 weeks ago

你好 我情况和您差不多,在第6个epoch loss 上升然后各个指标为0 请问您这个问题解决了吗。