parameters: (examples, predictions)
return_statement: return signature_def
docstring: Creates regression signature from given examples and predictions.
  
    This function produces signatures intended for use with the TensorFlow Serving
    Regress API (tensorflow_serving/apis/prediction_service.proto), and so
    constrains the input and output types to those allowed by TensorFlow Serving.
  
    Args:
      examples: A string `Tensor`, expected to accept serialized tf.Examples.
      predictions: A float `Tensor`.
  
    Returns:
      A regression-flavored signature_def.
  
    Raises:
      ValueError: If examples is `None`.
docstring_summary: Creates regression signature from given examples and predictions.
docstring_tokens: Creates regression signature from given examples and predictions .
function: def regression_signature_def(examples, predictions):
    """Creates regression signature from given examples and predictions.
  
    This function produces signatures intended for use with the TensorFlow Serving
    Regress API (tensorflow_serving/apis/prediction_service.proto), and so
    constrains the input and output types to those allowed by TensorFlow Serving.
  
    Args:
      examples: A string `Tensor`, expected to accept serialized tf.Examples.
      predictions: A float `Tensor`.
  
    Returns:
      A regression-flavored signature_def.
  
    Raises:
      ValueError: If examples is `None`.
    """
    if examples is None:
      raise ValueError('Regression examples cannot be None.')
    if not isinstance(examples, ops.Tensor):
      raise ValueError('Regression examples must be a string Tensor.')
    if predictions is None:
      raise ValueError('Regression predictions cannot be None.')
  
    input_tensor_info = utils.build_tensor_info(examples)
    if input_tensor_info.dtype != types_pb2.DT_STRING:
      raise ValueError('Regression examples must be a string Tensor.')
    signature_inputs = {signature_constants.REGRESS_INPUTS: input_tensor_info}
  
    output_tensor_info = utils.build_tensor_info(predictions)
    if output_tensor_info.dtype != types_pb2.DT_FLOAT:
      raise ValueError('Regression output must be a float Tensor.')
    signature_outputs = {signature_constants.REGRESS_OUTPUTS: output_tensor_info}
  
    signature_def = build_signature_def(
        signature_inputs, signature_outputs,
        signature_constants.REGRESS_METHOD_NAME)
  
    return signature_def
function_tokens: def regression_signature_def ( examples , predictions ) : if examples is None : raise ValueError ( 'Regression examples cannot be None.' ) if not isinstance ( examples , ops . Tensor ) : raise ValueError ( 'Regression examples must be a string Tensor.' ) if predictions is None : raise ValueError ( 'Regression predictions cannot be None.' ) input_tensor_info = utils . build_tensor_info ( examples ) if input_tensor_info . dtype != types_pb2 . DT_STRING : raise ValueError ( 'Regression examples must be a string Tensor.' ) signature_inputs = { signature_constants . REGRESS_INPUTS : input_tensor_info } output_tensor_info = utils . build_tensor_info ( predictions ) if output_tensor_info . dtype != types_pb2 . DT_FLOAT : raise ValueError ( 'Regression output must be a float Tensor.' ) signature_outputs = { signature_constants . REGRESS_OUTPUTS : output_tensor_info } signature_def = build_signature_def ( signature_inputs , signature_outputs , signature_constants . REGRESS_METHOD_NAME ) return signature_def