Have a question? Connect with the community at the TensorFlow Forum Visit Forum

TUint8

public interface TUint8

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
tensorOf ( Shape shape)
Allocates a new tensor of the given shape.
abstract static TUint8
tensorOf ( Shape shape, ByteDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
abstract static TUint8
tensorOf ( Shape shape, Consumer< TUint8 > dataInit)
Allocates a new tensor of the given shape and initialize its data.
abstract static TUint8
tensorOf ( NdArray <Byte> src)
Allocates a new tensor which is a copy of a given array of bytes.
abstract static TUint8
vectorOf (byte... values)
Allocates a new tensor for storing a vector of bytes.

Inherited Methods

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