MCPcopy Create free account
hub / github.com/ant-research/CoDeF / setup

Method setup

train.py:231–244  ·  view source on GitHub ↗
(self, stage)

Source from the content-addressed store, hash-verified

229 return ret
230
231 def setup(self, stage):
232 if not self.hparams.test:
233 dataset = dataset_dict[self.hparams.dataset_name]
234 kwargs = {
235 'root_dir': self.hparams.root_dir,
236 'img_wh': tuple(self.hparams.img_wh),
237 'mask_dir': self.hparams.mask_dir,
238 'flow_dir': self.hparams.flow_dir,
239 'canonical_wh': self.hparams.canonical_wh,
240 'ref_idx': self.hparams.ref_idx,
241 'canonical_dir': self.hparams.canonical_dir
242 }
243 self.train_dataset = dataset(split='train', **kwargs)
244 self.val_dataset = dataset(split='val', **kwargs)
245
246 def configure_optimizers(self):
247 self.optimizer = get_optimizer(self.hparams, self.models_to_train)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected