我按照这里列出的所有步骤使用tensorflow serving https://www.tensorflow.org/tfx/serving/tensorboard
使用下面的命令运行使用docker
sudo docker run -it --rm -p 8500:8500 -p 8502:8502 -v /tmp/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu:/models/half_plus_two -v /tmp/tensorboard:/tmp/tensorboard -e MODEL_NAME=half_plus_two tensorflow/serving
但是我一直收到下面的错误2022-12-19 15:51:44.300838: I tensorflow_serving/core/loader_harness.cc:66] Approving load for servable version {name: half_plus_two version: 123} 2022-12-19 15:51:44.300857: I tensorflow_serving/core/loader_harness.cc:74] Loading servable version {name: half_plus_two version: 123} 2022-12-19 15:51:44.300920: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: half_plus_two version: 123} failed: NOT_FOUND: Specified file path does not appear to contain a SavedModel bundle (should have a file called
saved_model.pb ) Specified file path: /models/half_plus_two/00000123 2022-12-19 15:52:44.301166: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: half_plus_two version: 123} retry: 1 2022-12-19 15:52:44.301281: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: half_plus_two version: 123} failed: NOT_FOUND: Specified file path does not appear to contain a SavedModel bundle (should have a file called
saved_model.pb ) Specified file path: /models/half_plus_two/00000123
echo $MODELS_DIR /tmp/serving/tensorflow_serving/servables/tensorflow/testdata
'ls /tmp/伺服/tensorflow 伺服/伺服设备/tensorflow /测试数据/保存的模型半加二CPU/00000123/
变量已保存_model.pb资产'
在一些答案中,我看到我需要testdata/saved_model_half_plus_two_cpu中的文件夹1,我尝试了一下,并将变量、saved_model.pb和assets文件夹放入其中,但也不起作用
1条答案
按热度按时间q5iwbnjs1#
请按照TensorFlow Serving with Docker教程安装TF服务于Docker。
要验证安装,请提供演示模型的路径,并使用以下命令将其加载到TF服务容器。
验证后,运行以下命令。