pub struct FastGRNN { /* private fields */ }Expand description
FastGRNN model for neural routing
Implementations§
Source§impl FastGRNN
impl FastGRNN
Sourcepub fn new(config: FastGRNNConfig) -> Result<Self>
pub fn new(config: FastGRNNConfig) -> Result<Self>
Create a new FastGRNN model with the given configuration
Sourcepub fn load<P: AsRef<Path>>(_path: P) -> Result<Self>
pub fn load<P: AsRef<Path>>(_path: P) -> Result<Self>
Load model from a file (safetensors format)
Sourcepub fn save<P: AsRef<Path>>(&self, _path: P) -> Result<()>
pub fn save<P: AsRef<Path>>(&self, _path: P) -> Result<()>
Save model to a file (safetensors format)
Sourcepub fn forward_batch(&self, inputs: &[Vec<f32>]) -> Result<Vec<f32>>
pub fn forward_batch(&self, inputs: &[Vec<f32>]) -> Result<Vec<f32>>
Batch inference for multiple inputs
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Get model size in bytes
Sourcepub fn config(&self) -> &FastGRNNConfig
pub fn config(&self) -> &FastGRNNConfig
Get configuration
Auto Trait Implementations§
impl Freeze for FastGRNN
impl RefUnwindSafe for FastGRNN
impl Send for FastGRNN
impl Sync for FastGRNN
impl Unpin for FastGRNN
impl UnwindSafe for FastGRNN
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more