<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; :4.0beta:</li>
<li>Operating System / Platform =&gt; :Windows 10 64 bit:</li>
<li>Compiler =&gt; :Visual studio 2017:</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Assertion failed when import caffe model, the message is as follws:</p>
<p dir="auto">OpenCV: terminate handler is called! The last OpenCV error is:<br>
OpenCV(4.0.0-beta) Error: Assertion failed (pbBlob.raw_data_type() == caffe::FLOAT16) in cv::dnn::dnn4_v20180917::`anonymous-namespace'::CaffeImporter::blobFromProto, file c:\build\master_winpack-build-win64-vc15\opencv\modules\dnn\src\caffe\caffe_importer.cpp, line 264</p>

<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">const String model_desc = "../resnet18.prototxt";<br>
const String model_binary = "../resnet18.caffemodel";</p>
<p dir="auto">int test_caffe()<br>
{</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// init model
Net net = readNetFromCaffe(model_desc, model_binary);
if (net.empty())
{
	printf(&quot;=&gt; load net failed.\n&quot;);
	return -1;
}

return 0;"><pre class="notranslate"><code class="notranslate">// init model
Net net = readNetFromCaffe(model_desc, model_binary);
if (net.empty())
{
	printf("=&gt; load net failed.\n");
	return -1;
}

return 0;
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">int main()<br>
{<br>
//test_onnx();<br>
test_caffe();<br>
printf("=&gt; Test done.\n");<br>
system("pause");</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return 0;"><pre class="notranslate"><code class="notranslate">return 0;
</code></pre></div>
<p dir="auto">}</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Operating System / Platform =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>

<h5 dir="auto">Steps to reproduce</h5>