- Cd to the directory containing the "codegen" folder (or the directory within the "codegen" folder containing the binary files) and call your executable from there.
- Copy the entire "codegen" folder (or just copy all of the binary files within the "codegen folder") to the directory you wish to call your executable from. Then call your executable from that directory.
Not able to find weights/bias files generated by GPU coder when calling .so (DLL)
2 ビュー (過去 30 日間)
古いコメントを表示
I generated c++ source codes from a trained model and build them into .so DLL.
Then I copied this DLL file XXX.so (without the weights/biases files of DL model) into my generated execuable and invoke the DL interface function from the executable.
Then I get following error from debug window:
Camera image with 1920x1080 at 30 FPS
terminate called after throwing an instance of 'std::runtime_error'
what(): Unable to find the cnn_resnet50_yolov2_SPB_detector_input_1_scale binary file in ./codegen/dll/sbd_yolov2_detect .
It seems that within .so file the absolute path of weights and biases files are memorized.
Or does anyone know how to solve the problem?
Is it possible to put all weights/biases of DL model into .so?
Another question is for the network parameter path "./codegen/dll/sbd_yolov2_detect"
where is exactly the start point? Is it where the .so DLL is, or where the executable is?
Thanks
0 件のコメント
採用された回答
Nathan Malimban
2020 年 5 月 8 日
Hi Song,
The network parameter path you mention is relative to the current working directory. No matter where your executable is, if your current working directory has the "codegen" folder and you call the executable from this current working directory, the application will be able to find the weight and bias binary files.
If, in the current working directory, the "codegen" folder is not found, it will instead search for each individual binary file in the current working directory. Thus, if you call your executable from a directory containing all the binary files, your application will manage to find the binary files in this scenario also.
So you can do two things:
Nathan
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Deep Learning with GPU Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!