Parse arguments.

def parse_args():
    """
    Parse arguments.
    """
    parser = argparse.ArgumentParser()
    parser.add_argument('--gpu-id', type=int, default=0,
                        help='GPU id (-1 means CPU)')
    parser.add_argument('--train-file', default='snli_1.0/snli_1.0_train.txt',
                        help='training set file')
    parser.add_argument('--test-file', default='snli_1.0/snli_1.0_dev.txt',
                        help='validation set file')
    parser.add_argument('--max-num-examples', type=int, default=-1,
                        help='maximum number of examples to load (for debugging)')
    parser.add_argument('--batch-size', type=int, default=32,
                        help='batch size')
    parser.add_argument('--print-interval', type=int, default=20,
                        help='the interval of two print')
    parser.add_argument('--mode', choices=['train', 'test'], default='train',
                        help='train or test')
    parser.add_argument('--lr', type=float, default=0.025,
                        help='learning rate')
    parser.add_argument('--epochs', type=int, default=300,
                        help='maximum number of epochs to train')
    parser.add_argument('--embedding', default='glove',
                        help='word embedding type')
    parser.add_argument('--embedding-source', default='glove.840B.300d',
                        help='embedding file source')
    parser.add_argument('--embedding-size', type=int, default=300,
                        help='size of pretrained word embedding')
    parser.add_argument('--hidden-size', type=int, default=200,
                        help='hidden layer size')
    parser.add_argument('--output-dir', default='./output',
                        help='directory for all experiment output')
    parser.add_argument('--model-dir', default='./output',
                        help='directory to load model')
    parser.add_argument('--seed', type=int, default=0,
                        help='random seed')
    parser.add_argument('--dropout', type=float, default=0.,
                        help='dropout rate')
    parser.add_argument('--weight-decay', type=float, default=0.,
                        help='l2 regularization weight')
    parser.add_argument('--intra-attention', action='store_true',
                        help='use intra-sentence attention')

    return parser.parse_args()