@@ -24,18 +26,25 @@ from utils import load_vocab, convert_example
...
@@ -24,18 +26,25 @@ from utils import load_vocab, convert_example
# yapf: disable
# yapf: disable
parser=argparse.ArgumentParser(__doc__)
parser=argparse.ArgumentParser(__doc__)
parser.add_argument("--epochs",type=int,default=3,help="Number of epoches for training.")
parser.add_argument("--epochs",type=int,default=10,help="Number of epoches for training.")
parser.add_argument('--use_gpu',type=eval,default=False,help="Whether use GPU for training, input should be True or False")
parser.add_argument('--use_gpu',type=eval,default=False,help="Whether use GPU for training, input should be True or False")
parser.add_argument("--lr",type=float,default=5e-4,help="Learning rate used to train.")
parser.add_argument("--lr",type=float,default=5e-5,help="Learning rate used to train.")
parser.add_argument("--save_dir",type=str,default='chekpoints/',help="Directory to save model checkpoint")
parser.add_argument("--save_dir",type=str,default='chekpoints/',help="Directory to save model checkpoint")
parser.add_argument("--batch_size",type=int,default=64,help="Total examples' number of a batch for training.")
parser.add_argument("--batch_size",type=int,default=64,help="Total examples' number of a batch for training.")
parser.add_argument("--vocab_path",type=str,default="./word_dict.txt",help="The directory to dataset.")
parser.add_argument("--vocab_path",type=str,default="./senta_word_dict.txt",help="The directory to dataset.")
parser.add_argument('--network',type=str,default="bilstm_attn",help="Which network you would like to choose bow, lstm, bilstm, gru, bigru, rnn, birnn, bilstm_attn and textcnn?")
parser.add_argument('--network',type=str,default="bilstm_attn",help="Which network you would like to choose bow, lstm, bilstm, gru, bigru, rnn, birnn, bilstm_attn and textcnn?")
parser.add_argument("--init_from_ckpt",type=str,default=None,help="The path of checkpoint to be loaded.")
parser.add_argument("--init_from_ckpt",type=str,default=None,help="The path of checkpoint to be loaded.")