コード例 #1
0
    def get_compression_parser(self, config_path):
        parser = argparse.ArgumentParser(
            parents=[compression_args_parser(config_path)], add_help=False)
        parser.add_argument(
            '--classes',
            required=True,
            help='Comma-separated list of classes (e.g. "cat,dog,mouse").')

        return parser
コード例 #2
0
 def get_compression_parser(self, config_path):
     # Please, note that for image classification compression
     # batch_size should be set from the compression config file,
     # not from the command line arguments
     # (smaller batch size often gives better results with "regularization by noise")
     parser = argparse.ArgumentParser(parents=[
         compression_args_parser(config_path, with_batch_size=False)
     ],
                                      add_help=False)
     parser = self._add_aux_weights_load_arg(parser)
     parser = self._add_classes_arg(parser)
     return parser
コード例 #3
0
 def get_compression_parser(self, config_path):
     return compression_args_parser(config_path)
コード例 #4
0
 def get_compression_parser(self, config_path):
     parser = argparse.ArgumentParser(parents=[compression_args_parser(config_path)], add_help=False)
     return self._add_classes_arg(parser)