Load a wasi-nn graph from a set of bytes.
(
bytes: &[Vec<u8>],
encoding: GraphEncoding,
target: ExecutionTarget,
)
| 26 | |
| 27 | /// Load a wasi-nn graph from a set of bytes. |
| 28 | pub fn load( |
| 29 | bytes: &[Vec<u8>], |
| 30 | encoding: GraphEncoding, |
| 31 | target: ExecutionTarget, |
| 32 | ) -> Result<Graph> { |
| 33 | graph::load(bytes, encoding, target).map_err(err_as_anyhow) |
| 34 | } |
| 35 | |
| 36 | /// Load a wasi-nn graph by name. |
| 37 | pub fn load_by_name(name: &str) -> Result<Graph> { |