Class TensorMapper<T extends TType>
java.lang.Object
org.tensorflow.TensorMapper<T>
- Type Parameters:
T- tensor type mapped by this object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TMaps the provided dense rawtensoras a tensor of typeT.protected abstract SparseTensor<T> mapSparse(TInt64 indices, T values, TInt64 denseShape, PointerScope tensorScope) Maps the provided densetensorsas a sparse tensor of typeT.protected static TF_TensornativeHandle(RawTensor tensor) Helper for retrieving the native handle of a raw tensor
-
Constructor Details
-
TensorMapper
public TensorMapper()
-
-
Method Details
-
mapDense
-
mapSparse
protected abstract SparseTensor<T> mapSparse(TInt64 indices, T values, TInt64 denseShape, PointerScope tensorScope) Maps the provided densetensorsas a sparse tensor of typeT.- Parameters:
indices- indices of the non-default values in a dense spacevalues- non-default values of the tensordenseShape- size of the dimensions definining the shape of the sparse tensor in a dense space.tensorScope- scope to extend to keep a reference on the sub-tensors composing this sparse tensor- Returns:
- an instance of
T.
-
nativeHandle
Helper for retrieving the native handle of a raw tensor- Parameters:
tensor- a raw tensor- Returns:
- the native handle of that tensor
- Throws:
IllegalStateException- if the tensor has been released
-