def main(argv): parser = get_argument_parser() args = parser.parse_args(args=argv) config = Config.from_json(args.config) config.update_from_args(args, parser) if config.dist_url == "env://": config.update_from_env() configure_paths(config) source_root = Path(__file__).absolute().parents[2] # nncf root create_code_snapshot(source_root, osp.join(config.log_dir, "snapshot.tar.gz")) if config.seed is not None: warnings.warn('You have chosen to seed training. ' 'This will turn on the CUDNN deterministic setting, ' 'which can slow down your training considerably! ' 'You may see unexpected behavior when restarting ' 'from checkpoints.') config.execution_mode = get_execution_mode(config) if not is_binarization(config): start_worker(main_worker, config) else: from examples.classification.binarization_worker import main_worker_binarization start_worker(main_worker_binarization, config)
def main(argv): parser = get_argument_parser() args = parser.parse_args(args=argv) config = Config.from_json(args.config) config.update_from_args(args, parser) configure_paths(config) source_root = Path(__file__).absolute().parents[2] # nncf root create_code_snapshot(source_root, osp.join(config.log_dir, "snapshot.tar.gz")) config.execution_mode = get_execution_mode(config) if config.dataset_dir is not None: config.train_imgs = config.train_anno = config.test_imgs = config.test_anno = config.dataset_dir start_worker(main_worker, config)
def main(argv): parser = get_argument_parser() config = get_config_from_argv(argv, parser) serialize_config(config, config.log_dir) nncf_root = Path(__file__).absolute().parents[2] create_code_snapshot(nncf_root, os.path.join(config.log_dir, "snapshot.tar.gz")) if 'train' in config.mode or 'test' in config.mode: train_test_export(config) elif 'export' in config.mode: export(config)
def main(argv): parser = get_argument_parser() config = get_config_from_argv(argv, parser) #config['eager_mode'] = True serialize_config(config, config.log_dir) print('*'*50) print(f'Using model type: {config.model_type}') print('*'*50) nncf_root = Path(__file__).absolute().parents[2] create_code_snapshot(nncf_root, osp.join(config.log_dir, "snapshot.tar.gz")) if 'train' in config.mode or 'test' in config.mode: train_test_export(config) elif 'export' in config.mode: export(config)