From 1c81d629c42dacc1233492af9e267108e09e1bf0 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Thu, 6 Oct 2022 10:17:32 +0530 Subject: [PATCH 1/3] num steps --- enhancer/cli/train.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/enhancer/cli/train.py b/enhancer/cli/train.py index cb3c7c1..5ad61b1 100644 --- a/enhancer/cli/train.py +++ b/enhancer/cli/train.py @@ -32,7 +32,7 @@ def main(config: DictConfig): loss=parameters.get("loss"), metric=parameters.get("metric"), ) - + direction = model.valid_monitor checkpoint = ModelCheckpoint( dirpath="./model", @@ -79,6 +79,11 @@ def main(config: DictConfig): ) if os.path.isfile(saved_location): logger.experiment.log_artifact(logger.run_id, saved_location) + logger.experiment.log_param(logger.run_id, "num_train_steps_per_epoch", + dataset.train__len__() / dataset.batch_size) + logger.experiment.log_param(logger.run_id, "num_valid_steps_per_epoch", + dataset.val__len__() / dataset.batch_size) + if __name__ == "__main__": From b071bb171d1caf5e986d25d07292230e4dc51748 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Thu, 6 Oct 2022 10:18:31 +0530 Subject: [PATCH 2/3] log num steps --- enhancer/cli/train.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/enhancer/cli/train.py b/enhancer/cli/train.py index 5ad61b1..a9c66e0 100644 --- a/enhancer/cli/train.py +++ b/enhancer/cli/train.py @@ -32,7 +32,7 @@ def main(config: DictConfig): loss=parameters.get("loss"), metric=parameters.get("metric"), ) - + direction = model.valid_monitor checkpoint = ModelCheckpoint( dirpath="./model", @@ -79,11 +79,16 @@ def main(config: DictConfig): ) if os.path.isfile(saved_location): logger.experiment.log_artifact(logger.run_id, saved_location) - logger.experiment.log_param(logger.run_id, "num_train_steps_per_epoch", - dataset.train__len__() / dataset.batch_size) - logger.experiment.log_param(logger.run_id, "num_valid_steps_per_epoch", - dataset.val__len__() / dataset.batch_size) - + logger.experiment.log_param( + logger.run_id, + "num_train_steps_per_epoch", + dataset.train__len__() / dataset.batch_size, + ) + logger.experiment.log_param( + logger.run_id, + "num_valid_steps_per_epoch", + dataset.val__len__() / dataset.batch_size, + ) if __name__ == "__main__": From 3083e1ad7afe3ce277d9791d4631ca4039d39011 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Thu, 6 Oct 2022 10:18:58 +0530 Subject: [PATCH 3/3] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97e0c7e..8ade768 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ Enhancer is a Pytorch-based opensource toolkit for speech enhancement. It is des * Various pretrained models nicely integrated with huggingface that users can select and use without any hastle. * Ability to train and validation your own custom speech enhancement models with just under 10 lines of code! -* A command line tool that facilitates training of highly customisable speech enhacement models from the terminal itself! \ No newline at end of file +* A command line tool that facilitates training of highly customisable speech enhacement models from the terminal itself!