Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[New Op] Add deformable conv v2 #16341

Merged
merged 15 commits into from
Nov 4, 2019
Merged

[New Op] Add deformable conv v2 #16341

merged 15 commits into from
Nov 4, 2019

Conversation

zhreshold
Copy link
Member

Description

Add Deformable Convolution operators and corresponding gluon block.
This is a PR that follows the closed PR: #15552

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@zhreshold zhreshold changed the title [New Op] Add deformable conv v2 [WIP][New Op] Add deformable conv v2 Oct 2, 2019
@zhreshold
Copy link
Member Author

@Jerryzcn @eric-haibin-lin @sxjscience for review.

@zhreshold
Copy link
Member Author

@hetong007 @szha for review/approve

@zhreshold
Copy link
Member Author

CI passed, training convergence passed, can you guys help merge it since the furture gluoncv models depends on this PR? @eric-haibin-lin @sxjscience

num_deformable_group=num_deformable_group)
if grad_nodes[0] == 'offset_data':
# wider tolerance needed for coordinate differential
rtol, atol = 1.0, 1e-2
Copy link
Member

Choose a reason for hiding this comment

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

rtol = 1.0 looks too large...

Copy link
Member

Choose a reason for hiding this comment

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

I think it's because the gradient for the offset is not very accurate. We should use some other ways to test the offset_data.

@sxjscience sxjscience merged commit 5a2fce5 into apache:master Nov 4, 2019
@sxjscience sxjscience changed the title [WIP][New Op] Add deformable conv v2 [New Op] Add deformable conv v2 Nov 4, 2019
yajiedesign pushed a commit to yajiedesign/mxnet that referenced this pull request Nov 6, 2019
* add deformable conv v2

* fix lint and compiler warning

* fix lint

* fix pylint

* fix clang and lint

* fix base class, add test case

* fix gluon impl, add cpu forward

* address comment

* fix duplicate kernel name

* fix cpplint

* con't fix cpplint

* address comments

* fix mask scale

* make initial mask centered at 1 rather than 0.5

* fix submodule
@djaym7
Copy link

djaym7 commented Dec 12, 2019

Anyone built from this commit ? Or is this gonna be available in 1.5.1 or later ?

@zhreshold
Copy link
Member Author

@djaym7 It's included after 1.5.1, you can use nightly built mxnet to use this operator for example
https://repo.mxnet.io/dist/2019-12-07/dist/mxnet_cu100mkl-1.6.0b20191207-py2.py3-none-manylinux1_x86_64.whl
You can modify the date/cuda variant to match your environment

@zhreshold zhreshold deleted the dcnv2 branch December 12, 2019 22:00
@djaym7
Copy link

djaym7 commented Dec 13, 2019

Errors in v2, v1 works.
input_data = mx.nd.random.normal(shape=(10,3,100,100),ctx=ctx)

image

image

image

@zhreshold
Copy link
Member Author

@djaym7 It was a bug in calculating the channels. See #17070

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants