Class PTBModel (object)
class PTBModel(object):
"""The PTB model."""
def __init__(self, is_training, config, input_):
"""content emitted"""
def _build_rnn_graph(self, inputs, config, is_training):
"""content emitted"""
def _build_rnn_graph_cudnn(self, inputs, config, is_training):
"""content emitted"""
def _get_lstm_cell(self, config, is_training):
"""content emitted"""
def _build_rnn_graph_lstm(self, inputs, config, is_training):
"""content emitted"""
def assign_lr(self, session, lr_value):
session.run(self._lr_update, feed_dict={self._new_lr: lr_value})
def export_ops(self, name):
"""content emitted"""
def import_ops(self):
"""content emitted"""
@property
def input(self):
return self._input
@property
def initial_state(self):
return self._initial_state
@property
def cost(self):
return self._cost
@property
def final_state(self):
return self._final_state
@property
def lr(self):
return self._lr
@property
def train_op(self):
return self._train_op
@property
def initial_state_name(self):
return self._initial_state_name
@property
def final_state_name(self):
return self._final_state_name