[MXNET-531] CNN Examples for Scala new API#11292
Conversation
|
Currently facing the CI problem as shown below: I add a fix on codec to see if we can solve that... Here is the link I found helpful. Cannot reproduce using a ubuntu machine |
|
The previous problem solved, currently facing the memory leak issues: Will try to look into the code to see if we are not disposing some ndarrays |
|
Currently, I have switched from |
acddbe1 to
147972c
Compare
|
@lanking520 |
| @@ -0,0 +1,23 @@ | |||
| # CNN Text Classification Example for Scala | |||
| This is the example using Scala type-safe api doing CNN text classification. | |||
| Currently, I cannot reproduce the same result in the python example here. | |||
There was a problem hiding this comment.
This example is only for Illustration and not modeled to achieve the best accuracy.
e4729aa to
539c091
Compare
| This is the example using Scala type-safe api doing CNN text classification. | ||
| This example is only for Illustration and not modeled to achieve the best accuracy. | ||
|
|
||
| Please contribute to improve the dev accuracy of the model. |
| */ | ||
| * An Implementation of the paper | ||
| * Convolutional Neural Networks for Sentence Classification | ||
| */ |
| val sm = Symbol.SoftmaxOutput()()(Map("data" -> fc, "label" -> inputY)) | ||
| val fc = Symbol.api.FullyConnected(data = Some(hDrop), num_hidden = numLabel) | ||
| val sm = Symbol.api.SoftmaxOutput(data = Some(fc), label = Some(inputY)) | ||
| fc.dispose() |
There was a problem hiding this comment.
have you checked that this does not crash. Isn't SoftmaxOutput using FC during training
There was a problem hiding this comment.
Yes, I have. Not crashing
|
Can we merge? |
* init commit for CNN * Add changes to pass CPU and GPU test * Add codec to solve the mkstring issue * Change dropout and epoch number * change epoch to 10 and Java download * add README.md * adding dispose method to avoid memory leaks * dispose unused Symbols
Description
This PR contains examples written from the new API.
@nswamy @yzhliu @andrewfayres
All examples pushed here are tested locally on my Mac. It lives in the new package called
org.apache.mxnet.examplesBe aware: CNN Example is specifically designed to run on GPU. Disable the CPU
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.