<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Openvino Unable to read network from memory in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1234134#M21773</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your question.&amp;nbsp; If you need any additional information from Intel, please submit a new question as Intel is no longer monitoring this thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Iffa&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 01:56:57 GMT</pubDate>
    <dc:creator>Iffa_Intel</dc:creator>
    <dc:date>2021-04-09T01:56:57Z</dc:date>
    <item>
      <title>Openvino Unable to read network from memory</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231566#M21610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to read network from memory, I tried using both the C API and C++ API but could not read the network from memory.&lt;/P&gt;&lt;P&gt;From &lt;STRONG&gt;ie_c_api.h&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;INFERENCE_ENGINE_C_API(IE_NODISCARD IEStatusCode) ie_core_read_network_from_memory(ie_core_t *core, const uint8_t *xml_content, size_t xml_content_size,
const ie_blob_t *weight_blob, ie_network_t **network);&lt;/LI-CODE&gt;&lt;P&gt;I could not find&amp;nbsp;any documentation for an API or a constructor which could set&amp;nbsp;&lt;STRONG&gt;const ie_blob_t *weight_blob&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;param's value.&lt;/P&gt;&lt;P&gt;I also tried the &lt;STRONG&gt;C++ API&lt;/STRONG&gt; as documented in&amp;nbsp;&lt;A href="https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_protecting_model_guide.html" target="_blank"&gt;Using Encrypted Models with OpenVINO™ - OpenVINO™ Toolkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I read the xml and bin contents into memory and call &lt;STRONG&gt;ReadNetwork()&lt;/STRONG&gt; for the content in buffer I get &lt;STRONG&gt;Unknown Exception&lt;/STRONG&gt;. Attaching the code snippet:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;std::string xml_str(xml_char.begin(), xml_char.end());//xml_char is also loaded similar to bin_char

FILE * file_bin = fopen(bin_file.c_str(), "rb+");
if (file_bin == NULL) return;
fseek(file_bin, 0, SEEK_END);
long int size_bin = ftell(file_bin);
fclose(file_bin);
// Reading data to array of unsigned chars
file_bin = fopen(bin_file.c_str(), "rb+");
unsigned char * in_bin = (unsigned char *)malloc(size_bin);
int bytes_read_bin = fread(in_bin, sizeof(unsigned char), size_bin, file_bin);
fclose(file_bin);

vector&amp;lt;uint8_t&amp;gt; bin_char;	
for (int itr = 0; itr &amp;lt; size_bin; itr++)
{
    bin_char.push_back(in_bin[itr]);
}
auto weights_bin = make_shared_blob&amp;lt;uint8_t&amp;gt;({ Precision::U8,{ bin_char.size() }, Layout::NCHW }, bin_char.data());

ie.ReadNetwork(xml_str, weights_bin); //Throws Unknown Exception&lt;/LI-CODE&gt;&lt;P&gt;Is there anything which is undocumented or am I missing something or is it a bug in the ReadNetwork function? I tried this with&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;face-detection-adas-0001&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;and&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;person-detection-retail-0013&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;models in all three precisions, these same models are loaded successfully when I read them from file.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 09:47:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231566#M21610</guid>
      <dc:creator>Singh__Prateek</dc:creator>
      <dc:date>2020-11-25T09:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Openvino Unable to read network from memory</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231668#M21617</link>
      <description>&lt;P&gt;Edit: The C++ API reads the network successfully (as shown), but the C API issue still exists.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 18:43:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231668#M21617</guid>
      <dc:creator>Singh__Prateek</dc:creator>
      <dc:date>2020-11-25T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re:Openvino Unable to read network from memory</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231880#M21624</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We would really appreciate it if you could share the complete file that you had modified for us to replicate and investigate further.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Iffa&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Nov 2020 07:28:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1231880#M21624</guid>
      <dc:creator>Iffa_Intel</dc:creator>
      <dc:date>2020-11-26T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Openvino Unable to read network from memory</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1234134#M21773</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your question.&amp;nbsp; If you need any additional information from Intel, please submit a new question as Intel is no longer monitoring this thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;Iffa&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 01:56:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Openvino-Unable-to-read-network-from-memory/m-p/1234134#M21773</guid>
      <dc:creator>Iffa_Intel</dc:creator>
      <dc:date>2021-04-09T01:56:57Z</dc:date>
    </item>
  </channel>
</rss>

