@TensorType(dataType=DT_UINT8, byteSize=1, mapperClass=TUint8Mapper.class) public interface TUint8 extends org.tensorflow.ndarray.ByteNdArray, TIntegral
Modifier and Type | Method and Description |
---|---|
static TUint8 |
scalarOf(byte value)
Allocates a new tensor for storing a single byte value.
|
static TUint8 |
tensorOf(org.tensorflow.ndarray.NdArray<Byte> src)
Allocates a new tensor which is a copy of a given array of bytes.
|
static TUint8 |
tensorOf(org.tensorflow.ndarray.Shape shape)
Allocates a new tensor of the given shape.
|
static TUint8 |
tensorOf(org.tensorflow.ndarray.Shape shape,
org.tensorflow.ndarray.buffer.ByteDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
|
static TUint8 |
tensorOf(org.tensorflow.ndarray.Shape shape,
Consumer<TUint8> dataInit)
Allocates a new tensor of the given shape and initialize its data.
|
static TUint8 |
vectorOf(byte... values)
Allocates a new tensor for storing a vector of bytes.
|
static TUint8 scalarOf(byte value)
value
- byte to store in the new tensorstatic TUint8 vectorOf(byte... values)
values
- bytes to store in the new tensorstatic TUint8 tensorOf(org.tensorflow.ndarray.NdArray<Byte> src)
The tensor will have the same shape as the source array and its data will be copied.
src
- the source array giving the shape and data to the new tensorstatic TUint8 tensorOf(org.tensorflow.ndarray.Shape shape)
shape
- shape of the tensor to allocatestatic TUint8 tensorOf(org.tensorflow.ndarray.Shape shape, org.tensorflow.ndarray.buffer.ByteDataBuffer data)
shape
- shape of the tensor to allocatedata
- buffer of bytes to initialize the tensor withstatic TUint8 tensorOf(org.tensorflow.ndarray.Shape shape, Consumer<TUint8> dataInit)
shape
- shape of the tensor to allocatedataInit
- tensor data initializerTensorFlowException
- if the tensor cannot be allocated or initializedCopyright © 2015–2022. All rights reserved.