@Name(value="torch::data::DataLoaderBase<torch::data::datasets::MapDataset<torch::data::datasets::MNIST,torch::data::transforms::Stack<torch::data::Example<torch::Tensor,torch::Tensor> > >,torch::data::Example<torch::Tensor,torch::Tensor>,std::vector<size_t> >") @NoOffset @Properties(inherit=torch.class) public class MNISTRandomDataLoaderBase extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
MNISTRandomDataLoaderBase(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
ExampleIterator |
begin()
Returns an iterator into the DataLoader.
|
ExampleIterator |
end()
Returns a special "sentinel" iterator that compares equal with a
non-sentinel iterator once the DataLoader is exhausted.
|
void |
join()
Joins the DataLoader's worker threads and drains internal queues.
|
FullDataLoaderOptions |
options()
Returns the options with which the DataLoader was configured.
|
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 MNISTRandomDataLoaderBase(Pointer p)
Pointer(Pointer)
.@ByVal public ExampleIterator begin()
OutputIterator
. See
https://en.cppreference.com/w/cpp/named_req/OutputIterator for what this
means. In short: you may increment the iterator and dereference it, but
cannot go back, or step forward more than one position at a time. When the
DataLoader is exhausted, it will compare equal with the special
"sentinel" iterator returned by DataLoader::end()
. Most of the time, you
should only use range-for loops to loop over the DataLoader, but
standard algorithms like std::copy(dataloader.begin(), dataloader.end(),
output_iterator)
are supported too.@ByVal public ExampleIterator end()
public void join()
@Const @ByRef @NoException(value=true) public FullDataLoaderOptions options()
Copyright © 2024. All rights reserved.