parameters: (op)
docstring: Uses the registered shape functions to set the shapes for op's outputs.
docstring_summary: Uses the registered shape functions to set the shapes for op's outputs.
docstring_tokens: Uses the registered shape functions to set the shapes for op s outputs .
function: def set_shapes_for_outputs(op):
    """Uses the registered shape functions to set the shapes for op's outputs."""
    try:
      shape_func = _shape_registry.lookup(op.type)
    except LookupError:
      try:
        shape_func = _default_shape_function_registry.lookup(op.type)
      except LookupError:
        raise RuntimeError("No shape function registered for standard op: %s"
                           % op.type)
    shapes = shape_func(op)
    if shapes is None:
      raise RuntimeError(
          "Shape function for op %s did not return any shapes" % op)
    if len(op.outputs) != len(shapes):
      raise RuntimeError(
          "Shape function for op %s returned %d shapes but expected %d" %
          (op, len(shapes), len(op.outputs)))
    for output, s in zip(op.outputs, shapes):
      output.set_shape(s)
function_tokens: def set_shapes_for_outputs ( op ) : try : shape_func = _shape_registry . lookup ( op . type ) except LookupError : try : shape_func = _default_shape_function_registry . lookup ( op . type ) except LookupError : raise RuntimeError ( "No shape function registered for standard op: %s" % op . type ) shapes = shape_func ( op ) if shapes is None : raise RuntimeError ( "Shape function for op %s did not return any shapes" % op ) if len ( op . outputs ) != len ( shapes ) : raise RuntimeError ( "Shape function for op %s returned %d shapes but expected %d" % ( op , len ( shapes ) , len ( op . outputs ) ) ) for output , s in zip ( op . outputs , shapes ) : output . set_shape ( s )