terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.3) /home/pi/opencv-3.4.3/modules/dnn/src/dnn.cpp:412: error: (-2:Unspecified error) Can't create layer "conv2_1/dw" of type "ConvolutionDepthwise" in function 'getLayerInstance'
Aborted
正确的方式为:
#include <opencv2/dnn/all_layers.hpp> // ConvolutionLayer
#include <opencv2/dnn/layer.details.hpp> // CV_DNN_REGISTER_LAYER_CLASS
// ...
CV_DNN_REGISTER_LAYER_CLASS(ConvolutionDepthwise, ConvolutionLayer);
Net net = readNet(model, config, framework);
// ...