mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Lint fixes introduced with Rust 1.83 (#2646)
* Fixes for lint errors introduced with Rust 1.83 * rustfmt * Fix more lints. --------- Co-authored-by: Laurent <laurent.mazare@gmail.com>
This commit is contained in:

committed by
GitHub

parent
23ed8a9ded
commit
54e7fc3c97
@ -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 {
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user