def build_transform(cfg): tfs = [] for icfg in cfg: tf = build_from_cfg(icfg, TRANSFORMS) tfs.append(tf) aug = Compose(tfs) return aug
def build_backbone(cfg, default_args=None): backbone = build_from_cfg(cfg, BACKBONES, default_args) return backbone
def build_model(cfg, default_args=None): model = build_from_cfg(cfg, MODELS, default_args) return model
def build_dataloader(cfg, default_args): loader = build_from_cfg(cfg, torch_data, default_args, 'module') return loader
def build_dataset(cfg, default_args=None): dataset = build_from_cfg(cfg, DATASETS, default_args) return dataset