@Name(value="torch::data::datasets::SharedBatchDataset<torch::data::datasets::ChunkDataset<JavaCPP_torch_0003a_0003adata_0003a_0003adatasets_0003a_0003aChunkDataReader_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_0002cstd_0003a_0003avector_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_00020_0003e_00020_0003e,torch::data::samplers::RandomSampler,torch::data::samplers::RandomSampler> >") @NoOffset @Properties(inherit=torch.class) public class ChunkSharedBatchDataset extends ChunkBatchSharedBatchDataset
BatchDataset API, delegating all calls to the shared instance. This is
useful when you want all worker threads in the dataloader to access the same
dataset instance. The dataset must take care of synchronization and
thread-safe access itself.
Use torch::data::datasets::make_shared_dataset() to create a new
SharedBatchDataset like you would a std::shared_ptr.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounteris_stateful| Constructor and Description |
|---|
ChunkSharedBatchDataset(ChunkDataset shared_dataset)
Constructs a new
SharedBatchDataset from a shared_ptr to the
UnderlyingDataset. |
ChunkSharedBatchDataset(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ChunkDataset |
access()
Accesses the underlying dataset.
|
ExampleVectorOptional |
get_batch(long request)
Calls
get_batch on the underlying dataset. |
ChunkDataset |
multiply()
Accesses the underlying dataset.
|
void |
reset()
Calls
reset() on the underlying dataset. |
SizeTOptional |
size()
Returns the
size from the underlying dataset. |
is_stateful, mapaddress, 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, zeropublic ChunkSharedBatchDataset(Pointer p)
Pointer(Pointer).public ChunkSharedBatchDataset(@SharedPtr ChunkDataset shared_dataset)
SharedBatchDataset from a shared_ptr to the
UnderlyingDataset.@ByVal @Cast(value="torch::data::datasets::SharedBatchDataset<torch::data::datasets::ChunkDataset<JavaCPP_torch_0003a_0003adata_0003a_0003adatasets_0003a_0003aChunkDataReader_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_0002cstd_0003a_0003avector_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_00020_0003e_00020_0003e,torch::data::samplers::RandomSampler,torch::data::samplers::RandomSampler> >::BatchType*") public ExampleVectorOptional get_batch(@Cast(value="torch::data::datasets::SharedBatchDataset<torch::data::datasets::ChunkDataset<JavaCPP_torch_0003a_0003adata_0003a_0003adatasets_0003a_0003aChunkDataReader_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_0002cstd_0003a_0003avector_0003ctorch_0003a_0003adata_0003a_0003aExample_0003ctorch_0003a_0003aTensor_0002ctorch_0003a_0003aTensor_0003e_00020_0003e_00020_0003e,torch::data::samplers::RandomSampler,torch::data::samplers::RandomSampler> >::BatchRequestType") long request)
get_batch on the underlying dataset.get_batch in class ChunkBatchSharedBatchDataset@ByVal public SizeTOptional size()
size from the underlying dataset.size in class ChunkBatchSharedBatchDataset@ByRef @Name(value="operator *") public ChunkDataset multiply()
@Name(value="operator ->") public ChunkDataset access()
public void reset()
reset() on the underlying dataset.Copyright © 2024. All rights reserved.