Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.58k stars 4.18k forks source link

您好,在我加载模型的时候出现的加载错误。 #1975

Open JianhaoZhan opened 4 years ago

JianhaoZhan commented 4 years ago

我用下列命令来读取example里面的bin和params文件: ncnn::Net net; net.load_param("squeezenet_v1.1.param"); net.load_model("squeezenet_v1.1.bin");

但是编译后执行./main的时候出现下列信息,如何处理 谢谢 fopen squeezenet_v1.1.param failed fopen squeezenet_v1.1.bin failed find_blob_index_by_name input failed find_blob_index_by_name output failed

JianhaoZhan commented 4 years ago

更换了路径,还是会出现: find_blob_index_by_name input failed find_blob_index_by_name output failed 请问转模型的时候,定义的名字是什么? 还有我自己转了pytorch vision的mobilenetv2,出现: parse magic failed network graph not ready find_blob_index_by_name input failed find_blob_index_by_name output failed 求教,谢谢!

zchrissirhcz commented 4 years ago

@JianhaoZhan

cd build/examples
cp ../../examples/squeezenet_v1.1.bin ./
cp ../../examples/squeezenet_v1.1.param ./
./squeezenet /tmp/cat.jpg
ncnnnnn commented 4 years ago

把执行文件,param bin jpg 都放一起试一试··

kaysjtu commented 3 years ago

你运行的路径不对,examples是ncnn目录下的 cd {ncnn_dir}/examples ../build/examples/squeezenet ../images/256-ncnn.png

sankexin commented 2 years ago

把权重文件放到ncnn目录(根目录下)