mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Move the imagenet specific bits to a separate file. (#571)
This commit is contained in:
@ -306,7 +306,7 @@ pub fn main() -> anyhow::Result<()> {
|
||||
|
||||
let device = candle_examples::device(args.cpu)?;
|
||||
|
||||
let image = candle_examples::load_image224(args.image)?;
|
||||
let image = candle_examples::imagenet::load_image224(args.image)?;
|
||||
println!("loaded image {image:?}");
|
||||
|
||||
let model_file = match args.model {
|
||||
@ -331,7 +331,7 @@ pub fn main() -> anyhow::Result<()> {
|
||||
for &(category_idx, pr) in prs.iter().take(5) {
|
||||
println!(
|
||||
"{:24}: {:.2}%",
|
||||
candle_examples::IMAGENET_CLASSES[category_idx],
|
||||
candle_examples::imagenet::CLASSES[category_idx],
|
||||
100. * pr
|
||||
);
|
||||
}
|
||||
|
1023
candle-examples/src/imagenet.rs
Normal file
1023
candle-examples/src/imagenet.rs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user