def _get_encoder(self): encoder = nn.Sequential() with encoder.name_scope(): for l in range(self._num_layers): encoder.add( _get_rnn_layer( self._mode, 1, self._embed_size if l == 0 else self._hidden_size, self._hidden_size if l != self._num_layers - 1 else self._hidden_size_last, 0, self._weight_drop)) return encoder
def _get_encoder(self): return _get_rnn_layer(self._mode, self._num_layers, self._embed_size, self._hidden_size, self._dropout, 0)