Exemple #1
0
 def init_weights(self):
     if self.cnn_1d is not None:
         init_kaiming(self.cnn_1d, dist='uniform', nonlinearity='relu')
     if self.rnn is not None:
         init_xavier(self.rnn, dist='uniform')
     if self.linear_out is not None:
         init_xavier(self.linear_out, dist='uniform')
Exemple #2
0
 def init_weights(self):
     if self.rnn is not None:
         init_xavier(self.rnn, dist='uniform')
     if self.attn is not None:
         init_xavier(self.attn, dist='uniform')
     if self.linear_out is not None:
         init_xavier(self.linear_out, dist='uniform')