diff --git a/examples/parallelwave_gan/baker/train.py b/examples/parallelwave_gan/baker/train.py index 830bc83..d424c5d 100644 --- a/examples/parallelwave_gan/baker/train.py +++ b/examples/parallelwave_gan/baker/train.py @@ -171,8 +171,9 @@ def train_sp(args, config): updater, stop_trigger=(10, "iteration"), # PROFILING out=output_dir, ) - with paddle.fluid.profiler.cuda_profiler( - str(output_dir / "profiler.log")) as prof: + with paddle.fluid.profiler.profiler('All', 'total', + str(output_dir / "profiler.log"), + 'Default') as prof: trainer.run() diff --git a/parakeet/utils/h5_utils.py b/parakeet/utils/h5_utils.py index 229fe8d..7cdbfc6 100644 --- a/parakeet/utils/h5_utils.py +++ b/parakeet/utils/h5_utils.py @@ -48,7 +48,8 @@ def read_hdf5(filename: Union[Path, str], dataset_name: str) -> Any: f"There is no such a data in hdf5 file. ({dataset_name})") sys.exit(1) - hdf5_data = hdf5_file[dataset_name][()] # a special syntax of h5py + # [()]: a special syntax of h5py to get the dataset as-is + hdf5_data = hdf5_file[dataset_name][()] hdf5_file.close() return hdf5_data