cifar

package module
v0.0.0-...-5722a3b Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 3 Imported by: 1

README

cifar

Go package that decodes cifar10 and cifar100.

Documentation

Overview

Package cifar is a small package that decodes cifar bin files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cifar100Image

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

Cifar100Image is used for the Cifar 100 image dataset

func Decode100

func Decode100(r io.Reader) ([]*Cifar100Image, error)

Decode100 decodes the CIFAR 100

func (*Cifar100Image) At

func (cif *Cifar100Image) At(x, y int) color.Color

At satisfies the image.Image interface

func (*Cifar100Image) Bounds

func (cif *Cifar100Image) Bounds() image.Rectangle

Bounds satisfies the image.Image interface

func (*Cifar100Image) ColorModel

func (cif *Cifar100Image) ColorModel() color.Model

ColorModel satisfies the image.Image interface

func (*Cifar100Image) Label

func (cif *Cifar100Image) Label() (course, fine byte)

Label returns the course and fine bytes.

func (*Cifar100Image) RawData

func (cif *Cifar100Image) RawData() (data []byte)

RawData passes a slice of if the raw image data. Changes to data will change the underlying structure to cif.

Label byte is excluded from data.

type Cifar10Image

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

Cifar10Image is a cifar 10 image

func Decode10

func Decode10(r io.Reader) ([]*Cifar10Image, error)

Decode10 decodes a cifar bin file

func (*Cifar10Image) At

func (cif *Cifar10Image) At(x, y int) color.Color

At satisfies the image.Image interface

func (*Cifar10Image) Bounds

func (cif *Cifar10Image) Bounds() image.Rectangle

Bounds satisfies the image.Image interface

func (*Cifar10Image) ColorModel

func (cif *Cifar10Image) ColorModel() color.Model

ColorModel satisfies the image.Image interface

func (*Cifar10Image) Label

func (cif *Cifar10Image) Label() byte

Label returns the byte label

func (*Cifar10Image) RawData

func (cif *Cifar10Image) RawData() (data []byte)

RawData passes a slice of if the raw image data. Changes to data will change the underlying structure to cif.

Label byte is excluded from data.

Jump to

Keyboard shortcuts

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