def __init__(<EOL>self,<EOL>options: dict,<EOL>weight_file: str,<EOL>use_character_inputs=True,<EOL>embedding_weight_file=None,<EOL>max_batch_size=<NUM_LIT>):
if not use_character_inputs:<EOL><INDENT>if embedding_weight_file is None:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>self._options = options<EOL>self._weight_file = weight_file<EOL>self._embedding_weight_file = embedding_weight_file<EOL>self._use_character_inputs = use_character_inputs<EOL>self._max_batch_size = max_batch_size<EOL>self._ops = {}<EOL>self._graphs = {}<EOL>
Creates the language model computational graph and loads weights

Two options for input type:
    (1) To use character inputs (paired with Batcher)
        pass use_character_inputs=True, and ids_placeholder
        of shape (None, None, max_characters_per_token)
        to __call__
    (2) To use token ids as input (paired with TokenBatcher),
        pass use_character_inputs=False and ids_placeholder
        of shape (None, None) to __call__.
        In this case, embedding_weight_file is also required input

options_file: location of the json formatted file with
              LM hyperparameters
weight_file: location of the hdf5 file with LM weights
use_character_inputs: if True, then use character ids as input,
    otherwise use token ids
max_batch_size: the maximum allowable batch size