def __init__(self, hidden_size, num_steps, num_layers=2, init_scale=0.1, dropout=None):
    super(SimpleLSTMRNN, self).__init__()
    self._hidden_size = hidden_size
    self._num_layers = num_layers
    self._init_scale = init_scale
    self._dropout = dropout
    self._num_steps = num_steps
    self.cell_array = []
    self.hidden_array = []
    self.weight_1_arr = []
    self.weight_2_arr = []
    self.bias_arr = []
    self.mask_array = []
    for i in range(self._num_layers):
        weight_1 = self.create_parameter(attr=fluid.ParamAttr(initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale)), shape=[(self._hidden_size * 2), (self._hidden_size * 4)], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale))
        self.weight_1_arr.append(self.add_parameter(('w_%d' % i), weight_1))
        bias_1 = self.create_parameter(attr=fluid.ParamAttr(initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale)), shape=[(self._hidden_size * 4)], dtype='float32', default_initializer=fluid.initializer.Constant(0.0))
        self.bias_arr.append(self.add_parameter(('b_%d' % i), bias_1))
def __init__(self, hidden_size, num_steps, num_layers=2, init_scale=0.1, dropout=None):
    super(SimpleLSTMRNN, self).__init__()
    self._hidden_size = hidden_size
    self._num_layers = num_layers
    self._init_scale = init_scale
    self._dropout = dropout
    self._num_steps = num_steps
    self.cell_array = []
    self.hidden_array = []
    self.weight_1_arr = []
    self.weight_2_arr = []
    self.bias_arr = []
    self.mask_array = []
    for i in range(self._num_layers):
        weight_1 = self.create_parameter(attr=fluid.ParamAttr(initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale)), shape=[(self._hidden_size * 2), (self._hidden_size * 4)], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale))
        self.weight_1_arr.append(self.add_parameter(('w_%d' % i), weight_1))
        bias_1 = self.create_parameter(attr=fluid.ParamAttr(initializer=fluid.initializer.UniformInitializer(low=(- self._init_scale), high=self._init_scale)), shape=[(self._hidden_size * 4)], dtype='float32', default_initializer=fluid.initializer.Constant(0.0))
        self.bias_arr.append(self.add_parameter(('b_%d' % i), bias_1))