@TensorType(dataType=DT_INT32, byteSize=4, mapperClass=TInt32Mapper.class) public interface TInt32 extends org.tensorflow.ndarray.IntNdArray, TIntegral
Modifier and Type | Method and Description |
---|---|
static TInt32 |
scalarOf(int value)
Allocates a new tensor for storing a single int value.
|
static TInt32 |
tensorOf(org.tensorflow.ndarray.NdArray<Integer> src)
Allocates a new tensor which is a copy of a given array of ints.
|
static TInt32 |
tensorOf(org.tensorflow.ndarray.Shape shape)
Allocates a new tensor of the given shape.
|
static TInt32 |
tensorOf(org.tensorflow.ndarray.Shape shape,
Consumer<TInt32> dataInit)
Allocates a new tensor of the given shape and initialize its data.
|
static TInt32 |
tensorOf(org.tensorflow.ndarray.Shape shape,
org.tensorflow.ndarray.buffer.IntDataBuffer data)
Allocates a new tensor of the given shape, initialized with the provided data.
|
static TInt32 |
vectorOf(int... values)
Allocates a new tensor for storing a vector of ints.
|
static TInt32 scalarOf(int value)
value
- int to store in the new tensorstatic TInt32 vectorOf(int... values)
values
- ints to store in the new tensorIllegalArgumentException
- if no values are providedstatic TInt32 tensorOf(org.tensorflow.ndarray.NdArray<Integer> 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 TInt32 tensorOf(org.tensorflow.ndarray.Shape shape)
shape
- shape of the tensor to allocatestatic TInt32 tensorOf(org.tensorflow.ndarray.Shape shape, org.tensorflow.ndarray.buffer.IntDataBuffer data)
shape
- shape of the tensor to allocatedata
- buffer of ints to initialize the tensor withCopyright © 2015–2022. All rights reserved.