@@ -0,0 +1,1088 @@
+import os%0Aimport pickle%0A%0A%0Adef restore_hyper_params(file_path):%0A    '''%0A    Restore serialized hyper params%0A    Inputs:%0A    file_path: path to checkpoint dir%0A    '''%0A    file_path = os.path.join(file_path, %22hyperparams.p%22)%0A    with open(file_path, 'rb') as handle:%0A        return pickle.load(handle)%0A%0Adef save_hyper_params(checkpoint_dir, FLAGS):%0A    '''%0A    Serialize hyper parameters fopr checkpoint restoration later%0A    Inputs:%0A    checkpoint_dir%0A    FLAGS:%0A    '''%0A    dic = %7B%22vocab_size%22 : FLAGS.vocab_size,%0A           %22hidden_size%22 : FLAGS.hidden_size,%0A           %22dropout%22 : FLAGS.dropout,%0A           %22grad_clip%22 : FLAGS.grad_clip,%0A           %22num_layers%22 : FLAGS.num_layers,%0A           %22learning_rate%22 : FLAGS.learning_rate,%0A           %22lr_decay_factor%22 : FLAGS.lr_decay_factor,%0A           %22max_source_length%22: FLAGS.max_source_length,%0A           %22max_target_length%22: FLAGS.max_target_length,%0A           %22convo_limits%22: FLAGS.convo_limits%0A           %7D%0A%0A    path = os.path.join(checkpoint_dir, %22hyperparams.p%22)%0A    with open(path, 'wb') as handle:%0A        pickle.dump(dic, handle)%0A

Create hyperparamutils.py