我训练了一个Auto ml Vision Edge模型并将其导出为TensorFlow Package模型。然后,我尝试使用'gcr.io/automl-vision-ondevice/gcloud-container-1.12.0'图片运行它:
docker run --rm --name ${CONTAINER_NAME} -p ${PORT}:8501 -v ${MODEL_PATH}:/tmp/mounted_model/0001 -t ${CPU_DOCKER_GCR_PATH}
这是输出:
2020-03-24 18:49:11.574773: I tensorflow_serving/model_servers/server.cc:82] Building single TensorFlow model file config: model_name: default model_base_path: /tmp/mounted_model/
2020-03-24 18:49:11.576100: I tensorflow_serving/model_servers/server_core.cc:462] Adding/updating models.
2020-03-24 18:49:11.576174: I tensorflow_serving/model_servers/server_core.cc:559] (Re-)adding model: default
2020-03-24 18:49:11.676338: I tensorflow_serving/core/basic_manager.cc:739] Successfully reserved resources to load servable {name: default version: 1}
2020-03-24 18:49:11.676387: I tensorflow_serving/core/loader_harness.cc:66] Approving load for servable version {name: default version: 1}
2020-03-24 18:49:11.676457: I tensorflow_serving/core/loader_harness.cc:74] Loading servable version {name: default version: 1}
2020-03-24 18:49:11.676491: I external/org_tensorflow/tensorflow/contrib/session_bundle/bundle_shim.cc:363] Attempting to load native SavedModelBundle in bundle-shim from: /tmp/mounted_model/0001
2020-03-24 18:49:11.676551: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:31] Reading SavedModel from: /tmp/mounted_model/0001
2020-03-24 18:49:11.713626: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:54] Reading meta graph with tags { serve }
2020-03-24 18:49:11.748933: I external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-03-24 18:49:11.821336: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:310] SavedModel load for tags { serve }; Status: fail. Took 144731 microseconds.
2020-03-24 18:49:11.821400: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: default version: 1} failed: Not found: Op type not registered 'FusedBatchNormV3' in binary running on 2f729ee881b6. Make sure the Op and Kernelare registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazilyregistered when the module is first accessed.
似乎错误是“失败:未找到:Op类型未注册'FusedBatchNormV3'”
该模型是我从未接触过的标准导出的自动ml视觉模型。当Google自动化部署为该模型提供服务时,我想自己运行它。有帮助吗?
最佳
安德烈
答案 0 :(得分:0)
错误消息“失败:未找到:未注册Op类型'FusedBatchNormV3'”的症状确实是用于模型训练和部署的运行时版本冲突的征兆。
问题在于创建模型版本时控制台使用的(不可配置)运行时版本。
解决方法是专门通过cli训练和部署模型。