mnist icon indicating copy to clipboard operation
mnist copied to clipboard

panicked at 'Unable to find path to images at "data/train-images-idx3-ubyte".'

Open JiatLn opened this issue 10 months ago • 1 comments

here are some test code

use mnist::MnistBuilder;

#[test]
fn test_mnist() {

    let mnist = MnistBuilder::new()
        .label_format_digit()
        .training_set_length(50_000)
        .validation_set_length(10_000)
        .test_set_length(10_000)
        .finalize();
    
    dbg!(mnist.trn_img);
    dbg!(mnist.trn_lbl);
}
  • cargo.toml
[dependencies]
mnist = "0.5.0"

and got error

running 1 test
thread 'test_mnist' panicked at 'Unable to find path to images at "data/train-images-idx3-ubyte".'

how could i fix it?

JiatLn avatar Sep 01 '23 06:09 JiatLn

Are the files present on your machine? The setup docs give some helpful context.

MnistBuilder::download_and_extract also looks helpful.

mr-brobot avatar Nov 28 '23 15:11 mr-brobot