Module model

Module model 

Source
Expand description

Model operations for saving, loading and inference

This module provides high-level operations for:

  • Saving models in ONNX format
  • Loading models from ONNX format
  • Running inference on loaded models
  • Training support (forward/backward passes)

Re-exports§

pub use crate::llo::OnnxAttribute;
pub use crate::llo::OnnxModel;
pub use crate::llo::OnnxNode;
pub use crate::llo::OnnxTensor;
pub use crate::llo::TrainingState;

Functions§

array_to_onnx_tensor
Create a tensor from an Array
create_add_node
Create an Add node
create_linear_node
Create a linear layer node
create_matmul_node
Create a MatMul node
create_mlp
Create a simple feedforward neural network model
create_relu_node
Create a ReLU activation node
create_softmax_node
Create a Softmax activation node
deserialize_onnx
Deserialize model from JSON string
infer
Run inference on a model
load_checkpoint
Load training checkpoint
load_onnx
Load model from ONNX format
save_checkpoint
Save training checkpoint
save_onnx
Save model to ONNX format
serialize_onnx
Serialize model to JSON string