Skip to content

Can't create layer "normalize/l2_normalize/Sum:0" of type "ReduceSum" in function 'getLayerInstance' #18876

@saharshleo

Description

@saharshleo
System information (version)
  • OpenCV => 4.4.0
  • Operating System / Platform => Ubuntu 18.04
  • onnx => 1.6.0
Detailed description

Can't create layer "normalize/l2_normalize/Sum:0" of type "ReduceSum" in function 'getLayerInstance'

Traceback (most recent call last):
  File "onnx_to_opencv.py", line 7, in <module>
    net = cv2.dnn.readNetFromONNX("MODELS/facenet_model.onnx")
cv2.error: OpenCV(4.4.0) /tmp/pip-req-build-xgme2194/opencv/modules/dnn/src/dnn.cpp:604: error: (-2:Unspecified error) Can't create layer "normalize/l2_normalize/Sum:0" of type "ReduceSum" in function 'getLayerInstance'
Steps to reproduce

onnx_to_opencv.py

import cv2
import onnx
net = cv2.dnn.readNetFromONNX("MODELS/facenet_new.onnx")

facenet_model.onnx - 84.6mb

Is there a way rather than defining a custom layer. If not, can help in defining that layer :)

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions