@Name(value="torch::data::datasets::Dataset<torch::data::datasets::MNIST,torch::data::Example<torch::Tensor,torch::Tensor> >") @Properties(inherit=torch.class) public class MNISTDataset extends MNISTBatchDataset
Dataset is a BatchDataset, because it supports random access and
therefore batched access is implemented (by default) by calling the random
access indexing function for each index in the requested batch of indices.
This can be customized.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounteris_stateful| Constructor and Description |
|---|
MNISTDataset(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ExampleVector |
get_batch(long... indices) |
ExampleVector |
get_batch(SizeTArrayRef indices)
Returns a batch of data.
|
Example |
get(long index)
Returns the example at the given index.
|
is_stateful, map, sizeaddress, 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 MNISTDataset(Pointer p)
Pointer(Pointer).@ByVal @Cast(value="torch::data::datasets::Dataset<torch::data::datasets::MNIST,torch::data::Example<torch::Tensor,torch::Tensor> >::ExampleType*") public Example get(@Cast(value="size_t") long index)
@ByVal public ExampleVector get_batch(@ByVal SizeTArrayRef indices)
get() for every requested index
in the batch.get_batch in class MNISTBatchDataset@ByVal public ExampleVector get_batch(@ByVal @Cast(value={"size_t*","c10::ArrayRef<size_t>","std::vector<size_t>&"}) @StdVector(value="size_t") long... indices)
get_batch in class MNISTBatchDatasetCopyright © 2025. All rights reserved.