Documentation ¶
Index ¶
Constants ¶
View Source
const ( Width = 28 Height = 28 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RawImage ¶
type RawImage []byte
Image holds the pixel intensities of an image. 255 is foreground (black), 0 is background (white).
func ReadImageFile ¶
func ReadImageFile(name string) (rows, cols int, imgs []RawImage, imgsfloat [][]float64, imgsfloatNorm [][]float64, err error)
ReadImageFile opens the named image file (training or test), parses it and returns all images in order.
func (RawImage) ColorModel ¶
type Set ¶
type Set struct { NRow int NCol int Images []RawImage ImagesFloat [][]float64 ImagesFloatNorm [][]float64 Labels []Label LabelsOneHot [][]float64 }
Set represents a data set of image-label pairs held in memory
func Load ¶
Load reads both the training and the testing MNIST data sets, given a local directory dir, containing the MNIST distribution files.
func ReadSet ¶
ReadSet reads a set from the images file iname and the corresponding labels file lname
Click to show internal directories.
Click to hide internal directories.