docstr: Tests that no errors are raised when provided outputs are valid.
docstr_tok: ["Tests","that","no","errors","are","raised","when","provided","outputs","are","valid","."]
code: def test_supervised_outputs_valid(self):
      """Tests that no errors are raised when provided outputs are valid."""
      with context.graph_mode():
          loss = {"my_loss": constant_op.constant([0])}
          predictions = {"output1": constant_op.constant(["foo"])}
          mean, update_op = metrics_module.mean_tensor(
              constant_op.constant([0])
          )
          metrics = {
              "metrics": (mean, update_op),
              "metrics2": (
                  constant_op.constant([0]),
                  constant_op.constant([10]),
              ),
          }
  
          outputter = MockSupervisedOutput(loss, predictions, metrics)
          self.assertEqual(
              outputter.loss["loss/my_loss"], loss["my_loss"]
          )
          self.assertEqual(
              outputter.predictions["predictions/output1"],
              predictions["output1"],
          )
          self.assertEqual(
              outputter.metrics["metrics/update_op"].name,
              "mean/update_op:0",
          )
          self.assertEqual(
              outputter.metrics["metrics2/update_op"],
              metrics["metrics2"][1],
          )
  
          # Single Tensor is OK too
          outputter = MockSupervisedOutput(
              loss["my_loss"],
              predictions["output1"],
              metrics["metrics"],
          )
          self.assertEqual(outputter.loss, {"loss": loss["my_loss"]})
          self.assertEqual(
              outputter.predictions,
              {"predictions": predictions["output1"]},
          )
          self.assertEqual(
              outputter.metrics["metrics/update_op"].name,
              "mean/update_op:0",
          )
  
imports: from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import metrics
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model.model_utils import export_output
label_desc: Use image node_id 1 for calling the SupervisedOutputTest obj's underlying member method code with example usage: obj.test_supervised_outputs_valid() without return types