Can't load Caffe model with DummyData layer

旧街凉风 提交于 2021-01-29 07:17:57

问题


when I try to load a caffe model with OpenCV 3.4.3, I get the error

what(): OpenCV(3.4.3) /home/schneider/libs/opencv-3.4.3/modules/dnn/src/dnn.cpp:412: error: (-2:Unspecified error) Can't create layer "DummyData1" of type "DummyData" in function 'getLayerInstance'*

The layer in the prototxt file looks like this:

layer {
name: "DummyData1"
type: "DummyData"
top: "DummyData1"
dummy_data_param {
    shape {
    dim: 1
    dim: 32
    dim: 125
    dim: 100
          }
   }
} 

It appears that the layer is missing in OpenCV. The caffe layer is described here on the Caffe webpage, but I am not sure how to implement this layer in OpenCV. Has it already been implemented somewhere? How can I solve this problem?


回答1:


if you able to change a .protptxxt the file you can replace these line to the following ones. Try this gys

layer {
    type: "Input"
    name: "DummyData1"
    top: "DummyData1"
    input_param {
     shape {
     dim: 1
     dim: 32
     dim: 125
     dim: 100
          }
        }
     }

or

input: "DummyData1"
input_dim: 1
input_dim: 32
input_dim: 125
input_dim: 100


来源:https://stackoverflow.com/questions/52365310/cant-load-caffe-model-with-dummydata-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!