diff options
Diffstat (limited to 'candle-examples')
-rw-r--r-- | candle-examples/examples/mamba-minimal/model.rs | 2 | ||||
-rw-r--r-- | candle-examples/src/imagenet.rs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/candle-examples/examples/mamba-minimal/model.rs b/candle-examples/examples/mamba-minimal/model.rs index 4a0a345d..7ebea76a 100644 --- a/candle-examples/examples/mamba-minimal/model.rs +++ b/candle-examples/examples/mamba-minimal/model.rs @@ -17,7 +17,7 @@ pub struct Config { impl Config { fn vocab_size(&self) -> usize { let pad = self.pad_vocab_size_multiple; - (self.vocab_size + pad - 1) / pad * pad + self.vocab_size.div_ceil(pad) * pad } fn dt_rank(&self) -> usize { diff --git a/candle-examples/src/imagenet.rs b/candle-examples/src/imagenet.rs index a3b12423..ca77b5df 100644 --- a/candle-examples/src/imagenet.rs +++ b/candle-examples/src/imagenet.rs @@ -6,7 +6,6 @@ pub const IMAGENET_STD: [f32; 3] = [0.229f32, 0.224, 0.225]; /// Loads an image from disk using the image crate at the requested resolution, /// using the given std and mean parameters. /// This returns a tensor with shape (3, res, res). imagenet normalization is applied. - pub fn load_image_with_std_mean<P: AsRef<std::path::Path>>( p: P, res: usize, |