当我尝试将MASKRCNN模型https://github.com/matterport/Mask_RCNN部署到google ai平台时,出现此错误:
WARNING: Using endpoint [https://ml.googleapis.com/]
Creating version (this might take a few minutes)......failed.
ERROR: (gcloud.ai-platform.versions.create) Create Version failed. Model validation failed: Outer dimension for outputs must be unknown, outer dimension of 'mrcnn_detection/Reshape_1:0' is 1
任何想法如何解决它,这是我模型的签名定义:
signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_anchors'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 4)
name: input_anchors:0
inputs['input_image'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, -1, 3)
name: input_image:0
inputs['input_image_meta'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 14)
name: input_image_meta:0
The given SavedModel SignatureDef contains the following output(s):
outputs['mrcnn_detection/Reshape_1'] tensor_info:
dtype: DT_FLOAT
shape: (1, 100, 6)
name: mrcnn_detection/Reshape_1:0
outputs['mrcnn_mask/Reshape_1'] tensor_info:
dtype: DT_FLOAT
shape: (1, 100, 28, 28, 2)
name: mrcnn_mask/Reshape_1:0
Method name is: tensorflow/serving/predict
这里有我用来生成tf服务模型的脚本:https://github.com/moganesyan/tensorflow_model_deployment/blob/master/tf_serving/make_tf_serving.py
如何解决此错误?
我引用了this issue,但找不到可靠的解决方案。