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