- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to load the network weights from a memory buffer on Openvino but it seems that it doesn't work properly, strangely this happens on one network but works fine on another -- so I'm assuming a) there is a bug somewhere b) I'm abusing something.
// typecasting from char to uint8_t std::vector<uint8_t> weight_file8U(weight_file.begin(), weight_file.end()); SizeVector dims; dims.push_back(weight_file.size()); //creating tensor descriptor TensorDesc td(InferenceEngine::Precision::U8, dims, Layout::ANY); //create blob InferenceEngine::TBlob<uint8_t>::Ptr wblob = InferenceEngine::make_shared_blob<uint8_t>(td, (uint8_t *)weight_file8U.data(), weight_file8U.size()); //set weights networkReader.SetWeights(wblob);
My question is whether the above snippet is the right way to load the network weights.
Also another question, not totally related, is it possible to use Valgrind with OpenVino?
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Alex,
sorry that didn't see your question till now, currently the coding style is totally different from what you wrote above. You can refer to the sample code in the package, if you still have problem in coding it, feel free to ask question again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I check through the sample source files. There is no example of using "SetWeights". May I clarify from you whether the "SetWeights" method is support or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Wong, Jeremy,
Please look for SetWeights() examples in our https://github.com/opencv/dldt . A quick grep shows plenty of examples in the OpenVino Inference Engine source code. Right now only 2019R1 source code is available but R2 should be added very soon (as OpenVino 2019R2 was just released). For instance look at https://github.com/opencv/dldt/blob/2019/inference-engine/tests/unit/engines/mkldnn/graph/structure/graph_structure_test.cpp which contains plenty of SetWeights() examples.
Hope it helps,
thanks,
Shubha
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page