@Properties(inherit=tensorflow.class) public abstract class AbstractTensor extends Pointer implements Indexable
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
AbstractTensor(Pointer p) |
Modifier and Type | Method and Description |
---|---|
static Tensor |
create(boolean[] data,
long... shape) |
static Tensor |
create(boolean[] data,
TensorShape shape) |
static Tensor |
create(byte[] data,
long... shape) |
static Tensor |
create(byte[] data,
TensorShape shape) |
static Tensor |
create(double[] data,
long... shape) |
static Tensor |
create(double[] data,
TensorShape shape) |
static Tensor |
create(float[] data,
long... shape) |
static Tensor |
create(float[] data,
TensorShape shape) |
static Tensor |
create(int[] data,
long... shape) |
static Tensor |
create(int[] data,
TensorShape shape) |
static Tensor |
create(long[] data,
long... shape) |
static Tensor |
create(long[] data,
TensorShape shape) |
static Tensor |
create(short[] data,
long... shape) |
static Tensor |
create(short[] data,
TensorShape shape) |
static Tensor |
create(String[] data,
long... shape) |
static Tensor |
create(String[] data,
TensorShape shape) |
<B extends Buffer> |
createBuffer()
Returns
createBuffer(0) . |
<B extends Buffer> |
createBuffer(long index)
Returns
tensor_data() wrapped in a Buffer of appropriate type starting at given index. |
<I extends Indexer> |
createIndexer()
Returns
createIndexer(true) . |
<I extends Indexer> |
createIndexer(boolean direct) |
StringArray |
createStringArray()
Returns
new StringArray(tensor_data()).capacity(NumElements()).limit(NumElements()) when dtype() == DT_STRING . |
abstract long |
dim_size(int d) |
abstract int |
dims() |
abstract int |
dtype() |
abstract long |
NumElements() |
abstract BytePointer |
tensor_data() |
abstract long |
TotalBytes() |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public AbstractTensor(Pointer p)
public static Tensor create(boolean[] data, long... shape)
public static Tensor create(float[] data, long... shape)
public static Tensor create(double[] data, long... shape)
public static Tensor create(int[] data, long... shape)
public static Tensor create(short[] data, long... shape)
public static Tensor create(byte[] data, long... shape)
public static Tensor create(long[] data, long... shape)
public static Tensor create(boolean[] data, TensorShape shape)
public static Tensor create(float[] data, TensorShape shape)
public static Tensor create(double[] data, TensorShape shape)
public static Tensor create(int[] data, TensorShape shape)
public static Tensor create(short[] data, TensorShape shape)
public static Tensor create(byte[] data, TensorShape shape)
public static Tensor create(long[] data, TensorShape shape)
public static Tensor create(String[] data, TensorShape shape)
public abstract int dtype()
public abstract int dims()
public abstract long dim_size(int d)
public abstract long NumElements()
public abstract long TotalBytes()
public abstract BytePointer tensor_data()
public <B extends Buffer> B createBuffer()
createBuffer(0)
.public <B extends Buffer> B createBuffer(long index)
tensor_data()
wrapped in a Buffer
of appropriate type starting at given index.public <I extends Indexer> I createIndexer()
createIndexer(true)
.public <I extends Indexer> I createIndexer(boolean direct)
createIndexer
in interface Indexable
public StringArray createStringArray()
new StringArray(tensor_data()).capacity(NumElements()).limit(NumElements())
when dtype() == DT_STRING
.Copyright © 2022. All rights reserved.