Esempio n. 1
0
 def __init__(self,
              dir_st,
              vocab,
              save=False,
              dropout=0.25,
              fixed_emb=False):
     super(DropUniSkip, self).__init__(dir_st, vocab, save, dropout,
                                       fixed_emb)
     # Modules
     self.seq_drop_x = SequentialDropout(p=self.dropout)
     self.seq_drop_h = SequentialDropout(p=self.dropout)
Esempio n. 2
0
 def set_dropout(self, dropout):
     self.dropout = dropout
     self.drop_ir = SequentialDropout(p=dropout)
     self.drop_ii = SequentialDropout(p=dropout)
     self.drop_in = SequentialDropout(p=dropout)
     self.drop_hr = SequentialDropout(p=dropout)
     self.drop_hi = SequentialDropout(p=dropout)
     self.drop_hn = SequentialDropout(p=dropout)