8-bit unsigned integer tensor type.
Public Methods
abstract static TUint8 |
scalarOf(byte value)
Allocates a new tensor for storing a single byte value.
|
abstract static TUint8 | |
abstract static TUint8 |
tensorOf(Shape shape, ByteDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
|
abstract static TUint8 | |
abstract static TUint8 | |
abstract static TUint8 |
vectorOf(byte... values)
Allocates a new tensor for storing a vector of bytes.
|
Inherited Methods
abstract ByteNdArray | |
abstract NdArraySequence<ByteNdArray> |
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
|
abstract ByteNdArray |
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
|
abstract byte |
getByte(long... coordinates)
Returns the byte value of the scalar found at the given coordinates.
|
abstract Byte |
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
|
abstract ByteNdArray |
read(DataBuffer<Byte> dst)
|
abstract ByteNdArray |
read(ByteDataBuffer dst)
|
abstract NdArraySequence<ByteNdArray> |
scalars()
Returns a sequence of all scalars in this array.
|
abstract ByteNdArray | |
abstract ByteNdArray |
setByte(byte value, long... coordinates)
Assigns the byte value of the scalar found at the given coordinates.
|
abstract ByteNdArray |
setObject(Byte value, long... coordinates)
|
abstract ByteNdArray | |
abstract ByteNdArray |
write(ByteDataBuffer src)
|
abstract ByteNdArray |
write(DataBuffer<Byte> src)
|
abstract NdArray<Byte> | |
abstract NdArraySequence<? extends NdArray<T>> |
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
|
abstract boolean |
equals(Object obj)
Checks equality between n-dimensional arrays.
|
abstract NdArray<Byte> |
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
|
abstract Byte |
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
|
abstract NdArray<Byte> |
read(DataBuffer<Byte> dst)
Read the content of this N-dimensional array into the destination buffer.
|
abstract NdArraySequence<? extends NdArray<T>> |
scalars()
Returns a sequence of all scalars in this array.
|
abstract NdArray<Byte> | |
abstract NdArray<Byte> |
setObject(Byte value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
|
abstract NdArray<Byte> | |
abstract NdArray<Byte> |
abstract RawTensor |
asRawTensor()
Returns a raw (untyped) representation of this tensor
|
abstract void |
close()
Release resources associated with the Tensor.
|
abstract DataType | |
abstract long |
numBytes()
Returns the size, in bytes, of the tensor data.
|
abstract static <T extends TType> T | |
abstract static <T extends TType> T | |
abstract static <T extends TType> T | |
abstract static <T extends TType> T | |
abstract static <T extends TType> T |
of(Class<T> type, Shape shape, ByteDataBuffer rawData)
Creates a Tensor of any type from the raw data provided by the given buffer.
|
abstract Shape |
shape()
Returns the shape of the tensor.
|
abstract void |
close()
|
Public Methods
public static abstract TUint8 scalarOf (byte value)
Allocates a new tensor for storing a single byte value.
Parameters
value | byte to store in the new tensor |
---|
Returns
- the new tensor
public static abstract TUint8 tensorOf (Shape shape)
Allocates a new tensor of the given shape.
Parameters
shape | shape of the tensor to allocate |
---|
Returns
- the new tensor
public static abstract TUint8 tensorOf (Shape shape, ByteDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
Parameters
shape | shape of the tensor to allocate |
---|---|
data | buffer of bytes to initialize the tensor with |
Returns
- the new tensor
public static abstract TUint8 tensorOf (Shape shape, Consumer<TUint8> dataInit)
Allocates a new tensor of the given shape and initialize its data.
Parameters
shape | shape of the tensor to allocate |
---|---|
dataInit | tensor data initializer |
Returns
- the new tensor
Throws
TensorFlowException | if the tensor cannot be allocated or initialized |
---|
public static abstract TUint8 tensorOf (NdArray<Byte> src)
Allocates a new tensor which is a copy of a given array of bytes.
The tensor will have the same shape as the source array and its data will be copied.
Parameters
src | the source array giving the shape and data to the new tensor |
---|
Returns
- the new tensor
public static abstract TUint8 vectorOf (byte... values)
Allocates a new tensor for storing a vector of bytes.
Parameters
values | bytes to store in the new tensor |
---|
Returns
- the new tensor