forked from tracel-ai/burn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df95fc3
commit c4c739d
Showing
2 changed files
with
87 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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: | ||
|
||
```bash | ||
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 - f16 | ||
cargo run --example mnist --release --features tch-cpu # CPU Tch Backend - f32 | ||
``` |