最近在學習tensorflow serving,但是運行官網例子,不使用bazel時,發現運行mnist_client.py的時候出錯,
在api文件中也沒找到predict_pb2,因此,后面在網上看到,它在這里
"bazel-bin/tensorflow_serving/example/mnist_client.runfiles/tf_serving/tensorflow_serving/apis"
好像這是bazel編譯生成的(網上觀點,出處找不到啦),好吧,又回到bazel了。
參考:
https://groups.google.com/a/tensorflow.org/forum/#!topic/discuss/K_k7JcUi8uw
其實從文件名pb就可以知道,是從protocol Buffer 的proto文件生成而來,可以使用:
#From tensorflow/models/
protoc object_detection/protos/*.proto --python_out=.