|
|
@ -2605,7 +2605,8 @@ void ONNXImporter::parsePad(LayerParams& layerParams, const opencv_onnx::NodePro |
|
|
|
paddings = paddings.t(); |
|
|
|
paddings = paddings.t(); |
|
|
|
layerParams.set("paddings", DictValue::arrayInt(paddings.ptr<int>(), paddings.total())); |
|
|
|
layerParams.set("paddings", DictValue::arrayInt(paddings.ptr<int>(), paddings.total())); |
|
|
|
|
|
|
|
|
|
|
|
if (node_proto.input_size() == 3) |
|
|
|
// check for non-null constant_value
|
|
|
|
|
|
|
|
if (node_proto.input_size() == 3 && !node_proto.input(2).empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Mat value = getBlob(node_proto, 2); |
|
|
|
Mat value = getBlob(node_proto, 2); |
|
|
|
float padValue = (depth == CV_8S) ? (float)value.ptr<int8_t>()[0] : value.ptr<float>()[0]; |
|
|
|
float padValue = (depth == CV_8S) ? (float)value.ptr<int8_t>()[0] : value.ptr<float>()[0]; |
|
|
|