fix style

This commit is contained in:
PingFeng Luo 2021-12-30 18:43:47 +08:00
parent f49de8e8e0
commit 8b8cf6c68e
3 changed files with 16 additions and 12 deletions

View File

@ -336,19 +336,21 @@ class AishellAsrDataModule:
)
return test_dl
@lru_cache()
def train_cuts(self) -> CutSet:
logging.info("About to get train cuts")
cuts_train = load_manifest(self.args.manifest_dir / "cuts_train.json.gz")
cuts_train = load_manifest(self.args.manifest_dir /
"cuts_train.json.gz")
return cuts_train
@lru_cache()
def valid_cuts(self) -> CutSet:
logging.info("About to get dev cuts")
return load_manifest(self.args.manifest_dir / "cuts_dev.json.gz")
return load_manifest(self.args.manifest_dir /
"cuts_dev.json.gz")
@lru_cache()
def test_cuts(self) -> List[CutSet]:
logging.info("About to get test cuts")
return load_manifest(self.args.manifest_dir / f"cuts_test.json.gz")
return load_manifest(self.args.manifest_dir /
"cuts_test.json.gz")

View File

@ -366,6 +366,8 @@ def main():
model.eval()
aishell = AishellAsrDataModule(args)
test_cuts = aishell.test_cuts()
test_dl = aishell.test_dataloaders(test_cuts)
# CAUTION: `test_sets` is for displaying only.
# If you want to skip test-clean, you have to skip
# it inside the for loop. That is, use