Skip to content

Commit 7e20996

Browse files
author
Jen Person
authored
Adding detail to abalone-node README (#861)
* Updating TensorFlow directions to accurately note the supported versions of Node.js * updating dependencies to the latest versions * Updating code based on changes to how some packages work since previous Node.js package update * remove commended code * updating README to clarify some steps * updating README to add detail * updates to addition-rnn README to explain how to run the demo
1 parent 42f5ac3 commit 7e20996

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

abalone-node/README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
# TensorFlow.js Example: Abalone Age
22

3-
This example shows how to predicting the age of abalone from physical measurements under Node.js
3+
This example shows how to predict the age of abalone from physical measurements using TensorFlow.js with Node.js.
44

55
The data set available at [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets/Abalone).
66

7-
This example shows how to
8-
* load a `Dataset` from a local csv file
9-
* prepare the Dataset for training
10-
* create a `tf.LayersModel` from scratch
11-
* train the model through `model.fitDataset()`
7+
This example shows how to:
8+
* load a `Dataset` from a local csv file.
9+
* prepare the Dataset for training.
10+
* create a `tf.LayersModel` from scratch.
11+
* train the model through `model.fitDataset()`.
1212
* save the trained model to a local folder.
1313

14-
To launch the demo, do
14+
To launch the demo, run the following command:
1515

1616
```sh
1717
yarn
1818
yarn train
1919
```
2020

21+
The result logs 100 Epochs as well as a predicted result similar to the following:
22+
23+
```
24+
...
25+
Epoch 100 / 100
26+
eta=0.0 =================================================>
27+
402ms 57414us/step - loss=7.42 val_loss=5.60
28+
The actual test abalone age is 10, the inference result from the model is 11.929240226745605
29+
```
30+
2131
By default, the training uses tfjs-node, which runs on the CPU.
2232
If you have a CUDA-enabled GPU and have the CUDA and CuDNN libraries
2333
set up properly on your system, you can run the training on the GPU

addition-rnn/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@ Note: this example is a port of the Keras addition RNN example with a UI.
99
You can find the original Keras python code [here](https://github.com/keras-team/keras/blob/master/examples/addition_rnn.py).
1010

1111
[See this example live!](https://storage.googleapis.com/tfjs-examples/addition-rnn/dist/index.html)
12+
13+
To run this demo locally on your machine, run the following commands:
14+
15+
```sh
16+
yarn
17+
yarn watch
18+
```
19+
20+
The demo runs on port http://localhost:1234.
21+
22+
Once the page loads, click **Train model** to train. You can view the model's progress through graphs displayed on the page.
23+
24+
Upon completion of training, view the model's success through displayed test examples.

0 commit comments

Comments
 (0)