mizchi/webnn/litert does not have a README file
pub suberror LiteRtError {
LiteRtError(String)
}pub struct LiteRtLoweredValue[T] {
name_ : String
tensor_ : T
}pub struct LiteRtModel {
values_ : Array[LiteRtValue]
nodes_ : Array[LiteRtNode]
output_names_ : Array[String]
}fn[T : TensorOps] LiteRtModel::lower(self : LiteRtModel, make_input : (String, Shape) -> T raise, make_constant : (String, Shape, Array[Float]) -> T raise) -> Array[LiteRtLoweredValue[T]] raisefn LiteRtModel::new(values : Array[LiteRtValue], nodes : Array[LiteRtNode], output_names : Array[String]) -> LiteRtModel raise LiteRtErrorpub(all) enum LiteRtNode {
Add(String, String, String)
Sub(String, String, String)
Mul(String, String, String)
Div(String, String, String)
ReduceMean(String, String, Array[Int], Bool)
Gather(String, String, Array[Int], Shape, Int)
Slice(String, String, Array[Int], Array[Int])
Gelu(String, String)
LayerNormalization(String, String, String, String, Array[Int], Float)
Concat(String, String, String, Int)
Matmul(String, String, String)
Conv2d(String, String, String, Conv2dOptions)
MaxPool2d(String, String, Pool2dOptions)
AveragePool2d(String, String, Pool2dOptions)
Sigmoid(String, String)
Tanh(String, String)
Clamp(String, String, Float, Float)
Relu(String, String)
Softmax(String, String, Int)
Reshape(String, String)
Transpose(String, String, Array[Int])
}fn LiteRtValue::constant(name : String, shape : Shape, values : Array[Float]) -> LiteRtValue raise LiteRtErrorpub(all) struct TfliteModel {
}pub struct TfliteRuntimeModel {
model_ : LiteRtModel
inputs_ : Array[TfliteRuntimeTensor]
outputs_ : Array[TfliteRuntimeTensor]
}fn TfliteRuntimeTensor::dequantize(self : TfliteRuntimeTensor, values : Array[Int]) -> Array[Float] raise LiteRtErrorfn TfliteRuntimeTensor::requantize(self : TfliteRuntimeTensor, values : Array[Float]) -> Array[Int] raise LiteRtErrorfn dequantize_int8(values : Array[Int], scale : Float, zero_point : Int) -> Array[Float] raise LiteRtErrorfn dequantize_uint8(values : Array[Int], scale : Float, zero_point : Int) -> Array[Float] raise LiteRtErrorfn requantize_int8(values : Array[Float], scale : Float, zero_point : Int) -> Array[Int] raise LiteRtErrorfn requantize_uint8(values : Array[Float], scale : Float, zero_point : Int) -> Array[Int] raise LiteRtErrorWebNN backend and TFLite inference runtime for MoonBit
Dependencies