need help with ncnn::Mat

ws51t4hk  于 2022-10-22  发布在  其他
关注(0)|答案(4)|浏览(178)

detail | 详细描述 | 詳細な説明

I have input network shape Trecip - type: float32[1,313,56,56]
I created opencv Mat filled by 0.38

int annealed_mean_mtrix[] = {1, 313, 56, 56};
const cv::Mat Trecip(4, annealed_mean_mtrix, CV_32F, cv::Scalar(0.38));

But i don't know how create ncnn::Mat from Trecip for ex.input("data_l", Trecip);?

flmtquvp

flmtquvp1#

https://github.com/Tencent/ncnn/wiki#input-data-and-extract-output

wgmfuz8q

wgmfuz8q2#

@Yoh-Z Hi.
I saw this page. There are simple examples s for standard situations.
My question how transform exactly my shape

int annealed_mean_mtrix[] = {1, 313, 56, 56};
const cv::Mat Trecip(4, annealed_mean_mtrix, CV_32F, cv::Scalar(0.38));

to ncnn:Mat

ar7v8xwq

ar7v8xwq3#

@Yoh-Z Hi. I saw this page. There are simple examples s for standard situations. My question how transform exactly my shape

int annealed_mean_mtrix[] = {1, 313, 56, 56};
const cv::Mat Trecip(4, annealed_mean_mtrix, CV_32F, cv::Scalar(0.38));

to ncnn:Mat

ncnn::Mat Trecip(56, 56, 313);
Tercip.fill(0.38f);

相关问题