This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-836] RNN Example for Scala #11753
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1cbea43
initial fix for RNN
lanking520 fe9a2f2
add CI test
lanking520 c51d1e0
add encoding format
lanking520 09560c4
scala style fix
lanking520 d28c4ee
update readme
lanking520 55fca0b
test char RNN works
lanking520 9e420ad
ignore the test due to memory leaks
lanking520 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
scala-package/examples/src/main/scala/org/apache/mxnetexamples/rnn/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # RNN Example for MXNet Scala | ||
| This folder contains the following examples writing in new Scala type-safe API: | ||
| - [x] LSTM Bucketing | ||
| - [x] CharRNN Inference : Generate similar text based on the model | ||
| - [x] CharRNN Training: Training the language model using RNN | ||
|
|
||
| These example is only for Illustration and not modeled to achieve the best accuracy. | ||
|
|
||
| ## Setup | ||
| ### Download the Network Definition, Weights and Training Data | ||
| `obama.zip` contains the training inputs (Obama's speech) for CharCNN examples and `sherlockholmes` contains the data for LSTM Bucketing | ||
| ```bash | ||
| https://s3.us-east-2.amazonaws.com/mxnet-scala/scala-example-ci/RNN/obama.zip | ||
| https://s3.us-east-2.amazonaws.com/mxnet-scala/scala-example-ci/RNN/sherlockholmes.train.txt | ||
| https://s3.us-east-2.amazonaws.com/mxnet-scala/scala-example-ci/RNN/sherlockholmes.valid.txt | ||
| ``` | ||
| ### Unzip the file | ||
| ```bash | ||
| unzip obama.zip | ||
| ``` | ||
| ### Arguement Configuration | ||
| Then you need to define the arguments that you would like to pass in the model: | ||
|
|
||
| #### LSTM Bucketing | ||
| ```bash | ||
| --data-train | ||
| <path>/sherlockholmes.train.txt | ||
| --data-val | ||
| <path>/sherlockholmes.valid.txt | ||
| --cpus | ||
| <num_cpus> | ||
| --gpus | ||
| <num_gpu> | ||
| ``` | ||
| #### TrainCharRnn | ||
| ```bash | ||
| --data-path | ||
| <path>/obama.txt | ||
| --save-model-path | ||
| <path>/ | ||
| ``` | ||
| #### TestCharRnn | ||
| ```bash | ||
| --data-path | ||
| <path>/obama.txt | ||
| --model-prefix | ||
| <path>/obama | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.