parameters: (self,
                 source_shape,
                 target_shape,
                 layer_broadcasters,
                 dtype=None)
docstring: Create a broadcaster.
  
      Do not call directly.
      The source_shape, target_shape, and layer_broadcasters are converted
      to have the same dtype.
  
      Note: source_shape.rank and target_shape.rank must be known.
      Args:
        source_shape: the source RaggedShape
        target_shape: the target RaggedShape
        layer_broadcasters: List[_LayerBroadcaster] of length source_shape.rank.
        dtype: the preferred dtype of the broadcaster.
  
      Raises:
        TypeError: if the input types don't match.
docstring_summary: Create a broadcaster.
docstring_tokens: Create a broadcaster .
function: def __init__(self,
                 source_shape,
                 target_shape,
                 layer_broadcasters,
                 dtype=None):
      """Create a broadcaster.
  
      Do not call directly.
      The source_shape, target_shape, and layer_broadcasters are converted
      to have the same dtype.
  
      Note: source_shape.rank and target_shape.rank must be known.
      Args:
        source_shape: the source RaggedShape
        target_shape: the target RaggedShape
        layer_broadcasters: List[_LayerBroadcaster] of length source_shape.rank.
        dtype: the preferred dtype of the broadcaster.
  
      Raises:
        TypeError: if the input types don't match.
      """
      if not isinstance(source_shape, RaggedShape):
        raise TypeError("source_shape is not a RaggedShape")
      if not isinstance(target_shape, RaggedShape):
        raise TypeError("target_shape is not a RaggedShape")
      if not isinstance(layer_broadcasters, list):
        raise TypeError("layer_broadcasters not a list: " +
                        str(layer_broadcasters))
      for bc in layer_broadcasters:
        if not isinstance(bc, _LayerBroadcaster):
          raise TypeError("Not a LayerBroadcaster: " + str(bc))
  
      dtype = _find_dtype(source_shape, dtype)
      dtype = _find_dtype(target_shape, dtype)
      dtype = _find_dtype_iterable(layer_broadcasters, dtype)
      dtype = _find_dtype(dtypes.int64, dtype)
      self._source_shape = source_shape.with_dtype(dtype)
      self._target_shape = target_shape.with_dtype(dtype)
      self._layer_broadcasters = [x.with_dtype(dtype) for x in layer_broadcasters]
function_tokens: def __init__ ( self , source_shape , target_shape , layer_broadcasters , dtype = None ) : if not isinstance ( source_shape , RaggedShape ) : raise TypeError ( "source_shape is not a RaggedShape" ) if not isinstance ( target_shape , RaggedShape ) : raise TypeError ( "target_shape is not a RaggedShape" ) if not isinstance ( layer_broadcasters , list ) : raise TypeError ( "layer_broadcasters not a list: " + str ( layer_broadcasters ) ) for bc in layer_broadcasters : if not isinstance ( bc , _LayerBroadcaster ) : raise TypeError ( "Not a LayerBroadcaster: " + str ( bc ) ) dtype = _find_dtype ( source_shape , dtype ) dtype = _find_dtype ( target_shape , dtype ) dtype = _find_dtype_iterable ( layer_broadcasters , dtype ) dtype = _find_dtype ( dtypes . int64 , dtype ) self . _source_shape = source_shape . with_dtype ( dtype ) self . _target_shape = target_shape . with_dtype ( dtype ) self . _layer_broadcasters = [ x . with_dtype ( dtype ) for x in layer_broadcasters ]