def __init__(self, hidden_size, vocab_size, num_layers=2, num_steps=20, init_scale=0.1, dropout=None):
    super(PtbModel, self).__init__()
    self.hidden_size = hidden_size
    self.vocab_size = vocab_size
    self.init_scale = init_scale
    self.num_layers = num_layers
    self.num_steps = num_steps
    self.dropout = dropout
    self.simple_lstm_rnn = SimpleLSTMRNN(hidden_size, num_steps, num_layers=num_layers, init_scale=init_scale, dropout=dropout)
    self.embedding = Embedding(size=[vocab_size, hidden_size], dtype='float32', is_sparse=False, param_attr=fluid.ParamAttr(name='embedding_para', initializer=fluid.initializer.UniformInitializer(low=(- init_scale), high=init_scale)))
    self.softmax_weight = self.create_parameter(attr=fluid.ParamAttr(), shape=[self.hidden_size, self.vocab_size], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self.init_scale), high=self.init_scale))
    self.softmax_bias = self.create_parameter(attr=fluid.ParamAttr(), shape=[self.vocab_size], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self.init_scale), high=self.init_scale))
def __init__(self, hidden_size, vocab_size, num_layers=2, num_steps=20, init_scale=0.1, dropout=None):
    super(PtbModel, self).__init__()
    self.hidden_size = hidden_size
    self.vocab_size = vocab_size
    self.init_scale = init_scale
    self.num_layers = num_layers
    self.num_steps = num_steps
    self.dropout = dropout
    self.simple_lstm_rnn = SimpleLSTMRNN(hidden_size, num_steps, num_layers=num_layers, init_scale=init_scale, dropout=dropout)
    self.embedding = Embedding(size=[vocab_size, hidden_size], dtype='float32', is_sparse=False, param_attr=fluid.ParamAttr(name='embedding_para', initializer=fluid.initializer.UniformInitializer(low=(- init_scale), high=init_scale)))
    self.softmax_weight = self.create_parameter(attr=fluid.ParamAttr(), shape=[self.hidden_size, self.vocab_size], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self.init_scale), high=self.init_scale))
    self.softmax_bias = self.create_parameter(attr=fluid.ParamAttr(), shape=[self.vocab_size], dtype='float32', default_initializer=fluid.initializer.UniformInitializer(low=(- self.init_scale), high=self.init_scale))