Skip to content

Commit

Permalink
Fix broken link and other minor fixes (tracel-ai#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
antimora authored Sep 7, 2023
1 parent c0eb339 commit 27952b1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions burn-book/src/building-blocks/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -69,6 +69,6 @@ impl MyModuleConfig {

Then we could add this line to the above `main`:

```rust
```rust, ignore
let my_module = config.init()
```
2 changes: 1 addition & 1 deletion burn-book/src/custom-training-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```
Expand Down
2 changes: 1 addition & 1 deletion burn-book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions burn-book/src/import/onnx-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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"));
}
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions burn-book/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27952b1

Please sign in to comment.