为了做到这一点,我需要从ncnn在C++中转换一个张量。API不提供transpose,所以我尝试实现自己的转置函数。ncnn:Mat& preprocess(const cv::Mat& rgba) { int height = rgba.rows;// Build a tensor from the image input
ncnn::Mat in = ncnn::Mat::from_pixels(rgba.dat
/home/alpha/Desktop/pnnx-20220418-ubuntu/pnnx mymodelp4.pt inputshape=[1,8,224,224]terminate called after throwing an instance of 'c10::Error'Exception raised f