Packages

class DenseBytesTensor extends ByteBufferDenseTensor

Dense tensor which can be converted from/to a TensorFlow tensor object. The underlying data is backed up by ByteBuffer, using TensorFlow-compatible format: https://github.com/tensorflow/tensorflow/blob/98c0deb828c2f98f0d6d77a12d32f3b33ed92887/tensorflow/c/c_api.h#L206.

All individual byte[] are added up in one ByteBuffer. ByteBuffer contains byte[] length (as a varint/ULEB128 https://en.wikipedia.org/wiki/LEB128#Unsigned_LEB128), followed by the contents of the byte[] at data[start_offset[i]]]

start_offset: array[uint64] data: byte[...] [offset A][offset B][offset C][length A][data A][length B][data B][length C][data C].

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DenseBytesTensor
  2. ByteBufferDenseTensor
  3. DenseTensor
  4. TensorData
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DenseBytesTensor(byteBuffer: ByteBuffer, shape: Array[Long], types: Array[Representable], cardinality: Int)
  2. new DenseBytesTensor(byteBuffer: ByteBuffer, shape: Array[Long])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asList(): List[_]

    returns

    the list of values in their unraveled order. This in combination with the shape is enough to restore the entire tensor, as the dimensions can be calculated from the shape.

    Definition Classes
    DenseBytesTensor → DenseTensor
    Annotations
    @Override()
  6. def cardinality(): Int

    returns

    exact number of entries in the mapping from dimensions to values.

    Definition Classes
    ByteBufferDenseTensor → TensorData
    Annotations
    @Override()
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def estimatedCardinality(): Int

    returns

    conservative estimate of number of entries in the mapping from dimensions to values. Can be cheaper to evaluate than the exact one.

    Definition Classes
    ByteBufferDenseTensor → TensorData
    Annotations
    @Override()
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def getArity(): Int

    returns

    the arity, which is the total number of columns. As columns are dimensions plus a value, arity is by one greater than dimensionality.

    Definition Classes
    TensorData
  13. def getByteBuffer(makeCopy: Boolean): ByteBuffer
    Definition Classes
    ByteBufferDenseTensor
  14. def getByteBuffer(): ByteBuffer
    Definition Classes
    ByteBufferDenseTensor
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def getShape(): Array[Long]

    returns

    the current shape of the data or the supplied shape of the data

    Definition Classes
    ByteBufferDenseTensor → TensorData
    Annotations
    @Override()
  17. def getTypes(): Array[Representable]

    returns

    the types of all dimensions and the value as a single array.

    Definition Classes
    ByteBufferDenseTensor → TensorData
    Annotations
    @Override()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def isEmpty(): Boolean
    Definition Classes
    TensorData
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def iterator(): TensorIterator

    returns

    an iterator over entries in the mapping from dimensions to the value.

    Definition Classes
    DenseBytesTensor → TensorData
    Annotations
    @Override()
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from ByteBufferDenseTensor

Inherited from DenseTensor

Inherited from TensorData

Inherited from AnyRef

Inherited from Any

Ungrouped