package kaun
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=96d35ce03dfbebd2313657273e24c2e2d20f9e6c7825b8518b69bd1d6ed5870f
sha512=90c5053731d4108f37c19430e45456063e872b04b8a1bbad064c356e1b18e69222de8bfcf4ec14757e71f18164ec6e4630ba770dbcb1291665de5418827d1465
doc/kaun.datasets/Kaun_datasets/index.html
Module Kaun_datasetsSource
Dataset loaders for kaun.
Datasets are downloaded on demand and cached locally under $RAVEN_CACHE_ROOT/datasets/ (or $XDG_CACHE_HOME/raven/datasets/).
val mnist :
?fashion:bool ->
?normalize:bool ->
?data_format:[ `NCHW | `NHWC ] ->
unit ->
(Nx.float32_t * Nx.int32_t) * (Nx.float32_t * Nx.int32_t)mnist () is ((x_train, y_train), (x_test, y_test)).
Images are float32 in [0, 1] (when normalize is true, the default). Labels are int32 class indices.
fashion selects Fashion-MNIST when true. Defaults to false. data_format defaults to `NCHW.
Tensor shapes:
`NCHW: images[N; 1; 28; 28], labels[N]`NHWC: images[N; 28; 28; 1], labels[N]
Raises Failure on download or parsing errors.
val cifar10 :
?normalize:bool ->
?data_format:[ `NCHW | `NHWC ] ->
unit ->
(Nx.float32_t * Nx.int32_t) * (Nx.float32_t * Nx.int32_t)cifar10 () is ((x_train, y_train), (x_test, y_test)).
Images are float32 in [0, 1] (when normalize is true, the default). Labels are int32 class indices (0--9: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck).
data_format defaults to `NCHW.
Tensor shapes:
`NCHW: images[N; 3; 32; 32], labels[N]`NHWC: images[N; 32; 32; 3], labels[N]
Raises Failure on download, extraction, or parsing errors.