• Creates a tf.Tensor with all elements set to 0.

    tf.zeros([2, 2]).print();
    

    Type Parameters

    Parameters

    • shape: ShapeMap[R]

      An array of integers defining the output tensor shape.

    • Optional dtype: keyof DataTypeMap

      The type of an element in the resulting tensor. Can be 'float32', 'int32' or 'bool'. Defaults to 'float'.

    Returns Tensor<R>

    Doc