@Name(value="javacpp::Dataset<torch::Tensor,torch::data::example::NoTarget>") @Properties(inherit=torch.class) public class JavaTensorDataset extends JavaTensorDatasetBase
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
is_stateful
Constructor and Description |
---|
JavaTensorDataset()
Default native constructor.
|
JavaTensorDataset(long size)
Native array allocator.
|
JavaTensorDataset(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
TensorExampleVector |
get_batch(SizeTArrayRef indices)
Returns a batch of data.
|
TensorExample |
get(long index)
Returns the example at the given index.
|
JavaTensorDataset |
getPointer(long i) |
JavaTensorDataset |
position(long position) |
SizeTOptional |
size()
Returns the size of the dataset, or an empty optional if it is unsized.
|
get_batch
is_stateful
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public JavaTensorDataset()
public JavaTensorDataset(long size)
Pointer.position(long)
.public JavaTensorDataset(Pointer p)
Pointer(Pointer)
.public JavaTensorDataset position(long position)
public JavaTensorDataset getPointer(long i)
getPointer
in class Pointer
@Virtual(value=true) @ByVal public TensorExample get(@Cast(value="size_t") long index)
JavaTensorDatasetBase
get
in class JavaTensorDatasetBase
@Virtual(value=true) @ByVal @Const(value={false,false,true}) public SizeTOptional size()
JavaTensorBatchDataset
size
in class JavaTensorBatchDataset
@Virtual @ByVal public TensorExampleVector get_batch(@ByVal SizeTArrayRef indices)
JavaTensorDatasetBase
get()
for every requested index
in the batch.get_batch
in class JavaTensorDatasetBase
Copyright © 2024. All rights reserved.