public interface SessionMemMgr extends Closeable
| Modifier and Type | Method and Description |
|---|---|
INDArray |
allocate(boolean detached,
DataType dataType,
long... shape)
Allocate an array with the specified datatype and shape.
NOTE: This array should be assumed to be uninitialized - i.e., contains random values. |
INDArray |
allocate(boolean detached,
LongShapeDescriptor descriptor)
As per
allocate(boolean, DataType, long...) but from a LongShapeDescriptor instead |
void |
close()
Close the session memory manager and clean up any memory / resources, if any
|
INDArray |
dup(INDArray arr)
Duplicate the specified array, to an array that is managed/allocated by the session memory manager
|
void |
release(INDArray array)
Release the array.
|
INDArray |
ulike(INDArray arr)
Allocate an uninitialized array with the same datatype and shape as the specified array
|
INDArray allocate(boolean detached, DataType dataType, long... shape)
detached - If true: the array is safe to return outside of the SameDiff session run (for example, the array
is one that may be returned to the user)dataType - Datatype of the returned arrayshape - Array shapeINDArray allocate(boolean detached, LongShapeDescriptor descriptor)
allocate(boolean, DataType, long...) but from a LongShapeDescriptor insteadINDArray ulike(INDArray arr)
INDArray dup(INDArray arr)
void release(INDArray array)
array - The array that can be releasedvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2021. All rights reserved.