burn/examples/mnist
Aisuko 4e8b573f13
Fixed the wrong order of the attributes (#930)
Signed-off-by: GitHub <noreply@github.com>
2023-11-03 09:21:58 -04:00
..
examples [Breaking] Refactor Backend Names (#904) 2023-10-29 18:27:49 -04:00
src Fixed the wrong order of the attributes (#930) 2023-11-03 09:21:58 -04:00
Cargo.toml Chore: Bump version for next release (#900) 2023-10-24 19:31:13 -04:00
README.md Refactor/example/text classification (#527) 2023-07-25 09:50:00 -04:00

README.md

MNIST

The example is showing you how to:

  • Define your own custom module (MLP).
  • Create the data pipeline from a raw dataset to a batched multi-threaded fast DataLoader.
  • Configure a learner to display and log metrics as well as to keep training checkpoints.

The example can be run like so:

git clone https://github.com/burn-rs/burn.git
cd burn
# Use the --release flag to really speed up training.
echo "Using ndarray backend"
cargo run --example mnist --release --features ndarray                # CPU NdArray Backend - f32 - single thread
cargo run --example mnist --release --features ndarray-blas-openblas  # CPU NdArray Backend - f32 - blas with openblas
cargo run --example mnist --release --features ndarray-blas-netlib    # CPU NdArray Backend - f32 - blas with netlib
echo "Using tch backend"
export TORCH_CUDA_VERSION=cu113                                       # Set the cuda version
cargo run --example mnist --release --features tch-gpu                # GPU Tch Backend - f32
cargo run --example mnist --release --features tch-cpu                # CPU Tch Backend - f32
echo "Using wgpu backend"
cargo run --example mnist --release --features wgpu