(params)
return tf.estimator.export.ServingInputReceiver(
      features=features, receiver_tensors=inputs_ph)
Returns expected input spec for exported savedmodels.
Returns expected input spec for exported savedmodels.
Returns expected input spec for exported savedmodels .
def serving_input_fn(params):
  """Returns expected input spec for exported savedmodels."""
  inputs_ph = tf.placeholder(
      dtype=tf.string, shape=[params.batch_size], name="inputs")

  inputs = public_parsing_ops.encode(inputs_ph, params.max_input_len,
                                     params.vocab_filename, params.encoder_type,
                                     params.length_bucket_size > 0)
  inputs = tf.reshape(inputs, [params.batch_size, params.max_input_len])
  features = {"inputs": inputs}
  return tf.estimator.export.ServingInputReceiver(
      features=features, receiver_tensors=inputs_ph)
def serving_input_fn ( params ) : inputs_ph = tf . placeholder ( dtype = tf . string , shape = [ params . batch_size ] , name = "inputs" ) inputs = public_parsing_ops . encode ( inputs_ph , params . max_input_len , params . vocab_filename , params . encoder_type , params . length_bucket_size > 0 ) inputs = tf . reshape ( inputs , [ params . batch_size , params . max_input_len ] ) features = { "inputs" : inputs } return tf . estimator . export . ServingInputReceiver ( features = features , receiver_tensors = inputs_ph )