Skip to content

Commit

Permalink
Update the model to v2 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
threesquared authored Nov 26, 2020
1 parent 2114e78 commit b04b9c1
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM tensorflow/tensorflow:latest

ARG VERSION

WORKDIR /train

COPY ./images /train/images
Expand All @@ -11,13 +13,13 @@ RUN make_image_classifier \
--image_dir /train/images \
--tfhub_module https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4 \
--image_size 224 \
--saved_model_dir data/model/1 \
--saved_model_dir data/model/$VERSION \
--labels_output_file data/class_labels.txt \
--train_epochs 15 \
--do_fine_tuning

RUN tensorflowjs_converter \
--input_format=tf_saved_model \
--output_format=tfjs_graph_model \
data/model/1 \
web/model/1
data/model/$VERSION \
web/model/$VERSION
1 change: 1 addition & 0 deletions data/class_labels.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.git
affenpinscher
african
airedale
Expand Down
Binary file added data/model/2/saved_model.pb
Binary file not shown.
Binary file not shown.
Binary file added data/model/2/variables/variables.index
Binary file not shown.
Binary file added public/model/2/group1-shard1of3.bin
Binary file not shown.
Binary file added public/model/2/group1-shard2of3.bin
Binary file not shown.
Binary file added public/model/2/group1-shard3of3.bin
Binary file not shown.
1 change: 1 addition & 0 deletions public/model/2/model.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function App() {

useEffect(() => {
(async () => {
setModel(await tf.loadGraphModel('model/1/model.json'));
setModel(await tf.loadGraphModel('model/2/model.json'));
})();
}, []);

Expand Down

0 comments on commit b04b9c1

Please sign in to comment.