datasets-0.4.0: Classical data sets for statistics and machine learning

LicenseBSD-3-Clause
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Numeric.Datasets.CIFAR10

Description

The binary version contains the files data_batch_1.bin, data_batch_2.bin, ..., data_batch_5.bin, as well as test_batch.bin. Each of these files is formatted as follows:

x labelx pixel ... x labelx pixel

In other words, the first byte is the label of the first image, which is a number in the range 0-9. The next 3072 bytes are the values of the pixels of the image. The first 1024 bytes are the red channel values, the next 1024 the green, and the final 1024 the blue. The values are stored in row-major order, so the first 32 bytes are the red channel values of the first row of the image.

Synopsis

Documentation

data Label Source #

labels of CIFAR-10 dataset. Enum corresponds to binary-based uint8 label.

Instances
Bounded Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Enum Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Eq Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Methods

(==) :: Label -> Label -> Bool #

(/=) :: Label -> Label -> Bool #

Read Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Show Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #

Generic Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Associated Types

type Rep Label :: Type -> Type #

Methods

from :: Label -> Rep Label x #

to :: Rep Label x -> Label #

NFData Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Methods

rnf :: Label -> () #

type Rep Label Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

type Rep Label = D1 (MetaData "Label" "Numeric.Datasets.CIFAR10" "datasets-0.4.0-L5crXIpB7vF3Y59seHQZkS" False) (((C1 (MetaCons "Airplane" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Automobile" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Bird" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Cat" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Deer" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "Dog" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Frog" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Horse" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Ship" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Truck" PrefixI False) (U1 :: Type -> Type)))))

newtype CIFARImage Source #

Data representation of a CIFAR image is a 32x32 RGB image

Constructors

CIFARImage 

Fields

Instances
Eq CIFARImage Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Show CIFARImage Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

NFData CIFARImage Source # 
Instance details

Defined in Numeric.Datasets.CIFAR10

Methods

rnf :: CIFARImage -> () #

image :: CIFARImage -> Image PixelRGB8 Source #

extract the JuicyPixel representation from a CIFAR datapoint

label :: CIFARImage -> Label Source #

extract the label from a CIFAR datapoint

cifarURL :: Url Https Source #

Source URL for cifar-10 and cifar-100

cifar10 :: Dataset CIFARImage Source #

Define a dataset from a source for a CSV file

parseCifar :: Parser CIFARImage Source #

parser for a cifar binary