'Initializes the LSTM base class.
Parameters used:
hidden_layer_sizes: Comma-delimited number of hidden units for each layer.
input_dropout_rate (-1.0): Input dropout rate for each layer.  If < 0.0,
use the global |dropout_rate| hyperparameter.
recurrent_dropout_rate (0.8): Recurrent dropout rate.  If < 0.0, use the
global |recurrent_dropout_rate| hyperparameter.
layer_norm (True): Whether or not to use layer norm.
Hyperparameters used:
dropout_rate: Input dropout rate.
recurrent_dropout_rate: Recurrent dropout rate.
Args:
component: parent ComponentBuilderBase object.
additional_attr_defaults: Additional attributes for use by derived class.'

def __init__(self, component, additional_attr_defaults=None):

    attr_defaults = (additional_attr_defaults or {})
    attr_defaults.update({'layer_norm': True, 'input_dropout_rate': (-1.0), 'recurrent_dropout_rate': 0.8, 'hidden_layer_sizes': '256'})
    self._attrs = dragnn.get_attrs_with_defaults(component.spec.network_unit.parameters, defaults=attr_defaults)
    self._hidden_layer_sizes = map(int, self._attrs['hidden_layer_sizes'].split(','))
    self._input_dropout_rate = self._attrs['input_dropout_rate']
    if (self._input_dropout_rate < 0.0):
        self._input_dropout_rate = component.master.hyperparams.dropout_rate
    self._recurrent_dropout_rate = self._attrs['recurrent_dropout_rate']
    if (self._recurrent_dropout_rate < 0.0):
        self._recurrent_dropout_rate = component.master.hyperparams.recurrent_dropout_rate
    if (self._recurrent_dropout_rate < 0.0):
        self._recurrent_dropout_rate = component.master.hyperparams.dropout_rate
    tf.logging.info('[%s]    input_dropout_rate=%s    recurrent_dropout_rate=%s', component.name, self._input_dropout_rate, self._recurrent_dropout_rate)
    (layers, context_layers) = self.create_hidden_layers(component, self._hidden_layer_sizes)
    last_layer_dim = layers[(-1)].dim
    layers.append(dragnn.Layer(component, name='last_layer', dim=last_layer_dim))
    layers.append(dragnn.Layer(component, name='logits', dim=component.num_actions))
    super(BaseLSTMNetwork, self).__init__(component, init_layers=layers, init_context_layers=context_layers)
    self._params.append(tf.get_variable('weights_softmax', [last_layer_dim, component.num_actions], initializer=tf.random_normal_initializer(stddev=0.0001)))
    self._params.append(tf.get_variable('bias_softmax', [component.num_actions], initializer=tf.zeros_initializer()))
