8 releases (5 stable)

2.2.1 May 25, 2020
2.1.0 May 8, 2020
1.3.0 Jan 19, 2020
0.2.0 Jan 16, 2020
0.0.1 Jan 11, 2020

#57 in #onnx

23 downloads per month

MIT license

42KB
1K SLoC

onnx-helpers

Documentation Crate

ONNX graph construction helpers.

Usage

[dependencies]
onnx-helpers = { git = "https://github.com/crackcomm/onnx-helpers-rs.git" }

Example

use onnx_helpers::prelude::*;
use onnx_pb::tensor_proto::DataType;

fn main() {
    let mut graph = builder::Graph::new("add");
    let x = graph.input("X").typed(DataType::Float).dim(1).dim(6).node();
    let two = graph.constant("two", 2.0f32);
    let graph = graph.outputs(-(&x - x.mean(1, true)) * two + x);
    let model = graph.model().build();
    save_model("mean-reverse.onnx", &model).unwrap();
}

Credits

Based on onnx-rs.

License

MIT license same as ONNX.


lib.rs:

ONNX model construction helpers.

Dependencies

~8.5MB
~147K SLoC