Fix broken link and other minor fixes (#780)

This commit is contained in:
Dilshod Tadjibaev 2023-09-07 06:44:57 -06:00 committed by GitHub
parent c0eb339a8e
commit 27952b1f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 13 deletions

View File

@ -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()
```

View File

@ -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]
```

View File

@ -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;

View File

@ -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;

View File

@ -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