Beispiel #1
0
 def reset_parameters(self, param_init):
     """Initialize parameters with uniform distribution."""
     logger.info('===== Initialize %s with uniform distribution =====' % self.__class__.__name__)
     for n, p in self.named_parameters():
         if 'conv' in n or 'tds' in n or 'gated_conv' in n:
             continue  # for CNN layers before RNN layers
         init_with_uniform(n, p, param_init)
 def reset_parameters(self, param_init):
     """Initialize parameters with uniform distribution."""
     logger.info('===== Initialize %s with uniform distribution =====' %
                 self.__class__.__name__)
     for n, p in self.named_parameters():
         init_with_uniform(n, p, param_init)