[bug] importONNXNetwork fails to open file if path depends on "Add to Path" folder

1 次查看(过去 30 天)
I added my folder "nnets" to path (from context menu) and tryed to import onnx network with:
%not working
net = importONNXNetwork('MNIST_99.29.onnx','OutputLayerType', 'classification','classnames',{'0', '1', '2', '3', '4', '5' ,'6', '7', '8', '9'});
MNIST_99.29.onnx is in "nnets" folder. I got error:
Error using onnxmex
Opening file 'MNIST_99.29.onnx' failed.
Error in nnet.internal.cnn.onnx.ModelProto (line 31)
ModelPtr = onnxmex(int32(FuncName.EdeserializeFromFile), filename);
Error in nnet.internal.cnn.onnx.importONNXNetwork (line 8)
m = nnet.internal.cnn.onnx.ModelProto(Filename);
Error in importONNXNetwork (line 53)
Network = nnet.internal.cnn.onnx.importONNXNetwork(ModelFile, varargin{:});
Error in MNIST_test (line 112)
net = importONNXNetwork('MNIST_99.29.onnx','OutputLayerType', 'classification','classnames',{'0', '1', '2', '3', '4', '5' ,'6', '7', '8', '9'});
Specifiing path helped:
%working
net = importONNXNetwork('nnets/MNIST_99.29.onnx','OutputLayerType', 'classification','classnames',{'0', '1', '2', '3', '4', '5' ,'6', '7', '8', '9'});
MATLAB 2018b, also tested on 2018a. Windows 10.

采纳的回答

Don Mathis
Don Mathis 2018-11-15
This is a know limitation that is planned to be fixed in an upcoming ONNX support package release.
Thanks

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by