dense

Crates.iodense
lib.rsdense
version2.0.0
sourcesrc
created_at2020-11-22 11:39:34.383316
updated_at2021-08-06 16:20:41.229428
descriptionAn encoder/decoder to/from dense files.
homepage
repositoryhttps://github.com/JonathanWoollett-Light/dense
max_upload_size
id314971
size6,913
Jonathan Woollett-Light (JonathanWoollett-Light)

documentation

https://docs.rs/dense/

README

Dense

Crates.io lib.rs.io docs

An encoder/decoder to/from dense files.

A file format simpler and denser than MNIST, a dense file is binary file of sequential training examples and nothing else (example->label->example->label->etc.).

MNIST Testing data

Format Size Size on disk
MNIST 7,850,024 7,856,128
Dense 7,850,000 7,852,032

Example

use ndarray::{Array2,array};

let data: Array2<u8> = array![[0, 0], [1, 0], [0, 1], [1, 1]];
let labels: Array2<u16> = array![[0], [1], [1], [0]];

dense::write("dense_reader",&data,&labels).unwrap();

let (read_data,read_labels) = dense::read::<u8,u16>("dense_reader",2).unwrap();

assert_eq!(read_data,data);
assert_eq!(read_labels,labels);
Commit count: 18

cargo fmt