mirror of https://github.com/tracel-ai/burn.git
Fix broken link and other minor fixes (#780)
This commit is contained in:
parent
c0eb339a8e
commit
27952b1f47
|
@ -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()
|
||||
```
|
||||
|
|
|
@ -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]
|
||||
```
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue