def build_program(main, startup, is_test):
    main.random_seed = seed
    startup.random_seed = seed
    with fluid.unique_name.guard():
        with fluid.program_guard(main, startup):
            img = fluid.layers.data(name='image', shape=[1, 28, 28], dtype='float32')
            label = fluid.layers.data(name='label', shape=[1], dtype='int64')
            loss = conv_net(img, label, quant_skip_pattern)
            if (not is_test):
                opt = fluid.optimizer.Adam(learning_rate=0.001)
                opt.minimize(loss)
    return ([img, label], loss)
def build_program(main, startup, is_test):
    main.random_seed = seed
    startup.random_seed = seed
    with fluid.unique_name.guard():
        with fluid.program_guard(main, startup):
            img = fluid.layers.data(name='image', shape=[1, 28, 28], dtype='float32')
            label = fluid.layers.data(name='label', shape=[1], dtype='int64')
            loss = conv_net(img, label, quant_skip_pattern)
            if (not is_test):
                opt = fluid.optimizer.Adam(learning_rate=0.001)
                opt.minimize(loss)
    return ([img, label], loss)