@Name(value="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 ChunkDataset extends ChunkStatefulDataset
ChunkSampler selects, which chunk to load next,
while the ExampleSampler determins the order of Examples that are returned
in each get_batch call. The hierarchical sampling approach used here is
inspired by this paper http://martin.zinkevich.org/publications/nips2010.pdfPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounteris_stateful| Constructor and Description |
|---|
ChunkDataset(ChunkDataReader chunk_reader,
RandomSampler chunk_sampler,
RandomSampler example_sampler,
ChunkDatasetOptions options) |
ChunkDataset(ChunkDataReader chunk_reader,
RandomSampler chunk_sampler,
RandomSampler example_sampler,
ChunkDatasetOptions options,
Pointer preprocessing_policy) |
ChunkDataset(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RandomSampler |
chunk_sampler() |
ExampleVectorOptional |
get_batch()
Helper method around get_batch as
batch_size is not strictly necessary |
ExampleVectorOptional |
get_batch(long batch_size)
Default get_batch method of BatchDataset.
|
void |
load(InputArchive archive)
Deserializes the statefulDataset's state from the
archive. |
void |
reset()
This will clear any internal state and starts the internal prefetching
mechanism for the chunk dataset.
|
void |
save(OutputArchive archive)
Saves the statefulDataset's state to OutputArchive.
|
SizeTOptional |
size()
size is not used for chunk dataset.
|
is_statefuladdress, 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 ChunkDataset(Pointer p)
Pointer(Pointer).public ChunkDataset(ChunkDataReader chunk_reader, RandomSampler chunk_sampler, RandomSampler example_sampler, ChunkDatasetOptions options)
public ChunkDataset(ChunkDataReader chunk_reader, RandomSampler chunk_sampler, RandomSampler example_sampler, ChunkDatasetOptions options, Pointer preprocessing_policy)
@ByVal public ExampleVectorOptional get_batch(@Cast(value="size_t") long batch_size)
get_batch in class ChunkBatchDataset@ByVal public ExampleVectorOptional get_batch()
batch_size is not strictly necessarypublic void reset()
reset in class ChunkStatefulDataset@ByVal public SizeTOptional size()
size in class ChunkBatchDataset@Cast(value="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>::ChunkSamplerType*") @ByRef public RandomSampler chunk_sampler()
public void save(@ByRef OutputArchive archive)
ChunkStatefulDatasetsave in class ChunkStatefulDatasetpublic void load(@ByRef InputArchive archive)
ChunkStatefulDatasetarchive.load in class ChunkStatefulDatasetCopyright © 2024. All rights reserved.