Sign in

    mizchi/webnn/litert does not have a README file

    LiteRtError

    pub suberror LiteRtError {
    LiteRtError(String)
    }

    LiteRtError::to_string

    fn LiteRtError::to_string(self : LiteRtError) -> String

    LiteRtLoweredValue

    pub struct LiteRtLoweredValue[T] {
    name_ : String
    tensor_ : T
    }

    LiteRtLoweredValue::name

    fn[T] LiteRtLoweredValue::name(self : LiteRtLoweredValue[T]) -> String

    LiteRtLoweredValue::tensor

    fn[T] LiteRtLoweredValue::tensor(self : LiteRtLoweredValue[T]) -> T

    LiteRtModel

    pub struct LiteRtModel {
    values_ : Array[LiteRtValue]
    nodes_ : Array[LiteRtNode]
    output_names_ : Array[String]
    }

    LiteRtModel::inputs

    fn LiteRtModel::inputs(self : LiteRtModel) -> Array[LiteRtValue]

    LiteRtModel::lower

    fn[T :
    TensorOps
    ] LiteRtModel::lower(self : LiteRtModel, make_input : (String,
    Shape
    ) -> T raise, make_constant : (String,
    Shape
    , Array[Float]) -> T raise) -> Array[LiteRtLoweredValue[T]] raise

    LiteRtModel::new

    fn LiteRtModel::new(values : Array[LiteRtValue], nodes : Array[LiteRtNode], output_names : Array[String]) -> LiteRtModel raise LiteRtError

    LiteRtNode

    pub(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])
    }

    LiteRtValue

    pub struct LiteRtValue {
    name_ : String
    shape_ :
    Shape

    source_ : LiteRtValueSource
    }

    LiteRtValue::constant

    fn LiteRtValue::constant(name : String, shape :
    Shape
    , values : Array[Float]) -> LiteRtValue raise LiteRtError

    LiteRtValue::input

    fn LiteRtValue::input(name : String, shape :
    Shape
    ) -> LiteRtValue raise LiteRtError

    LiteRtValue::intermediate

    fn LiteRtValue::intermediate(name : String, shape :
    Shape
    ) -> LiteRtValue raise LiteRtError

    LiteRtValue::name

    fn LiteRtValue::name(self : LiteRtValue) -> String

    LiteRtValue::shape

    LiteRtValueSource

    pub enum LiteRtValueSource {
    Input
    Constant(Array[Float])
    Intermediate
    }

    TfliteModel

    pub(all) struct TfliteModel {
    }

    TfliteModel::parse

    fn TfliteModel::parse(bytes : Bytes) -> LiteRtModel raise LiteRtError

    TfliteModel::parse_runtime

    fn TfliteModel::parse_runtime(bytes : Bytes) -> TfliteRuntimeModel raise LiteRtError

    Parse a TFLite model while retaining UINT8/INT8 runtime I/O metadata.

    TfliteRuntimeDataType

    pub enum TfliteRuntimeDataType {
    Float32
    UInt8(Array[Float], Array[Int], Int)
    Int8(Array[Float], Array[Int], Int)
    }

    TfliteRuntimeModel

    pub struct TfliteRuntimeModel {
    model_ : LiteRtModel
    inputs_ : Array[TfliteRuntimeTensor]
    outputs_ : Array[TfliteRuntimeTensor]
    }

    TfliteRuntimeModel::inputs

    TfliteRuntimeModel::model

    TfliteRuntimeModel::outputs

    TfliteRuntimeTensor

    pub struct TfliteRuntimeTensor {
    name_ : String
    shape_ :
    Shape

    data_type_ : TfliteRuntimeDataType
    }

    TfliteRuntimeTensor::data_type

    TfliteRuntimeTensor::dequantize

    fn TfliteRuntimeTensor::dequantize(self : TfliteRuntimeTensor, values : Array[Int]) -> Array[Float] raise LiteRtError

    Dequantize raw runtime values according to this tensor's TFLite metadata.

    TfliteRuntimeTensor::name

    fn TfliteRuntimeTensor::name(self : TfliteRuntimeTensor) -> String

    TfliteRuntimeTensor::requantize

    fn TfliteRuntimeTensor::requantize(self : TfliteRuntimeTensor, values : Array[Float]) -> Array[Int] raise LiteRtError

    Requantize float32 backend results according to this tensor's TFLite metadata.

    TfliteRuntimeTensor::shape

    dequantize_int8

    fn dequantize_int8(values : Array[Int], scale : Float, zero_point : Int) -> Array[Float] raise LiteRtError

    Convert signed 8-bit affine values to their float32 values.

    dequantize_uint8

    fn dequantize_uint8(values : Array[Int], scale : Float, zero_point : Int) -> Array[Float] raise LiteRtError

    Convert unsigned 8-bit affine values to their float32 values.

    requantize_int8

    fn requantize_int8(values : Array[Float], scale : Float, zero_point : Int) -> Array[Int] raise LiteRtError

    Convert float32 values to signed 8-bit affine values with saturation.

    requantize_uint8

    fn requantize_uint8(values : Array[Float], scale : Float, zero_point : Int) -> Array[Int] raise LiteRtError

    Convert float32 values to unsigned 8-bit affine values with saturation.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io