示例#1
0
 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))