parameters: (shape, dtype=dtypes.float32, name=None)
return_statement: return output
docstring: Creates a tensor with all elements set to zero.
  
    This operation returns a tensor of type `dtype` with shape `shape` and
    all elements set to zero.
  
    For example:
  
    ```python
    tf.zeros([3, 4], tf.int32)  # [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
    ```
  
    Args:
      shape: A list of integers, a tuple of integers, or a 1-D `Tensor` of type
        `int32`.
      dtype: The type of an element in the resulting `Tensor`.
      name: A name for the operation (optional).
  
    Returns:
      A `Tensor` with all elements set to zero.
docstring_summary: Creates a tensor with all elements set to zero.
docstring_tokens: Creates a tensor with all elements set to zero .
function: def zeros(shape, dtype=dtypes.float32, name=None):
    """Creates a tensor with all elements set to zero.
  
    This operation returns a tensor of type `dtype` with shape `shape` and
    all elements set to zero.
  
    For example:
  
    ```python
    tf.zeros([3, 4], tf.int32)  # [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
    ```
  
    Args:
      shape: A list of integers, a tuple of integers, or a 1-D `Tensor` of type
        `int32`.
      dtype: The type of an element in the resulting `Tensor`.
      name: A name for the operation (optional).
  
    Returns:
      A `Tensor` with all elements set to zero.
    """
    dtype = dtypes.as_dtype(dtype).base_dtype
    with ops.name_scope(name, "zeros", [shape]) as name:
      if dtype == dtypes.bool:
        zero = False
      elif dtype == dtypes.string:
        zero = ""
      else:
        zero = 0
      # Checking for boolean dtype to prevent attempting to run fill on the GPU
      # which does not have a boolean kernel registered.
      if context.in_eager_mode() and dtype != dtypes.bool:
        return fill(shape, constant(zero, dtype=dtype), name=name)
      try:
        shape = tensor_shape.as_shape(shape)
        output = constant(zero, shape=shape, dtype=dtype, name=name)
      except (TypeError, ValueError):
        shape = ops.convert_to_tensor(shape, dtype=dtypes.int32, name="shape")
        output = fill(shape, constant(zero, dtype=dtype), name=name)
    assert output.dtype.base_dtype == dtype
    return output
function_tokens: def zeros ( shape , dtype = dtypes . float32 , name = None ) : dtype = dtypes . as_dtype ( dtype ) . base_dtype with ops . name_scope ( name , "zeros" , [ shape ] ) as name : if dtype == dtypes . bool : zero = False elif dtype == dtypes . string : zero = "" else : zero = 0 # Checking for boolean dtype to prevent attempting to run fill on the GPU # which does not have a boolean kernel registered. if context . in_eager_mode ( ) and dtype != dtypes . bool : return fill ( shape , constant ( zero , dtype = dtype ) , name = name ) try : shape = tensor_shape . as_shape ( shape ) output = constant ( zero , shape = shape , dtype = dtype , name = name ) except ( TypeError , ValueError ) : shape = ops . convert_to_tensor ( shape , dtype = dtypes . int32 , name = "shape" ) output = fill ( shape , constant ( zero , dtype = dtype ) , name = name ) assert output . dtype . base_dtype == dtype return output