'Creates a single LSTM cell, possibly with dropout.
Requires that BaseLSTMNetwork.__init__() was called.
Args:
num_units: Number of hidden units in the cell.
during_training: Whether to create a cell for training (vs inference).
Returns:
A RNNCell of the requested size, possibly with dropout.'

def _create_cell(self, num_units, during_training):

    if (not during_training):
        return tf.contrib.rnn.LayerNormBasicLSTMCell(num_units, layer_norm=self._attrs['layer_norm'], reuse=True)
    cell = tf.contrib.rnn.LayerNormBasicLSTMCell(num_units, dropout_keep_prob=self._recurrent_dropout_rate, layer_norm=self._attrs['layer_norm'])
    cell = tf.contrib.rnn.DropoutWrapper(cell, input_keep_prob=self._input_dropout_rate)
    return cell
