diff --git a/Cargo.toml b/Cargo.toml index a3bc1b4..9fbeed2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ rand = "0.8" # weight init, dropout masks, shuffling rand_distr = "0.4" # normal distribution rayon = "1.8" # data parallelism on the CPU paths libm = "0.2" # erff, for exact GELU -ureq = "2.9" # dataset download +ureq = "3.4" # dataset download flate2 = "1.0" # dataset decompression [build-dependencies] diff --git a/src/data/mnist.rs b/src/data/mnist.rs index 25c896b..b2129e0 100644 --- a/src/data/mnist.rs +++ b/src/data/mnist.rs @@ -135,7 +135,10 @@ fn download_missing(cache: &Path, files: &[&str]) -> Result<()> { .map_err(|e| Error::Dataset(format!("could not fetch {url}: {e}")))?; let mut compressed = Vec::new(); - response.into_reader().read_to_end(&mut compressed)?; + response + .into_body() + .into_reader() + .read_to_end(&mut compressed)?; let mut raw = Vec::new(); flate2::read::GzDecoder::new(&compressed[..]).read_to_end(&mut raw)?;