| /wasmtime-44.0.1/crates/wasi-nn/src/backend/ |
| H A D | pytorch.rs | 7 use crate::wit::types::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 11 use tch::{CModule, Device, Kind, TchError, Tensor as TchTensor}; 97 inputs: Vec<Option<tch::Tensor>>, 98 output: tch::Tensor, 107 fn set_input(&mut self, id: Id, input_tensor: &Tensor) -> Result<(), BackendError> { in set_input() 186 let inputs: Vec<tch::Tensor> = self in compute() 202 let output_tensor = Tensor { in compute() 221 let inputs: Vec<tch::Tensor> = self in compute() 238 fn get_output(&mut self, _index: Id) -> Result<Tensor, BackendError> { in get_output() argument 245 Ok(Tensor { in get_output()
|
| H A D | winml.rs | 14 use crate::wit::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 141 fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError> { in set_input() 188 windows::AI::MachineLearning::LearningModelFeatureKind::Tensor => { in compute() 220 fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError> { in get_output() argument 275 fn to_inspectable(tensor: &Tensor) -> Result<IInspectable, Error> { in to_inspectable() 323 Tensor { in to_tensor() 334 Tensor { in to_tensor() 345 Tensor { in to_tensor() 379 let tensor = Tensor { in fp16() 407 let tensor = Tensor { in fp32() [all …]
|
| H A D | mod.rs | 23 use crate::wit::{ExecutionTarget, GraphEncoding, Tensor}; 82 fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError>; in set_input() 83 fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError>; in get_output() argument 140 pub tensor: Tensor,
|
| H A D | openvino.rs | 7 use crate::wit::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 9 use openvino::{DeviceType, ElementType, InferenceError, SetupError, Shape, Tensor as OvTensor}; 92 fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError> { in set_input() 160 tensor: Tensor { in compute() 178 fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError> { in get_output() argument 191 Ok(Tensor { in get_output()
|
| H A D | onnx.rs | 7 use crate::wit::types::{ExecutionTarget, GraphEncoding, Tensor, TensorType}; 15 value::{Tensor as OrtTensor, ValueType}, 171 fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError> { in set_input() 247 let tensor = Tensor { in compute() 276 output.tensor.replace(Tensor { in compute() 287 fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError> { in get_output() argument 313 tensor: Option<Tensor>, 344 fn matches(&self, tensor: &Tensor) -> wasmtime::Result<()> { in matches() 376 ValueType::Tensor { ty, shape, .. } => { in convert_value_type()
|
| /wasmtime-44.0.1/crates/wasi-nn/src/ |
| H A D | lib.rs | 74 pub struct Tensor { struct 79 impl fmt::Debug for Tensor { argument 131 pub fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError> { in set_input() 139 pub fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError> { in get_output() argument 154 impl Tensor { implementation
|
| H A D | wit.rs | 125 "wasi:nn/tensor.tensor": crate::Tensor, 143 pub use generated::tensor::{Tensor, TensorType}; 147 pub use generated::tensor::{Tensor, TensorData, TensorDimensions, TensorType}; 293 ) -> wasmtime::Result<Resource<Tensor>> { in new() argument 294 let tensor = Tensor { in new() 303 fn dimensions(&mut self, tensor: Resource<Tensor>) -> wasmtime::Result<TensorDimensions> { in dimensions() 308 fn ty(&mut self, tensor: Resource<Tensor>) -> wasmtime::Result<TensorType> { in ty() 313 fn data(&mut self, tensor: Resource<Tensor>) -> wasmtime::Result<TensorData> { in data() 318 fn drop(&mut self, tensor: Resource<Tensor>) -> wasmtime::Result<()> { in drop()
|
| H A D | witx.rs | 190 tensor: &generated::types::Tensor, in set_input() argument 193 let tensor = crate::wit::types::Tensor { in set_input()
|
| /wasmtime-44.0.1/crates/test-programs/src/ |
| H A D | nn.rs | 25 use self::wasi::nn::tensor::{Tensor, TensorType}; 49 let tensor = Tensor::new(&vec![1, 3, 224, 224], TensorType::Fp32, &input.1); in classify()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-component-onnx/src/ |
| H A D | main.rs | 17 tensor::{Tensor, TensorData, TensorDimensions, TensorType}, 72 let tensor = Tensor::new( in main()
|
| /wasmtime-44.0.1/crates/wasi-nn/examples/classification-example/src/ |
| H A D | main.rs | 28 let tensor = wasi_nn::Tensor { in main()
|