mnist

package
Version: v0.9.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

README

This package contains primitives to read the mnist dataset as exposed on [Yann LeCun's website](

It exposes a single Load method that creates tensors from the data sets.

Take a look at the convnet directoy for a neural net implementation using the mnist dataset.

more info on the Gorgonia website: https://gorgonia.org/tutorials/mnist/

Documentation

Overview

package mnist handles the mnist data set

Index

Constants

View Source
const (

	// Width of the input tensor / picture
	Width = 28
	// Height of the input tensor / picture
	Height = 28
)

Variables

This section is empty.

Functions

func Load

func Load(typ, loc string, as tensor.Dtype) (inputs, targets tensor.Tensor, err error)

Load loads the mnist data into two tensors

typ can be "train", "test"

loc represents where the mnist files are held

Types

type Label

type Label uint8

Label is a digit label in 0 to 9

type RawImage

type RawImage []byte

Image holds the pixel intensities of an image. 255 is foreground (black), 0 is background (white).

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL