Formatter

Trait Formatter 

Source
pub trait Formatter {
    // Required methods
    fn transform(&self, output: &mut [f32]);
    fn update(&mut self, token: u32) -> bool;
}

Required Methods§

Source

fn transform(&self, output: &mut [f32])

Update the raw model output.

Source

fn update(&mut self, token: u32) -> bool

Update the internal state after a token is chosen. Return if the state machine is halt.

Implementors§