예제 #1
0
파일: desc.py 프로젝트: hidetana18/open_lth
 def str_to_step(self, s: str, pretrain: bool = False) -> Step:
     dataset_hparams = self.pretrain_dataset_hparams if pretrain else self.dataset_hparams
     iterations_per_epoch = datasets_registry.iterations_per_epoch(
         dataset_hparams)
     return Step.from_str(s, iterations_per_epoch)
예제 #2
0
파일: desc.py 프로젝트: sahibsin/Pruning
 def end_step(self):
     iterations_per_epoch = datasets_registry.iterations_per_epoch(self.dataset_hparams)
     return Step.from_str(self.training_hparams.training_steps, iterations_per_epoch)
예제 #3
0
 def test_iterations_per_epoch(self):
     self.assertEqual(registry.iterations_per_epoch(self.dataset_hparams), 1000)
     self.dataset_hparams.subsample_fraction = 0.1
     self.assertEqual(registry.iterations_per_epoch(self.dataset_hparams), 100)
예제 #4
0
파일: desc.py 프로젝트: sahibsin/Pruning
 def str_to_step(self, s: str) -> Step:
     return Step.from_str(s, datasets_registry.iterations_per_epoch(self.dataset_hparams))