From dba31473d40c88fed22574ba96021dc59f25f3f7 Mon Sep 17 00:00:00 2001 From: Nicolas Patry <patry.nicolas@protonmail.com> Date: Wed, 2 Aug 2023 19:18:43 +0200 Subject: Typos and format and CD only when PR lands. --- candle-book/src/inference/hub.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'candle-book') diff --git a/candle-book/src/inference/hub.md b/candle-book/src/inference/hub.md index a974a1fa..b924b76d 100644 --- a/candle-book/src/inference/hub.md +++ b/candle-book/src/inference/hub.md @@ -67,8 +67,8 @@ let bias = weights.get("bert.encoder.layer.0.attention.self.query.bias").unwrap( let linear = Linear::new(weight.clone(), Some(bias.clone())); -let input_ids = Tensor::zeros((3, 7680), DType::F32, &Device::Cpu).unwrap(); -let output = linear.forward(&input_ids); +let input_ids = Tensor::zeros((3, 768), DType::F32, &Device::Cpu).unwrap(); +let output = linear.forward(&input_ids).unwrap(); ``` For a full reference, you can check out the full [bert](https://github.com/LaurentMazare/candle/tree/main/candle-examples/examples/bert) example. -- cgit v1.2.3