无法使用DummyData图层加载Caffe模型

问题描述 投票:0回答:1

当我尝试使用OpenCV 3.4.3加载caffe模型时,我收到错误

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'*

prototxt文件中的图层如下所示:

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

看来OpenCV中缺少该层。这个caffe层在Caffe网页上有描述,但我不知道如何在OpenCV中实现这个层。它已经在某处实现了吗?我怎么解决这个问题?

caffe dummy-data opencv-contrib
1个回答
0
投票

如果您能够更改.protptxxt文件,您可以将这些行替换为以下行。试试这个gys

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

要么

input: "DummyData1"
input_dim: 1
input_dim: 32
input_dim: 125
input_dim: 100
© www.soinside.com 2019 - 2024. All rights reserved.