(model, test_prog, test_vars, exe, data_list)
return objs.avg
test
test
test
def test(model, test_prog, test_vars, exe, data_list):
    """
        test
    """
    test_py_reader, loss_test, acc_test = test_vars
    test_prog = test_prog.clone(for_test=True)
    objs = utils.AvgrageMeter()

    test_reader = reader.test10(FLAGS.data_path, FLAGS.batch_size, data_list)
    test_py_reader.decorate_paddle_reader(test_reader)

    test_py_reader.start()
    test_fetch_list = [acc_test]
    test_start_time = time.time()
    step_id = 0
    try:
        while True:
            prev_test_start_time = test_start_time
            test_start_time = time.time()
            acc_v, = exe.run(
                test_prog, fetch_list=test_fetch_list)
            objs.update(np.array(acc_v), np.array(acc_v).shape[0])
            step_id += 1
    except fluid.core.EOFException:
        test_py_reader.reset()
    print("test acc {0}".format(objs.avg))
    return objs.avg
def test ( model , test_prog , test_vars , exe , data_list ) : test_py_reader , loss_test , acc_test = test_vars test_prog = test_prog . clone ( for_test = True ) objs = utils . AvgrageMeter ( ) test_reader = reader . test10 ( FLAGS . data_path , FLAGS . batch_size , data_list ) test_py_reader . decorate_paddle_reader ( test_reader ) test_py_reader . start ( ) test_fetch_list = [ acc_test ] test_start_time = time . time ( ) step_id = 0 try : while True : prev_test_start_time = test_start_time test_start_time = time . time ( ) acc_v , = exe . run ( test_prog , fetch_list = test_fetch_list ) objs . update ( np . array ( acc_v ) , np . array ( acc_v ) . shape [ 0 ] ) step_id += 1 except fluid . core . EOFException : test_py_reader . reset ( ) print ( "test acc {0}" . format ( objs . avg ) ) return objs . avg