@ProviderType
public class Tensor
extends java.lang.Object
| Constructor and Description |
|---|
Tensor(java.lang.Class<T> type,
TensorDescriptor descriptor,
java.util.List<T> data)
Instantiates a Tensor
|
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.Optional<java.util.List<T>> |
getData(java.lang.Class<T> type)
Return the data contained in the tensor
|
TensorDescriptor |
getDescriptor()
Return the descriptor of the tensor
|
java.lang.Class<?> |
getType()
Return the type of the tensor
|
public Tensor(java.lang.Class<T> type,
TensorDescriptor descriptor,
java.util.List<T> data)
type - the type of tensor data as Java classdescriptor - the TensorDescriptor of this tensordata - the list of data of this tensorpublic TensorDescriptor getDescriptor()
TensorDescriptor of the tensorpublic <T> java.util.Optional<java.util.List<T>> getData(java.lang.Class<T> type)
type - the type of the data as Java class. The type argument must match the type of the tensor.public java.lang.Class<?> getType()
Class of the data contained in the tensor