AbstractTF_Tensor

public abstract class AbstractTF_Tensor
Known Direct Subclasses

Public Constructors

Public Methods

static TF_Tensor
allocateTensor (int dtype, long[] dims, long length)
Calls TF_AllocateTensor(), and registers a deallocator.
void
delete ()
Calls the deallocator, if registered, otherwise has no effect.
static TF_Tensor
newTensor (int dtype, long[] dims, Pointer data)
Calls TF_NewTensor(), and registers a deallocator.
TF_Tensor
withDeallocator ()
Registers a deallocator and returns this.

Inherited Methods

Public Constructors

public AbstractTF_Tensor (Pointer p)

Public Methods

public static TF_Tensor allocateTensor (int dtype, long[] dims, long length)

Calls TF_AllocateTensor(), and registers a deallocator.

Returns
  • TF_Tensor created. Do not call TF_DeleteTensor() on it.

public void delete ()

Calls the deallocator, if registered, otherwise has no effect.

public static TF_Tensor newTensor (int dtype, long[] dims, Pointer data)

Calls TF_NewTensor(), and registers a deallocator.

Returns
  • TF_Tensor created. Do not call TF_DeleteTensor() on it.

public TF_Tensor withDeallocator ()

Registers a deallocator and returns this.