def test_end_to_end_wide_deep(self): integration.run_synthetic( main=census_main.main, tmp_root=self.get_temp_dir(), extra_flags=[ '--data_dir', self.get_temp_dir(), '--model_type', 'wide_deep', '--download_if_missing=false' ], synth=False, max_train=None)
def test_end_to_end_deep(self): integration.run_synthetic( main=movielens_main.main, tmp_root=self.temp_dir, extra_flags=[ "--data_dir", self.temp_dir, "--download_if_missing=false", "--train_epochs", "1", "--epochs_between_evals", "1" ], synth=False, max_train=None)
def test_end_to_end_graph_no_dist_strat(self): """Test Keras model in legacy graph mode with 1 GPU, no dist strat.""" extra_flags = [ "-enable_eager", "false", "-distribution_strategy", "off", "-model_dir", "keras_cifar_graph_no_dist_strat", "-data_format", "channels_last", ] extra_flags = extra_flags + self._extra_flags integration.run_synthetic( main=resnet_cifar_main.run, tmp_root=self.get_temp_dir(), extra_flags=extra_flags )
def test_end_to_end_no_dist_strat(self): """Test Keras model with 1 GPU, no distribution strategy.""" config = keras_utils.get_config_proto_v1() tf.compat.v1.enable_eager_execution(config=config) extra_flags = [ "-distribution_strategy", "off", "-model_dir", "keras_cifar_no_dist_strat", "-data_format", "channels_last", ] extra_flags = extra_flags + self._extra_flags integration.run_synthetic( main=resnet_cifar_main.run, tmp_root=self.get_temp_dir(), extra_flags=extra_flags )
def test_end_to_end_graph_2_gpu(self): """Test Keras model in legacy graph mode with 2 GPUs.""" if context.num_gpus() < 2: self.skipTest( "{} GPUs are not available for this test. {} GPUs are available". format(2, context.num_gpus())) extra_flags = [ "-num_gpus", "2", "-enable_eager", "false", "-distribution_strategy", "mirrored", "-model_dir", "keras_cifar_graph_2_gpu", ] extra_flags = extra_flags + self._extra_flags integration.run_synthetic( main=resnet_cifar_main.run, tmp_root=self.get_temp_dir(), extra_flags=extra_flags )
def test_end_to_end_2_gpu(self): """Test Keras model with 2 GPUs.""" config = keras_utils.get_config_proto_v1() tf.compat.v1.enable_eager_execution(config=config) if context.num_gpus() < 2: self.skipTest( "{} GPUs are not available for this test. {} GPUs are available". format(2, context.num_gpus())) extra_flags = [ "-num_gpus", "2", "-distribution_strategy", "mirrored", "-model_dir", "keras_cifar_2_gpu", ] extra_flags = extra_flags + self._extra_flags integration.run_synthetic( main=resnet_cifar_main.run, tmp_root=self.get_temp_dir(), extra_flags=extra_flags )
def test_imagenet_end_to_end_synthetic_v2_huge(self): integration.run_synthetic(main=imagenet_main.main, tmp_root=self.get_temp_dir(), extra_flags=['-v', '2', '-rs', '200'])
def test_cifar10_end_to_end_synthetic_v2(self): integration.run_synthetic(main=cifar10_main.main, tmp_root=self.get_temp_dir(), extra_flags=['-v', '2'])
def test_imagenet_end_to_end_synthetic_v1_tiny(self): integration.run_synthetic(main=dicom_main.main, tmp_root=self.get_temp_dir(), extra_flags=['-v', '1', '-rs', '18'])