-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of take
on MXNet engine
#1649
Conversation
# Conflicts: # api/src/main/java/ai/djl/ndarray/NDArray.java # engines/mxnet/mxnet-engine/src/main/java/ai/djl/mxnet/engine/MxNDArray.java
take
to MXNet enginetake
on MXNet engine
Codecov Report
@@ Coverage Diff @@
## master #1649 +/- ##
============================================
- Coverage 72.08% 70.84% -1.25%
- Complexity 5126 5448 +322
============================================
Files 473 508 +35
Lines 21970 23863 +1893
Branches 2351 2597 +246
============================================
+ Hits 15838 16906 +1068
- Misses 4925 5658 +733
- Partials 1207 1299 +92
Continue to review full report at Codecov.
|
throw new UnsupportedOperationException("Not implemented yet."); | ||
MxOpParams params = new MxOpParams(); | ||
params.addParam("shape", "(-1,)"); | ||
NDList flattened = manager.invoke("reshape", new NDList(this), params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use the external reshape here like NDArray flattened = this.reshape(...)
or this.flatten()
.
This pr follows #1627
take
function in MXNet is defined differently from numpy or pytorch. It is implemented byflatten
andtake
in MXNet.