Improve the ONNX basic example + bugfixes (#1266)

* Generate some zeros tensor in the onnx simple-eval example.

* Fix the casting operation.

* Support more ops.

* Handle reshape.

* Concat.

* Softmax.
This commit is contained in:
Laurent Mazare
2023-11-04 10:02:47 +01:00
committed by GitHub
parent f7c957d64f
commit bc9a1bf239
3 changed files with 190 additions and 52 deletions

View File

@ -6,7 +6,7 @@ pub mod onnx {
}
mod eval;
pub use eval::simple_eval;
pub use eval::{dtype, simple_eval};
pub fn read_file<P: AsRef<std::path::Path>>(p: P) -> Result<onnx::ModelProto> {
let buf = std::fs::read(p)?;