Interface TensorData.Builder

  • Method Details

    • data

      The raw tensor data as JSON. The format is determined by the dtype field: integer arrays for int64, floating-point arrays for float32.

      Parameters:
      data - The raw tensor data as JSON. The format is determined by the dtype field: integer arrays for int64, floating-point arrays for float32.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dtype

      TensorData.Builder dtype(String dtype)

      The data type of the tensor elements, such as int64 or float32.

      Parameters:
      dtype - The data type of the tensor elements, such as int64 or float32.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • shape

      The dimensions of the tensor, such as [batch_size, seq_length].

      Parameters:
      shape - The dimensions of the tensor, such as [batch_size, seq_length].
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • shape

      TensorData.Builder shape(Integer... shape)

      The dimensions of the tensor, such as [batch_size, seq_length].

      Parameters:
      shape - The dimensions of the tensor, such as [batch_size, seq_length].
      Returns:
      Returns a reference to this object so that method calls can be chained together.