Boolean tensor type.
If direct memory mapping is not available in the JVM, tensors of this type might require an
explicit mapping between Java boolean values and byte buffers using the BOOL
layout, which may impact I/O performances.
Public Methods
abstract static TBool |
scalarOf(boolean value)
Allocates a new tensor for storing a single boolean value.
|
abstract static TBool |
tensorOf(Shape shape, BooleanDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
|
abstract static TBool | |
abstract static TBool | |
abstract static TBool | |
abstract static TBool |
vectorOf(boolean... values)
Allocates a new tensor for storing a vector of booleans.
|
Inherited Methods
Public Methods
public static abstract TBool scalarOf (boolean value)
Allocates a new tensor for storing a single boolean value.
Parameters
value | boolean to store in the new tensor |
---|
Returns
- the new tensor
public static abstract TBool tensorOf (Shape shape, BooleanDataBuffer 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 booleans to initialize the tensor with |
Returns
- the new tensor
public static abstract TBool 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 TBool tensorOf (NdArray<Boolean> src)
Allocates a new tensor which is a copy of a given array of booleans.
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 TBool tensorOf (Shape shape, Consumer<TBool> 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 TBool vectorOf (boolean... values)
Allocates a new tensor for storing a vector of booleans.
Parameters
values | booleans to store in the new tensor |
---|
Returns
- the new tensor