def create_files(self): self.write_config(self.config, self.post_config, 'alignment.config') self.alignment_flow.write_to_file('alignment.flow') util.write_paths_to_file(self.out_alignment_bundle, self.out_single_alignment_caches.values()) if self.word_boundaries: util.write_paths_to_file(self.word_boundary_bundle, self.single_word_boundary_caches.values()) extra_code = 'export TF_DEVICE="{0}"'.format('gpu' if self.use_gpu else 'cpu') self.write_run_script(self.exe, 'alignment.config', extra_code=extra_code)
def create_files(self): self.write_config(self.config, self.post_config, "linear-segmentation.config") self.linear_alignment_flow.write_to_file("linear-alignment.flow") self.write_run_script(self.exe, "linear-segmentation.config", "accumulate.sh") if self.save_alignment: util.write_paths_to_file(self.out_alignment_bundle, self.single_alignment_caches.values())
def create_files(self): self.write_config(self.config, self.post_config, "recognition.config") self.feature_flow.write_to_file("feature.flow") util.write_paths_to_file(self.out_lattice_bundle, self.out_single_lattice_caches.values()) extra_code = ( 'export TF_DEVICE="{0}"'.format("gpu" if self.use_gpu else "cpu")) # sometimes crash without this if not self.use_gpu: extra_code += "\nexport CUDA_VISIBLE_DEVICES=" extra_code += "\nexport OMP_NUM_THREADS=%i" % self.rqmt["cpu"] self.write_run_script(self.exe, "recognition.config", extra_code=extra_code)
def create_files(self): self.write_config(self.dump_config, self.dump_post_config, "dump.config") self.dump_flow.write_to_file("dump.flow") self.write_run_script(self.exe, "dump.config", filename="dump.sh") os.mkdir("dump") self.write_config(self.convert_config, self.convert_post_config, "convert.config") self.convert_flow.write_to_file("convert.flow") self.write_run_script(self.exe, "convert.config", filename="convert.sh") util.write_paths_to_file(self.out_feature_bundle, self.out_single_feature_caches.values())
def create_files(self): self.write_config(self.config, self.post_config, "pruning.config") util.write_paths_to_file( self.out_lattice_bundle, self.out_single_lattice_caches.values() ) self.write_run_script(self.exe, "pruning.config")
def create_files(self): self.write_config(self.config, self.post_config, "dump.config") self.dump_flow.write_to_file("dump.flow") util.write_paths_to_file(self.out_alignment_bundle, self.out_single_alignment_caches.values()) self.write_run_script(self.exe, "dump.config")