Пример #1
0
    def __init__(self, args):
        embedder.__init__(self, args)
        self.args = args
        self.coef_l = self.args.coef_layers
        self.coef_f = self.args.coef_fusion
        self.criteria = nn.BCEWithLogitsLoss()

        if not os.path.exists(self.args.save_root):
            os.makedirs(self.args.save_root)
Пример #2
0
 def __init__(self, args):
     embedder.__init__(self, args)
Пример #3
0
 def __init__(self, args):
     embedder.__init__(self, args)
     self.clip_max = torch.FloatTensor([1.0]).to(self.device)
Пример #4
0
 def __init__(self, args):
     embedder.__init__(self, args)
     self.args = args
     self.coef_l = self.args.coef_layers
     self.criteria = nn.BCEWithLogitsLoss()