Module ImportFrom alias Import alias identifier Import alias identifier Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assert Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assert Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str BinOpMod Str AttributeLoad NameLoad attr Assert Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assert NameLoad Str Assert AttributeLoad NameLoad attr Str With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Str For NameStore NameLoad body Assert CompareEq SubscriptLoad Call NameLoad NameLoad Index NameLoad SubscriptLoad Call NameLoad NameLoad Index NameLoad BinOpMod Str NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad AttributeLoad NameLoad attr Str Assert CompareEq NameLoad AttributeLoad NameLoad attr Str With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str NameStore body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr BinOpPow AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad Str attr BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareEq BinOpMod BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ print_function N/A numpy np N/A tensorflow tf N/A argparse N/A time N/A os six.moves cPickle utils TextLoader model Model main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser N/A N/A N/A parser add_argument --data_dir type str default data/tinyshakespeare help data directory containing input.txt N/A N/A N/A parser add_argument --save_dir type str default save help directory to store checkpointed models N/A N/A N/A parser add_argument --rnn_size type int default 128 help size of RNN hidden state N/A N/A N/A parser add_argument --num_layers type int default 2 help number of layers in the RNN N/A N/A N/A parser add_argument --model type str default lstm help rnn, gru, or lstm N/A N/A N/A parser add_argument --batch_size type int default 50 help minibatch size N/A N/A N/A parser add_argument --seq_length type int default 50 help RNN sequence length N/A N/A N/A parser add_argument --num_epochs type int default 50 help number of epochs N/A N/A N/A parser add_argument --save_every type int default 1000 help save frequency N/A N/A N/A parser add_argument --grad_clip type float default 5.0 help clip gradients at this value N/A N/A N/A parser add_argument --learning_rate type float default 0.002 help learning rate N/A N/A N/A parser add_argument --decay_rate type float default 0.97 help decay rate for rmsprop N/A N/A N/A parser add_argument --init_from type str default None help continue training from saved model at this path. Path must contain files saved by previous training process: 
                            'config.pkl'        : configuration;
                            'chars_vocab.pkl'   : vocabulary definitions;
                            'checkpoint'        : paths to model file(s) (created by tf).
                                                  Note: this file contains absolute paths, be careful when moving files around;
                            'model.ckpt-*'      : file(s) with model definition (created by tf)
                         N/A args N/A N/A parser parse_args N/A N/A train args N/A train N/A N/A args N/A N/A N/A data_loader N/A TextLoader N/A args data_dir N/A args batch_size N/A args seq_length N/A N/A args vocab_size N/A data_loader vocab_size N/A N/A N/A args init_from None N/A N/A N/A N/A N/A os path isdir N/A args init_from N/A  %s must be a a path N/A args init_from N/A N/A N/A N/A os path isfile N/A N/A N/A os path join N/A args init_from config.pkl N/A config.pkl file does not exist in path %s N/A args init_from N/A N/A N/A N/A os path isfile N/A N/A N/A os path join N/A args init_from chars_vocab.pkl N/A chars_vocab.pkl.pkl file does not exist in path %s N/A args init_from N/A ckpt N/A N/A N/A tf train get_checkpoint_state N/A args init_from N/A ckpt No checkpoint found N/A N/A ckpt model_checkpoint_path No model path found in checkpoint N/A N/A open N/A N/A N/A os path join N/A args init_from config.pkl f N/A N/A saved_model_args N/A N/A cPickle load f N/A need_be_same N/A model rnn_size num_layers seq_length N/A checkme need_be_same N/A N/A N/A N/A N/A vars saved_model_args N/A checkme N/A N/A vars args N/A checkme N/A Command line argument and saved model disagree on '%s'  checkme N/A N/A open N/A N/A N/A os path join N/A args init_from chars_vocab.pkl f N/A N/A N/A saved_chars saved_vocab N/A N/A cPickle load f N/A N/A saved_chars N/A data_loader chars Data and loaded model disagreee on character set! N/A N/A saved_vocab N/A data_loader vocab Data and loaded model disagreee on dictionary mappings! N/A N/A open N/A N/A N/A os path join N/A args save_dir config.pkl wb f N/A N/A N/A N/A cPickle dump args f N/A N/A open N/A N/A N/A os path join N/A args save_dir chars_vocab.pkl wb f N/A N/A N/A N/A cPickle dump N/A N/A data_loader chars N/A data_loader vocab f N/A model N/A Model args N/A N/A N/A tf Session sess N/A N/A N/A N/A N/A N/A tf initialize_all_variables run N/A saver N/A N/A N/A tf train Saver N/A N/A tf all_variables N/A N/A N/A args init_from None N/A N/A N/A N/A saver restore sess N/A ckpt model_checkpoint_path N/A e N/A range N/A args num_epochs N/A N/A N/A N/A sess run N/A N/A tf assign N/A model lr N/A N/A args learning_rate N/A N/A args decay_rate e N/A N/A N/A data_loader reset_batch_pointer N/A state N/A N/A N/A model initial_state eval N/A b N/A range N/A data_loader num_batches N/A N/A start N/A N/A time time N/A N/A x y N/A N/A data_loader next_batch N/A feed N/A N/A model input_data N/A model targets N/A model initial_state x y state N/A N/A train_loss state _ N/A N/A sess run N/A N/A model cost N/A model final_state N/A model train_op feed N/A end N/A N/A time time N/A N/A print N/A N/A {}/{} (epoch {}), train_loss = {:.3f}, time/batch = {:.3f} format N/A N/A e N/A data_loader num_batches b N/A N/A args num_epochs N/A data_loader num_batches e train_loss N/A end start N/A N/A N/A N/A N/A e N/A data_loader num_batches b N/A args save_every 0 N/A N/A checkpoint_path N/A N/A N/A os path join N/A args save_dir model.ckpt N/A N/A N/A saver save sess checkpoint_path global_step N/A N/A e N/A data_loader num_batches b N/A N/A print N/A N/A model saved to {} format checkpoint_path N/A N/A N/A __name__ __main__ N/A N/A N/A main