Skip to content

ONNX : ReflecitonPad2d and ZeroPad2d Subgraph fusion added#16985

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
ashishkrshrivastava:padfusion
Apr 13, 2020
Merged

ONNX : ReflecitonPad2d and ZeroPad2d Subgraph fusion added#16985
opencv-pushbot merged 1 commit intoopencv:3.4from
ashishkrshrivastava:padfusion

Conversation

@ashishkrshrivastava
Copy link
Copy Markdown
Contributor

@ashishkrshrivastava ashishkrshrivastava commented Apr 5, 2020

Merge with extra: opencv/opencv_extra#740

resolves #16971

opencv_extra=padfusion

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

This PR adds

SubgraphFusion for

  • ReflictionPad2d (pytorch)
  • ZeroPad2d (pytorch)

Screenshot from 2020-04-05 11-29-11

Screenshot from 2020-04-05 11-29-31

force_builders=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2020.1.0:16.04
build_image:Custom Win=openvino-2020.1.0
build_image:Custom Mac=openvino-2020.1.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=*

@ashishkrshrivastava ashishkrshrivastava force-pushed the padfusion branch 2 times, most recently from 2b1e429 to fea9fa6 Compare April 5, 2020 06:08
@ashishkrshrivastava ashishkrshrivastava changed the title ReflecitonPad2d and ZeroPad2d Subgraph fusion added ONNX : ReflecitonPad2d and ZeroPad2d Subgraph fusion added Apr 5, 2020
@dkurt
Copy link
Copy Markdown
Member

dkurt commented Apr 9, 2020

@ashishkrshrivastava, May I ask you to try this patch: dkurt@0f92db7? It solves some importer problems and enables ZeroPad2d by constants folding rather than graph fusion. Can you test ReflectionPad2d with that as well and extend if needed? Thanks!

@ashishkrshrivastava ashishkrshrivastava force-pushed the padfusion branch 2 times, most recently from 023f297 to 10833a6 Compare April 10, 2020 12:26
@ashishkrshrivastava
Copy link
Copy Markdown
Contributor Author

ashishkrshrivastava commented Apr 10, 2020

Can you test ReflectionPad2d with that as well and extend if needed?

@dkurt I have added changes with some modification for ReflectionPad2d
Thankyou so much.

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.

👍 Looks good for me, thanks!

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.

4 participants