Skip to content

Commit dcc973d

Browse files
committed
-
1 parent 2bca464 commit dcc973d

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README_api.md

+24-7
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ $ ./bazel-bin/tensorflow_serving/example/parsey_api --port=9000 exported/0000000
217217

218218

219219
# if you want to export a model trained by the same version of syntaxnet(==tf_model/syntaxnet),
220-
# set proper path in ../models/context.pbtxt
220+
# copy trained models to current directory and set proper path in models/context.pbtxt
221221
# ex) file_pattern: 'OUTPATH/label-map' -> file_pattern: '/path/to/label-map'
222-
$ cat ../models/context.pbtxt.template | sed "s=OUTPATH=/path/to=" > ../models/context.pbtxt
223-
$ bazel-bin/tensorflow_serving/example/parsey_mcparseface --model_dir=../models --export_path=exported
222+
$ cat models/context.pbtxt.template | sed "s=OUTPATH=/path/to=" > models/context.pbtxt
223+
$ bazel-bin/tensorflow_serving/example/parsey_mcparseface --model_dir=models --export_path=exported
224224

225-
# modify all path in exported/00000001/assets/context.pbtxt
225+
# modify all path in exported/00000001/assets/context.pbtxt since those paths are not neccessary.
226226
# for example,
227227
# from
228228
# input {
@@ -256,13 +256,30 @@ $ cp ../api/parsey_sejong.py tensorflow_serving/example/parsey_mcparseface.py
256256
$ bazel --output_user_root=bazel_root build --nocheck_visibility -c opt -s //tensorflow_serving/example:parsey_mcparseface --genrule_strategy=standalone --spawn_strategy=standalone --verbose_failures
257257
$ ls bazel-bin/tensorflow_serving/example/parsey_mcparseface
258258

259-
# set proper path in ../models_sejong/context.pbtxt
259+
# copy trained models_sejong to current directory and set proper path in models_sejong/context.pbtxt
260260
# ex) file_pattern: 'OUTPATH/label-map' -> file_pattern: '/path/to/label-map'
261-
$ cat ../models_sejong/context.pbtxt.template | sed "s=OUTPATH=/path/to=" > ../models_sejong/context.pbtxt
261+
$ cat models_sejong/context.pbtxt.template | sed "s=OUTPATH=/path/to=" > models_sejong/context.pbtxt
262262

263263
# run
264264
# this will read model from --model_dir and export to --export_path directory
265-
$ bazel-bin/tensorflow_serving/example/parsey_mcparseface --model_dir=../models_sejong --export_path=exported_sejong
265+
$ bazel-bin/tensorflow_serving/example/parsey_mcparseface --model_dir=models_sejong --export_path=exported_sejong
266+
267+
# modify all path in exported_sejong/00000001/assets/context.pbtxt since those paths are not neccessary.
268+
# for example,
269+
# from
270+
# input {
271+
# name: "tag-map"
272+
# Part {
273+
# file_pattern: "syntaxnet/models/parsey_mcparseface/tag-map"
274+
# }
275+
# }
276+
# to
277+
# input {
278+
# name: "tag-map"
279+
# Part {
280+
# file_pattern: "tag-map"
281+
# }
282+
# }
266283

267284
# run parsey_api with exported model
268285
$ ./bazel-bin/tensorflow_serving/example/parsey_api --port=9000 exported_sejong/00000001

0 commit comments

Comments
 (0)