@Name(value="torch::data::datasets::MapDataset<torch::data::datasets::MNIST,torch::data::transforms::Stack<torch::data::Example<torch::Tensor,torch::Tensor> > >") @NoOffset @Properties(inherit=torch.class) public class MNISTMapDataset extends MNISTMapBatchDataset
MapDataset
is a dataset that applies a transform to a source dataset.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
is_stateful
Constructor and Description |
---|
MNISTMapDataset(MNIST dataset,
ExampleStack transform) |
MNISTMapDataset(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
MNIST |
dataset()
Returns the underlying dataset.
|
Example |
get_batch_example(long... indices) |
Example |
get_batch_example(SizeTArrayRef indices)
Gets a batch from the source dataset and applies the transform to it,
returning the result.
|
SizeTOptional |
size()
Returns the size of the source dataset.
|
ExampleStack |
transform()
Returns the transform being applied.
|
get_batch, get_batch, is_stateful
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 MNISTMapDataset(Pointer p)
Pointer(Pointer)
.@Name(value="get_batch") @ByVal public Example get_batch_example(@ByVal SizeTArrayRef indices)
@Name(value="get_batch") @ByVal public Example get_batch_example(@ByVal @Cast(value={"size_t*","c10::ArrayRef<size_t>","std::vector<size_t>&"}) @StdVector long... indices)
@ByVal @NoException(value=true) public SizeTOptional size()
size
in class MNISTMapBatchDataset
@Const @ByRef @NoException(value=true) public MNIST dataset()
@Const @ByRef @NoException(value=true) public ExampleStack transform()
Copyright © 2024. All rights reserved.