Disable side-effects when importing train/evaluate scripts

This commit is contained in:
Reuben Morais 2021-08-26 11:59:54 +02:00
parent b62fa678e6
commit 8458352255
2 changed files with 3 additions and 3 deletions

View File

@ -27,8 +27,6 @@ from .util.evaluate_tools import calculate_and_print_report, save_samples_json
from .util.feeding import create_dataset
from .util.helpers import check_ctcdecoder_version
check_ctcdecoder_version()
def sparse_tensor_value_to_texts(value, alphabet):
r"""
@ -179,6 +177,7 @@ def test():
def main():
initialize_globals_from_cli()
check_ctcdecoder_version()
if not Config.test_files:
raise RuntimeError(

View File

@ -64,7 +64,6 @@ from .util.io import (
remove_remote,
)
check_ctcdecoder_version()
# Accuracy and Loss
# =================
@ -241,6 +240,8 @@ def average_gradients(tower_gradients):
def early_training_checks():
check_ctcdecoder_version()
# Check for proper scorer early
if Config.scorer_path:
scorer = Scorer(