Skip to content

Added ONNX BatchNorm subgraph#17233

Merged
alalek merged 3 commits intoopencv:3.4from
l-bat:onnx_bn
May 12, 2020
Merged

Added ONNX BatchNorm subgraph#17233
alalek merged 3 commits intoopencv:3.4from
l-bat:onnx_bn

Conversation

@l-bat
Copy link
Copy Markdown
Contributor

@l-bat l-bat commented May 7, 2020

Merge with extra: opencv/opencv_extra#755

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2020.1.0:16.04
build_image:Custom Win=openvino-2020.2.0
build_image:Custom Mac=openvino-2020.2.0

test_modules:Custom=dnn,python2,python3,java
test_modules:Custom Win=dnn,python2,python3,java
test_modules:Custom Mac=dnn,python2,python3,java

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

image

@l-bat l-bat added this to the 3.4.11 milestone May 7, 2020
@l-bat l-bat requested a review from dkurt May 7, 2020 11:24
{
++idx;
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to remove only Initializer nodes at addConstantNodesForInitializers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initializers overlap with inputs (not constant nodes). I think removing Initializers is useless because we don't use initializers in simplifySubgraphs, only inputs and nodes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have a procedure which replaces Initializers to Constants. That means other code which is related to this procedure should be also located there.

@dkurt
Copy link
Copy Markdown
Member

dkurt commented May 11, 2020

@l-bat, please try to extend dkurt@08c066a considering scenario from your PR when initializers included in the inputs. This patch is something that @ashishkrshrivastava proposed once but with agnostic input nodes (might be any type):

int input = addNodeToMatch("");
int data1 = addNodeToMatch("");
int data2 = addNodeToMatch("");
int data3 = addNodeToMatch("");
int data4 = addNodeToMatch("");

Copy link
Copy Markdown
Member

@dkurt dkurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants