DOCS: added code snippets compilation and fixes (#2606)

This commit is contained in:
Ilya Lavrenov
2020-10-10 11:19:16 +03:00
committed by GitHub
parent 00faee86e0
commit daf8bc6164
33 changed files with 189 additions and 158 deletions

View File

@@ -6,23 +6,21 @@
int main() {
using namespace InferenceEngine;
//! [part6]
Core ie;
InferenceEngine::Core ie;
auto network = ie.ReadNetwork("Model.xml", "Model.bin");
InferenceEngine::InputsDataMap input_info(network.getInputsInfo());
auto executable_network = ie.LoadNetwork(network, "GPU");
auto infer_request = executable_network.CreateInferRequest();
for (auto & item : input_info) {
std::string input_name = item.first;
auto input = infer_request.GetBlob(input_name);
/** Lock/Fill input tensor with data **/
unsigned char* data = input->buffer().as<PrecisionTrait<Precision::U8>::value_type*>();
// ...
std::string input_name = item.first;
auto input = infer_request.GetBlob(input_name);
/** Lock/Fill input tensor with data **/
unsigned char* data = input->buffer().as<PrecisionTrait<Precision::U8>::value_type*>();
// ...
}
infer_request.Infer();
//! [part6]
return 0;