Merge pull request #910 from PaddlePaddle/eval

[asr]trainer eval when not train
pull/915/head
Hui Zhang 3 years ago committed by GitHub
commit 0674d9ec24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_export()
with exp.eval():
exp.setup()
exp.run_export()
def main(config, args):

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_test()
with exp.eval():
exp.setup()
exp.run_test()
def main(config, args):

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = ExportTester(config, args)
exp.setup()
exp.run_test()
with exp.eval():
exp.setup()
exp.run_test()
def main(config, args):

@ -167,8 +167,9 @@ def check(audio_file):
def main_sp(config, args):
exp = DeepSpeech2Tester_hub(config, args)
exp.setup()
exp.run_test()
with exp.eval():
exp.setup()
exp.run_test()
def main(config, args):

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_align()
with exp.eval():
exp.setup()
exp.run_align()
def main(config, args):

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_export()
with exp.eval():
exp.setup()
exp.run_export()
def main(config, args):

@ -24,8 +24,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_test()
with exp.eval():
exp.setup()
exp.run_test()
def main(config, args):

@ -29,14 +29,14 @@ model_test_alias = {
def main_sp(config, args):
class_obj = dynamic_import(args.model_name, model_test_alias)
exp = class_obj(config, args)
exp.setup()
if args.run_mode == 'test':
exp.run_test()
elif args.run_mode == 'export':
exp.run_export()
elif args.run_mode == 'align':
exp.run_align()
with exp.eval():
exp.setup()
if args.run_mode == 'test':
exp.run_test()
elif args.run_mode == 'export':
exp.run_export()
elif args.run_mode == 'align':
exp.run_align()
def main(config, args):

@ -20,8 +20,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_export()
with exp.eval():
exp.setup()
exp.run_export()
def main(config, args):

@ -24,8 +24,9 @@ from deepspeech.utils.utility import print_arguments
def main_sp(config, args):
exp = Tester(config, args)
exp.setup()
exp.run_test()
with exp.eval():
exp.setup()
exp.run_test()
def main(config, args):

Loading…
Cancel
Save