Add onnx build script

This commit is contained in:
jamjamjon
2024-05-13 20:24:57 +08:00
parent fc970fc117
commit b9c077814b
13 changed files with 893 additions and 1086 deletions

View File

@@ -39,7 +39,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let feats_image = model.encode_images(&images).unwrap();
// use image to query texts
let matrix = feats_image.dot2(&feats_text)?;
let matrix = match feats_image.embedding() {
Some(x) => x.dot2(feats_text.embedding().unwrap())?,
None => continue,
};
// summary
for i in 0..paths.len() {