• Creates rank-6 tf.Tensor with the provided values, shape and dtype.

    The same functionality can be achieved with tf.tensor, but in general we recommend using tf.tensor6d as it makes the code more readable.

    // Pass a nested array.
    tf.tensor6d([[[[[[1],[2]],[[3],[4]]],[[[5],[6]],[[7],[8]]]]]]).print();
    // Pass a flat array and specify a shape.
    tf.tensor6d([1, 2, 3, 4, 5, 6, 7, 8], [1, 1, 2, 2, 2, 1]).print();

    Parameters

    • values: TensorLike6D

      The values of the tensor. Can be nested array of numbers, or a flat array, or a TypedArray.

    • Optional shape: [number, number, number, number, number, number]

      The shape of the tensor. Optional. If not provided, it is inferred from values.

    • Optional dtype: keyof DataTypeMap

      The data type.

    Returns Tensor6D

    Doc

Generated using TypeDoc