INNER CODE UNIT · Python

__init__

yya518/FinBERT · archive/bertModel.py:42

    def __init__(self, model):
        super(dense_opt, self).__init__()
        self.lrlast = .001
        self.lrmain = .00001
        self.optim = optim.Adam(
        [ {"params":model.bert.parameters(),"lr": self.lrmain},
          {"params":model.classifier.parameters(), "lr": self.lrlast},
       ])
    
    def get_optim(self):
        return self.optim

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…