@@ -217,12 +217,12 @@ $ ./bazel-bin/tensorflow_serving/example/parsey_api --port=9000 exported/0000000
217
217
218
218
219
219
# 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
221
221
# 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
224
224
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.
226
226
# for example,
227
227
# from
228
228
# input {
@@ -256,13 +256,30 @@ $ cp ../api/parsey_sejong.py tensorflow_serving/example/parsey_mcparseface.py
256
256
$ 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
257
257
$ ls bazel-bin/tensorflow_serving/example/parsey_mcparseface
258
258
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
260
260
# 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
262
262
263
263
# run
264
264
# 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
+ # }
266
283
267
284
# run parsey_api with exported model
268
285
$ ./bazel-bin/tensorflow_serving/example/parsey_api --port=9000 exported_sejong/00000001
0 commit comments