Skip to content

Questions about function test_after_training() #2

@wisdomGEsLA

Description

@wisdomGEsLA

Sorry to be a bother!
When I try to apply my own model to this code, I find that there may be no test using test data after traing if the length of parameter list is not 1, i.e no calling test_after_training() .
So if I want to conduct a test after training under each parameter combination, should I add an test_after_training() after main like this?

def main_IPS():
    # IPS_lambda_list = [10, 15, 20, 25, 30, 35, 40, 45, 50]
    IPS_lambda_list = [opt.IPS_lambda]
    if len(IPS_lambda_list) == 1:
        opt.show_performance = True
        main()
        if not opt.test_only:
            test_after_training()
    else:
        opt.show_performance = False
        for opt.IPS_lambda in IPS_lambda_list:
            print('\nIPS_lambda = %d' % opt.IPS_lambda)
            with open(opt.log_path, 'a+') as f_log:
                f_log.write('\nIPS_lambda = %d\t' % opt.IPS_lambda)
            main()
            test_after_training()

or maybe I'm just misunderstanding the code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions