(self)
return parse_args
init parser
init parser
init parser
def _init_parser(self):
        """
            init parser
        """
        parser = argparse.ArgumentParser(description='AutoDL Parser',
                                         prog='AutoDL')
        parser.add_argument('-v', '--version', action='version',
                            version='%(prog)s 0.1')
        parser.add_argument('--num_nodes', dest="num_nodes", nargs="?",
                            type=int, const=10, default=10,
                            help="number of nodes")
        parser.add_argument('--num_tokens', dest="num_tokens", nargs="?",
                            type=int, const=10, default=10,
                            help="number of tokens")
        parser.add_argument('--learning_rate', dest="learning_rate", nargs="?",
                            type=float, default=1e-3,
                            help="learning rate")
        parser.add_argument('--batch_size', dest="batch_size", nargs="?",
                            type=int, const=10, default=10, help="batch size")
        parser.add_argument('--num_models', dest="num_models", nargs="?",
                            type=int, const=32000, default=32000,
                            help="maximum number of models sampled")
        parser.add_argument('--early_stop', dest="early_stop", nargs="?",
                            type=int, const=20, default=20, help="early stop")
        parser.add_argument('--log_dir', dest="log_dir", nargs="?", type=str,
                            const="./log", default="./log",
                            help="directory of log")
        parser.add_argument('--input_size', dest="input_size", nargs="?",
                            type=int, const=10, default=10, help="input size")
        parser.add_argument('--hidden_size', dest="hidden_size", nargs="?",
                            type=int, const=64, default=64, help="hidden size")
        parser.add_argument('--num_layers', dest="num_layers", nargs="?",
                            type=int, const=2, default=2, help="num layers")
        parser.add_argument('--bl_decay', dest="bl_decay", nargs="?",
                            type=float, const=0.9, default=0.9,
                            help="base line decay")
        # inception train config
        parser.add_argument('--data_path', dest="data_path", nargs="?",
                            type=str, default="./cifar/pickle-cifar-10",
                            help="path of data files")
        parser.add_argument('--chunk_size', dest="chunk_size", nargs="?",
                            type=int, const=100, default=100,
                            help="chunk size")
        parse_args = parser.parse_args()
        return parse_args
def _init_parser ( self ) : parser = argparse . ArgumentParser ( description = 'AutoDL Parser' , prog = 'AutoDL' ) parser . add_argument ( '-v' , '--version' , action = 'version' , version = '%(prog)s 0.1' ) parser . add_argument ( '--num_nodes' , dest = "num_nodes" , nargs = "?" , type = int , const = 10 , default = 10 , help = "number of nodes" ) parser . add_argument ( '--num_tokens' , dest = "num_tokens" , nargs = "?" , type = int , const = 10 , default = 10 , help = "number of tokens" ) parser . add_argument ( '--learning_rate' , dest = "learning_rate" , nargs = "?" , type = float , default = 1e-3 , help = "learning rate" ) parser . add_argument ( '--batch_size' , dest = "batch_size" , nargs = "?" , type = int , const = 10 , default = 10 , help = "batch size" ) parser . add_argument ( '--num_models' , dest = "num_models" , nargs = "?" , type = int , const = 32000 , default = 32000 , help = "maximum number of models sampled" ) parser . add_argument ( '--early_stop' , dest = "early_stop" , nargs = "?" , type = int , const = 20 , default = 20 , help = "early stop" ) parser . add_argument ( '--log_dir' , dest = "log_dir" , nargs = "?" , type = str , const = "./log" , default = "./log" , help = "directory of log" ) parser . add_argument ( '--input_size' , dest = "input_size" , nargs = "?" , type = int , const = 10 , default = 10 , help = "input size" ) parser . add_argument ( '--hidden_size' , dest = "hidden_size" , nargs = "?" , type = int , const = 64 , default = 64 , help = "hidden size" ) parser . add_argument ( '--num_layers' , dest = "num_layers" , nargs = "?" , type = int , const = 2 , default = 2 , help = "num layers" ) parser . add_argument ( '--bl_decay' , dest = "bl_decay" , nargs = "?" , type = float , const = 0.9 , default = 0.9 , help = "base line decay" ) # inception train config parser . add_argument ( '--data_path' , dest = "data_path" , nargs = "?" , type = str , default = "./cifar/pickle-cifar-10" , help = "path of data files" ) parser . add_argument ( '--chunk_size' , dest = "chunk_size" , nargs = "?" , type = int , const = 100 , default = 100 , help = "chunk size" ) parse_args = parser . parse_args ( ) return parse_args