@Namespace(value="torch::data::datasets") @NoOffset @Properties(inherit=torch.class) public class MNIST extends MNISTDataset
| Modifier and Type | Class and Description |
|---|---|
static class |
MNIST.Mode
The mode in which the dataset is loaded.
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounteris_stateful| Constructor and Description |
|---|
MNIST(BytePointer root) |
MNIST(BytePointer root,
MNIST.Mode mode)
Loads the MNIST dataset from the
root path. |
MNIST(Pointer p)
Pointer cast constructor.
|
MNIST(String root) |
MNIST(String root,
int mode) |
| Modifier and Type | Method and Description |
|---|---|
Example |
get(long index)
Returns the
Example at the given index. |
Tensor |
images()
Returns all images stacked into a single tensor.
|
boolean |
is_train()
Returns true if this is the training subset of MNIST.
|
SizeTOptional |
size()
Returns the size of the dataset.
|
Tensor |
targets()
Returns all targets stacked into a single tensor.
|
get_batch, get_batchis_stateful, mapaddress, 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 MNIST(Pointer p)
Pointer(Pointer).public MNIST(@StdString BytePointer root, MNIST.Mode mode)
root path.
The supplied root path should contain the *content* of the unzipped
MNIST dataset, available from http://yann.lecun.com/exdb/mnist.public MNIST(@StdString BytePointer root)
public MNIST(@StdString String root, @Cast(value="torch::data::datasets::MNIST::Mode") int mode)
public MNIST(@StdString String root)
@ByVal public Example get(@Cast(value="size_t") long index)
Example at the given index.get in class MNISTDataset@ByVal public SizeTOptional size()
size in class MNISTBatchDataset@Cast(value="bool") @NoException(value=true) public boolean is_train()
Copyright © 2024. All rights reserved.