diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-08-18 11:58:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 11:58:06 +0100 |
commit | 95462c6a2e63e90e84db348aed3ac43fe3da580d (patch) | |
tree | 0ad3e1c28ecd8592bc84ef3b7136ba37a7e87dd3 /candle-book | |
parent | b9661a1c25a509160bef045e4c9570745aa15abc (diff) | |
download | candle-95462c6a2e63e90e84db348aed3ac43fe3da580d.tar.gz candle-95462c6a2e63e90e84db348aed3ac43fe3da580d.tar.bz2 candle-95462c6a2e63e90e84db348aed3ac43fe3da580d.zip |
Add a vision transformer example (dino-v2). (#502)
* Add a vision transformer example (dino-v2).
* Add some documentation + test.
* CI fix.
* Another fix (still unable to replicate the errors locally :( )
Diffstat (limited to 'candle-book')
-rw-r--r-- | candle-book/src/guide/hello_world.md | 2 | ||||
-rw-r--r-- | candle-book/src/inference/hub.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/candle-book/src/guide/hello_world.md b/candle-book/src/guide/hello_world.md index 5b32181d..fc4af0e1 100644 --- a/candle-book/src/guide/hello_world.md +++ b/candle-book/src/guide/hello_world.md @@ -147,7 +147,7 @@ And rewrite our examples using it # extern crate candle_core; # extern crate candle_nn; use candle_core::{DType, Device, Result, Tensor}; -use candle_nn::Linear; +use candle_nn::{Linear, Module}; struct Model { first: Linear, diff --git a/candle-book/src/inference/hub.md b/candle-book/src/inference/hub.md index b924b76d..4bd69c14 100644 --- a/candle-book/src/inference/hub.md +++ b/candle-book/src/inference/hub.md @@ -58,7 +58,7 @@ Now that we have our weights, we can use them in our bert architecture: # # let weights = repo.get("model.safetensors").unwrap(); use candle_core::{Device, Tensor, DType}; -use candle_nn::Linear; +use candle_nn::{Linear, Module}; let weights = candle_core::safetensors::load(weights, &Device::Cpu).unwrap(); |