Python tf.estimator.export.ServingingInputReceiver中接收器张量的传递字典

Python tf.estimator.export.ServingingInputReceiver中接收器张量的传递字典,python,tensorflow,predict,tensorflow-serving,Python,Tensorflow,Predict,Tensorflow Serving,我试图在我的tf模型上使用以下json_服务_fn进行预测 def json_serving_input_fn(): """Build the serving inputs.""" feature_placeholders = {'a': tf.placeholder(shape=[None], dtype='string'), 'b': tf.placeholder(shape=[None], dtype='string'), 'c':

我试图在我的tf模型上使用以下json_服务_fn进行预测

def json_serving_input_fn():
  """Build the serving inputs."""
  feature_placeholders = {'a': tf.placeholder(shape=[None], dtype='string'),
            'b': tf.placeholder(shape=[None], dtype='string'), 
            'c': tf.placeholder(shape=[1,10], dtype='string')}
  return tf.estimator.export.ServingInputReceiver(
    features=feature_placeholders,
      receiver_tensors=feature_placeholders)
培训和评估过程按预期完成(与问题正交),但我的服务功能失败,错误代码如下:

INFO:tensorflow:Signatures EXCLUDED from export because they cannot be be served via TensorFlow Serving APIs:                                                                         
INFO:tensorflow:'serving_default' : Classification input must be a single string Tensor; got {'symptoms': <tf.Tensor 'Placeholder_2:0' shape=(1,10) dtype=string>, 'age': <tf.Tensor 'Placeholder_1:0' shape=(?,) dtype=string>, 'sex': <tf.Tensor 'Placeholder:0' shape=(?,) dtype=string>}     

我如何重写我的json\u服务\u输入\u乐趣来完成它?

我有同样的问题,你能解决吗@蜘蛛拉面还没有。我正在研究原型服务的示例。你找到解决办法了吗?你是如何保存你的模型的。是使用builder.SavedModelBuilder还是使用Simple_Save或estimator.export_savedmodel。可能是,您可以共享与保存模型对应的代码。
{"a":"x","b":"y","c":["p1","p2","","","","","","","",""]}