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

Squeeze op #9700

Merged
merged 4 commits into from
Feb 7, 2018
Merged

Squeeze op #9700

merged 4 commits into from
Feb 7, 2018

Conversation

reminisce
Copy link
Contributor

Description

This PR implemented squeeze op in MXNet as numpy.squeeze. Requested by @szha .
https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html

@eric-haibin-lin

Checklist

Essentials

  • Passed code style checking (make lint)
  • 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
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@chinakook
Copy link
Contributor

How about unsqeeze?

@reminisce
Copy link
Contributor Author

@chinakook expand_dims?

})
.set_attr<nnvm::FInferShape>("FInferShape", SqueezeShape)
.set_attr<nnvm::FInferType>("FInferType", ElemwiseType<1, 1>)
.set_attr<FCompute>("FCompute<cpu>", SqueezeCompute<cpu>)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can use IdentityCompute directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. Changed now. Thanks.

@piiswrong piiswrong merged commit c19f506 into apache:master Feb 7, 2018
@szha
Copy link
Member

szha commented Feb 7, 2018

@reminisce could you add a fluent entry for this in both nd and sym?

@reminisce
Copy link
Contributor Author

@szha Oh, yes. I forgot to do so. I will submit a PR to add the fluent entry for this op.

@chinakook
Copy link
Contributor

@reminisce yes, It's equalevant.

rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* Add squeeze op

* Add unit test

* Fix lint

* User IdentityCompute directly
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* Add squeeze op

* Add unit test

* Fix lint

* User IdentityCompute directly
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.

4 participants