@Namespace(value="torch::data::samplers") @NoOffset @Properties(inherit=torch.class) public class DistributedSequentialSampler extends DistributedSampler
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DistributedSequentialSampler(long size) |
DistributedSequentialSampler(long size,
long num_replicas,
long rank,
boolean allow_duplicates) |
DistributedSequentialSampler(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
index()
Returns the current index of the
DistributedSequentialSampler . |
void |
load(InputArchive archive)
Deserializes the
DistributedSequentialSampler from the archive . |
SizeTVectorOptional |
next(long batch_size)
Returns the next batch of indices.
|
void |
reset() |
void |
reset(SizeTOptional new_size)
Resets the
DistributedSequentialSampler to a new set of indices. |
void |
save(OutputArchive archive)
Serializes the
DistributedSequentialSampler to the archive . |
epoch, set_epoch
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 DistributedSequentialSampler(Pointer p)
Pointer(Pointer)
.public DistributedSequentialSampler(@Cast(value="size_t") long size, @Cast(value="size_t") long num_replicas, @Cast(value="size_t") long rank, @Cast(value="bool") boolean allow_duplicates)
public void reset(@ByVal(nullValue="c10::optional<size_t>(c10::nullopt)") SizeTOptional new_size)
DistributedSequentialSampler
to a new set of indices.public void reset()
@ByVal public SizeTVectorOptional next(@Cast(value="size_t") long batch_size)
public void save(@ByRef OutputArchive archive)
DistributedSequentialSampler
to the archive
.public void load(@ByRef InputArchive archive)
DistributedSequentialSampler
from the archive
.@Cast(value="size_t") @NoException(value=true) public long index()
DistributedSequentialSampler
.Copyright © 2024. All rights reserved.