我們得到了在當地的一個工作出口模式,正在下降創造谷歌雲計算的新模式版本ML如下:谷歌雲ML:用於輸出的外形尺寸必須是未知
Create Version failed. Model validation failed: Outer dimension for outputs must be unknown, outer dimension of 'Const_2:0' is 1 For more information on how to export Tensorflow SavedModel, seehttps://www.tensorflow.org/api_docs/python/tf/saved_model.
我們目前的出口模型響應工作在tensorflow-serve
和gcloud predict local
這個答覆:
outputs {
key: "categories"
value {
dtype: DT_STRING
tensor_shape {
dim {
size: 1
}
dim {
size: 17
}
}
string_val: "Business Essentials"
string_val: "Business Skills"
string_val: "Communication"
string_val: "Customer Service"
string_val: "Desktop Computing"
string_val: "Finance"
string_val: "Health & Wellness"
string_val: "Human Resources"
string_val: "Information Technology"
string_val: "Leadership"
string_val: "Management"
string_val: "Marketing & Advertising"
string_val: "Personal Development"
string_val: "Project Management"
string_val: "Sales"
string_val: "Technical Skills"
string_val: "Training & Development"
}
}
outputs {
key: "category"
value {
dtype: DT_STRING
tensor_shape {
dim {
size: 1
}
}
string_val: "Training & Development"
}
}
outputs {
key: "class"
value {
dtype: DT_INT64
tensor_shape {
dim {
size: 1
}
}
int64_val: 16
}
}
outputs {
key: "prob"
value {
dtype: DT_FLOAT
tensor_shape {
dim {
size: 1
}
dim {
size: 17
}
}
float_val: 0.051308773458
float_val: 2.39087748923e-05
float_val: 4.77133402232e-11
float_val: 0.00015225057723
float_val: 0.201782479882
float_val: 2.11781745287e-17
float_val: 3.61836161034e-09
float_val: 0.104659214616
float_val: 6.55719213682e-06
float_val: 1.16744895001e-12
float_val: 1.68323947491e-06
float_val: 0.00510392058641
float_val: 3.46840134738e-12
float_val: 1.02085353504e-08
float_val: 0.000151587591972
float_val: 3.04983092289e-25
float_val: 0.636809647083
}
}
問題必須在類別,所有其它輸出在第一工作版本的輸出都在那裏了。
任何想法??
當然這是個問題,問題是如何把一個列表'類=「A」,「B」,「C」]'成'[?,len(classes)]'沒有收到TypeError的Tensor:無法將類型的對象轉換爲Tensor。內容:[尺寸(無),1]。考慮將元素轉換爲受支持的類型。「我嘗試過'tf.tile'和'tf.reshape'沒有運氣 –
andresbravog
TensorFlow的版本是否與tensorflow-serve和本地預測一起使用?你是否使用與CMLE相同的版本? –