()
return args
Parse commandline.
Parse commandline.
Parse commandline .
def get_args():
    """Parse commandline."""
    parser = argparse.ArgumentParser()
    parser.add_argument('--input-dim', type=int, dest='input_dim',
                        help='input dim', default=40)
    parser.add_argument('--batch', type=int, dest='batch',
                        help='batch size', default=1)
    parser.add_argument('--left-context', type=int, dest='left_context',
                        help='left context', required=True)
    parser.add_argument('--right-context', type=int, dest='right_context',
                        help='right context size', required=True)
    parser.add_argument('--chunk-size', type=int, dest='chunk_size',
                        help='chunk size', required=True)
    parser.add_argument("--kaldi-file", required=True, type=str,
                        dest="kaldi_data_file",
                        help="kaldi data file path")
    parser.add_argument("--mace-file", required=True, type=str,
                        dest="mace_data_file",
                        help="mace data file path")
    args = parser.parse_args()
    return args
def get_args ( ) : parser = argparse . ArgumentParser ( ) parser . add_argument ( '--input-dim' , type = int , dest = 'input_dim' , help = 'input dim' , default = 40 ) parser . add_argument ( '--batch' , type = int , dest = 'batch' , help = 'batch size' , default = 1 ) parser . add_argument ( '--left-context' , type = int , dest = 'left_context' , help = 'left context' , required = True ) parser . add_argument ( '--right-context' , type = int , dest = 'right_context' , help = 'right context size' , required = True ) parser . add_argument ( '--chunk-size' , type = int , dest = 'chunk_size' , help = 'chunk size' , required = True ) parser . add_argument ( "--kaldi-file" , required = True , type = str , dest = "kaldi_data_file" , help = "kaldi data file path" ) parser . add_argument ( "--mace-file" , required = True , type = str , dest = "mace_data_file" , help = "mace data file path" ) args = parser . parse_args ( ) return args