mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 11:37:11 +00:00
PyO3: Add optional candle.onnx
module (#1282)
* Start onnx integration * Merge remote-tracking branch 'upstream/main' into feat/pyo3-onnx * Implement ONNXModel * `fmt` * add `onnx` flag to python ci * Pin `protoc` to `25.0` * Setup `protoc` in wheel builds * Build wheels with `onnx` * Install `protoc` in manylinux containers * `apt` -> `yum` * Download `protoc` via bash script * Back to `manylinux: auto` * Disable `onnx` builds for linux
This commit is contained in:
@ -98,7 +98,7 @@ fn get_attr_opt<'a, T: Attr + ?Sized>(
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tensor(t: &onnx::TensorProto, name: &str) -> Result<Tensor> {
|
||||
pub fn get_tensor(t: &onnx::TensorProto, name: &str) -> Result<Tensor> {
|
||||
let dims: Vec<usize> = t.dims.iter().map(|&x| x as usize).collect();
|
||||
match DataType::try_from(t.data_type) {
|
||||
Ok(DataType::Int32) => {
|
||||
|
Reference in New Issue
Block a user