diff --git a/burn-book/src/building-blocks/config.md b/burn-book/src/building-blocks/config.md index 45df3e8ea8..80de7612e1 100644 --- a/burn-book/src/building-blocks/config.md +++ b/burn-book/src/building-blocks/config.md @@ -26,7 +26,7 @@ pub struct MyModuleConfig { The derive also adds useful `with_` methods for every attribute of your config, similar to a builder pattern, along with a `save` method. -```rust +```rust, ignore fn main() { let config = MyModuleConfig::new(512, 2048); println!("{}", config.d_model); // 512 @@ -44,7 +44,7 @@ fn main() { The interest of the Config pattern is to be able to easily create instances, factoried from this config. In that optic, initialization methods should be implemented on the config struct. -```rust +```rust, ignore impl MyModuleConfig { /// Create a module with random weights. pub fn init(&self) -> MyModule { @@ -69,6 +69,6 @@ impl MyModuleConfig { Then we could add this line to the above `main`: -```rust +```rust, ignore let my_module = config.init() ``` diff --git a/burn-book/src/custom-training-loop.md b/burn-book/src/custom-training-loop.md index 9861ee608b..60f548a932 100644 --- a/burn-book/src/custom-training-loop.md +++ b/burn-book/src/custom-training-loop.md @@ -202,7 +202,7 @@ where This will result in the following compilation error: -``` +```console 1. the type parameter `B` is not constrained by the impl trait, self type, or predicates unconstrained type parameter [E0207] ``` diff --git a/burn-book/src/getting-started.md b/burn-book/src/getting-started.md index 87a28cf302..3a3c23446f 100644 --- a/burn-book/src/getting-started.md +++ b/burn-book/src/getting-started.md @@ -53,7 +53,7 @@ operations on every platform, using the GPU. Now open `src/main.rs` and replace its content with -```rust +```rust, ignore use burn::tensor::Tensor; use burn::backend::WgpuBackend; diff --git a/burn-book/src/import/onnx-model.md b/burn-book/src/import/onnx-model.md index 5c93d481db..d5ccdf9bfe 100644 --- a/burn-book/src/import/onnx-model.md +++ b/burn-book/src/import/onnx-model.md @@ -72,7 +72,7 @@ Below is a step-by-step guide to importing an ONNX model into a Burn-based proje Include the `burn-import` crate and use the following Rust code in your `build.rs`: -```rust +```rust, ignore use burn_import::onnx::ModelGen; fn main() { @@ -88,7 +88,7 @@ fn main() { Add this code to the `mod.rs` file located in `src/model`: -```rust +```rust, ignore pub mod mnist { include!(concat!(env!("OUT_DIR"), "/model/mnist.rs")); } @@ -98,7 +98,7 @@ pub mod mnist { Here's how to use the imported model in your application: -```rust +```rust, ignore mod model; use burn::tensor; diff --git a/burn-book/src/overview.md b/burn-book/src/overview.md index d71fe15afc..015b8b94e4 100644 --- a/burn-book/src/overview.md +++ b/burn-book/src/overview.md @@ -12,12 +12,12 @@ advanced user or a beginner. We have crafted some sections for you: - [Building Blocks](./building-blocks): Dive deeper into Burn's core components, understanding how they fit together. This knowledge forms the basis for more advanced usage and customization. -- [Custom Training Loop](./custom-training-loop): Gain the power to customize your training loops, - fine-tuning your models to meet your specific requirements. This section empowers you to harness - Burn's flexibility to its fullest. +- [Custom Training Loop](./custom-training-loop.md): Gain the power to customize your training + loops, fine-tuning your models to meet your specific requirements. This section empowers you to + harness Burn's flexibility to its fullest. -- [Import ONNX Model](./import): Learn how to seamlessly import models from ONNX, expanding your - compatibility with other deep learning ecosystems. +- [Import ONNX Model](./import/onnx-model.md): Learn how to seamlessly import models from ONNX, + expanding your compatibility with other deep learning ecosystems. - [Advanced](./advanced): Finally, venture into advanced topics, exploring Burn's capabilities at their peak. This section caters to those who want to push the boundaries of what's possible with