MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / get_data

Function get_data

CV/SemSegPaddleDG/train.py:107–119  ·  view source on GitHub ↗
(cfg, split, base_size, crop_size, batch_size=1, gpu_num=1)

Source from the content-addressed store, hash-verified

105
106
107def get_data(cfg, split, base_size, crop_size, batch_size=1, gpu_num=1):
108 if cfg.DATASET.DATASET_NAME.lower() in ['cityscapes', 'pascal_context']:
109 dataset_name = cfg.DATASET.DATASET_NAME.lower()
110 data_loader = globals()[dataset_name + '_' + split]
111 return data_loader(root=cfg.DATASET.DATA_ROOT,
112 base_size=base_size,
113 crop_size=crop_size,
114 scale=True,
115 xmap=True,
116 batch_size=batch_size,
117 gpu_num=gpu_num)
118 else:
119 raise ValueError('Dataset is not supported, please check!')
120
121def get_loss_weight(cfg):
122 if cfg.DATASET.DATASET_NAME.lower() == 'cityscapes':

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected