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

add crop gluon transform #13679

Closed
wants to merge 258 commits into from
Closed

Conversation

stu1130
Copy link
Contributor

@stu1130 stu1130 commented Dec 18, 2018

Description

  1. Add crop operator and gluon transformer front
  2. support batch input
  3. optimize with openmp

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 http://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

Comments

@sandeep-krishnamurthy

@stu1130 stu1130 requested a review from szha as a code owner December 18, 2018 23:21
@stu1130 stu1130 changed the title Add crop gluon transform add crop gluon transform Dec 18, 2018
@Roshrini
Copy link
Member

@stu1130 Thanks for the contribution. @mxnet-label-bot Add [Gluon, pr-awaiting-review]

@marcoabreu marcoabreu added Gluon pr-awaiting-review PR is waiting for code review labels Dec 19, 2018
srochel and others added 4 commits December 20, 2018 05:59
* merge NEWS.md from 1.4.x to master

* NEWS.md backport from v1.4.x to master
…e#13599)

* fallback to dense version for grad(reshape), grad(expand_dims)

* add _backward_reshape gpu version

* reshape test case comments

* fix gpu test

* remove mkldnn support for _backward_reshape
* Add Flatten before Gemm

* ONNX export test: Allow multiple inputs in forward pass

* ONNX export: Test for fully connected
…che#12977)

* Adding cpp-package directory to the Doxyfile. Updating the index.md file in c++ api directory.

* Updating the link to classes in C++ API to point to correct html file.

* Updated the links to use relative paths.

* Removed the extra slash character in the url

* Excluded the 3rdparty folder as per the review comment.
DMLC_DECLARE_FIELD(size)
.describe("Size of image for resizing after crop. Could be (width, height) or size");
DMLC_DECLARE_FIELD(interp)
.describe("Interpolation method for resizing. By default uses bilinear interpolation"
Copy link
Member

Choose a reason for hiding this comment

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

probably need set_default.

DMLC_REGISTER_PARAMETER(CropParam);

NNVM_REGISTER_OP(_image_crop)
.describe(R"code()code" ADD_FILELINE)
Copy link
Member

Choose a reason for hiding this comment

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

please add some usage examples here.

if (has_size) {
int height;
int width;
CHECK(param.size.value().ndim() == 1 || param.size.value().ndim() == 2)
Copy link
Member

Choose a reason for hiding this comment

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

why do you need these value() calls ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to get the value of dmlc::optional

srochel and others added 20 commits December 21, 2018 22:17
* Added timeout/retry (linear backoff) to docker cache download

* Units changed, as time.sleep takes seconds as argument

* Improved error handling

* Using retry decorator

* Added retry decorator to _login_dockerhub method

* Fixed wrong import
* Update test_gluon_trainer.py

* Update test_gluon_trainer.py

* test
* fp16 dot

* update mshadow

* update mshadow

* update mshadow
* fix the quantization script to support python2

* Fix comments, fix similiar issue in imagenet_inference.py
* ONNX test code cleanup

* Make tests use the common test case list

* Remove import test_cases

* Make Gluon backend rep common

* Partially enable broadcast tests

* Common function to populate tests

* Make backend common

* test models

* Test nodes

* ONNX export: Test for fully connected

* Edit CI scripts mxnet export test cleanup

* Further cleanup backend tests

* README

* Some corrections

* test case format for test_models
* Port of scala infer package to clojure

* Add inference examples

* Fix project.clj

* Update code for integration tests

* Address comments and add unit tests

* Add specs and simplify interface

* Minor nit

* Update README
…3728)

* tests

* remove optimizer and move op to contrib

* rename parameter
…e#13654)

* Logsoftmax, missing tests

* Support multiple outputs in Gluon backendrep

* Remove repeated unsqueeze test

* Allow multiple output support
* Common test caller

* Remove incorrect comment

* Make corrections to CI

* fix ci script
* ONNX import: Hardmax

* Fix lint errors

* add github link for issue with reshape
* add clarification for param_dict

* more tests for dist kvstore

* more unittests

* fix a bug

* more dist exception test

* revert optimizer list

* fix bug and comment

* fix doc rendering and lint

* add invalid sched test

* fix website

* trigger

* update doc
ChaiBapchya and others added 7 commits February 15, 2019 21:01
* large op support

* replaced size_t with index_t for M, added test case

* changed shape
…for original wide_n_deep example (apache#13895)

* Add a inference script can provide both accuracy and benchmark result

* minor changes

* minor fix to use keep similar coding style as other examples

* fix typo

* remove code redundance and other minor changes

* Addressing review comments and minor pylint fix

* remove parameter 'accuracy' to make logic simple
…#13749)

* Adds layout support: mx.sym.Pooling(..., layout='NHWC',...) with tests.

* Docs changes

* Trigger

* Skip NHWC pooling tests on non-cuDNN platforms

* Fix pylint NHWC pooling

* Fixes from review

* Add CuDNNPoolingOp::Supports() in place of Forward()/Backward() bool return.

* Add layout support to cpu implementation of Pooling, with tests.

* Fix cpplint.

* Fix bug in cpu nhwc impl.

* Add MXNet CUDA pooling in NWC, NHWC and NDHWC.  Turn on 3D cuDNN pooling.  Tests.

* Add PoolingParam::GetLayout() for better default layout handling.

* Fix cpplint.

* Throw exception for quantization pooling not NCHW.

* Expand nhwc pooling test coverage.

* SupportMKLDNNPooling() to examine layout param.

* Compare 'std' and 'v1' pooling versions only when op definitions permit.

* Add pooling test diagnostic output.

* Fix syntax.

* Fix pooling FInplaceOption so it can be shared by all implementations.

* Add missing param definition.

* Fix #if logic.

* Temp switch to DickJC123/mshadow: shows effect of half round-to-nearest on cpu.

* Move back to dmlc/mshadow.git, now with float->half rounding.

* Avoid underflow of lp pooling calc for dtype=float16.

* Remove redundant pooling test.

* Minor variable naming fixes.

* Modify FInplaceOption handling per reviewer comments.  Expand testing.

* Correct gluon Pooling layout param description.

* Correct Symbol Pooling description.

* Use 'CHECK(x)' rather than 'if (x) LOG(FATAL)'.

* Empty commit to trigger CI.
apache#14130)

* Refine runtime feature discovery python API and add documentation to Python API docs

* Fix lint

* Provide is_enabled method to check if feature is present from string

* Refine docs, add is_enabled

* Fix encoding

* Fix doc

* Address CR suggestions

* remove index as per CR suggestion

* Fix lint

* runtime

* Fix doc

* Add license
@stu1130 stu1130 reopened this Feb 19, 2019
stu1130 and others added 13 commits February 19, 2019 12:35
* fixing examples

* fixing examples and adding READMEs

fixing examples and adding READMEs

fixing examples and adding READMEs

fixing examples and adding READMEs

add missing files

fixed some bugs in readmes

fixed some bugs in readmes

fixed some spelling mistakes

update

update

* removing images and fixing spelling mistakes

* removing images and fixing spelling mistakes

* updating links

* Adding license header

* empty commit

* Add missing license headers

* Adding changes requested by ChaiBapchya
* mp adamw update

* Softmax fp16 (apache#201)

* softmax for fp16 with fp32 accumulator

* return AType in kernel

* add dtype

* kernel

* adamw with nan check

* add doc

* Revert "Softmax fp16 (apache#201)"

This reverts commit 5869e0a.

* add test

* more test for fp16

* skip update for rescale = 0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Gluon pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.