### input data and extract output ```cpp #include #include #include "net.h" int main() { cv::Mat img = cv::imread("image.ppm", CV_LOAD_IMAGE_GRAYSCALE); int w = img.cols; int h = img.rows; // subtract 128, norm to -1 ~ 1 ncnn::Mat in = ncnn::Mat::from_pixels_resize(img.data, ncnn::Mat::PIXEL_GRAY, w, h, 60, 60); float mean[1] = { 128.f }; float norm[1] = { 1/128.f }; in.substract_mean_normalize(mean, norm); ncnn::Net net; net.load_param("model.param"); net.load_model("model.bin"); ncnn::Extractor ex = net.create_extractor(); ex.set_light_mode(true); ex.set_num_threads(4); ex.input("data", in); ncnn::Mat feat; ex.extract("output", feat); return 0; } ``` ### print Mat content ```cpp void pretty_print(const ncnn::Mat& m) { for (int q=0; q normed_feats(m.c); for (int i=0; i(y); uchar* sp = normed_feats[i].ptr(y); for (int x=0; x