mnist

package
v0.0.0-...-7ce53e0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

package mnist handles the mnist data set

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 NewMnistDataset

func NewMnistDataset(dataloc string, epochs int) dataset.Dataset

NewMnistDataset wil create a new MnistDataset instance.

Types

type Label

type Label uint8

Label is a digit label in 0 to 9

type MnistDataset

type MnistDataset struct {
	// contains filtered or unexported fields
}

MnistDataset is the object that describes the mnist dataset.

func (*MnistDataset) Epochs

func (fd *MnistDataset) Epochs() int

Epochs returns the number of epochs that should run during training.

func (*MnistDataset) TestRatio

func (fd *MnistDataset) TestRatio() float64

TestRatio returns how much can of the dataset can be used for validating the network.

func (*MnistDataset) XY

XY returns the data to be trained.

type RawImage

type RawImage []byte

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

Jump to

Keyboard shortcuts

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