import tensorflow as tf

                   l, 15, kernel_shape=1, nl=tf.identity)
        return l

    with argscope(Conv2D, kernel_shape=7, nl=tf.nn.relu):
        out1 = (LinearWrap(shared)
                .Conv2D('conv5_1_CPM', 512, kernel_shape=1)
                .Conv2D('conv5_2_CPM', 15, kernel_shape=1, nl=tf.identity)())
        out2 = add_stage(2, out1)
        out3 = add_stage(3, out2)
        out4 = add_stage(4, out3)
        out5 = add_stage(5, out4)
        out6 = add_stage(6, out5)
        tf.image.resize_bilinear(out6, [368, 368], name='resized_map')


def run_test(model_path, img_file):
    param_dict = np.load(model_path, encoding='latin1').item()
    predict_func = OfflinePredictor(PredictConfig(
        inputs_desc=[InputDesc(tf.float32, (None, 368, 368, 3), 'input')],
        tower_func=CPM,
        session_init=DictRestore(param_dict),
        input_names=['input'],
        output_names=['resized_map']
    ))
