Fork me on GitHub
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood

Module mnist

Search:
Group by:

Procs

proc read_mnist_images(imgsPath: string): Tensor[uint8] {.
noInit, raises: [IOError, Exception, AssertionError], tags: [ReadDirEffect, ReadIOEffect]
.}
Load MNIST images into a Tensor[uint8]
Input:
  • A path to a MNIST images file
Returns:
  • A tensor of images with shape (N, H, W)
    • N, number of images
    • H, height
    • W, width

MNIST data can be downloaded here: http://yann.lecun.com/exdb/mnist/ It must be uncompressed before use. Download and decompression will be automated in the future.

  Source Edit
proc read_mnist_labels(labelsPath: string): Tensor[uint8] {.
noInit, raises: [IOError, Exception, AssertionError], tags: [ReadDirEffect, ReadIOEffect]
.}
Load MNIST labels into a Tensor[uint8]
Input:
  • A path to a MNIST labels file
Returns:
  • A tensor of images with shape (N, H, W)
    • N, number of images
    • H, height
    • W, width

MNIST data can be downloaded here: http://yann.lecun.com/exdb/mnist/ It must be uncompressed before use. Download and decompression will be automated in the future.

  Source Edit