FactoryTrainingExample

Trait FactoryTrainingExample 

Source
pub trait FactoryTrainingExample {
    // Required methods
    fn embedding(&self) -> Vec<f32>;
    fn quality(&self) -> f32;

    // Provided methods
    fn activations(&self) -> Vec<f32> { ... }
    fn attention(&self) -> Vec<f32> { ... }
    fn reward(&self) -> f32 { ... }
    fn route(&self) -> Option<String> { ... }
    fn context(&self) -> Vec<String> { ... }
}
Expand description

Trait for training examples

Required Methods§

Source

fn embedding(&self) -> Vec<f32>

Get embedding vector

Source

fn quality(&self) -> f32

Get quality score

Provided Methods§

Source

fn activations(&self) -> Vec<f32>

Get activations (can be same as embedding)

Source

fn attention(&self) -> Vec<f32>

Get attention weights

Source

fn reward(&self) -> f32

Get reward signal

Source

fn route(&self) -> Option<String>

Get optional route

Source

fn context(&self) -> Vec<String>

Get context identifiers

Implementors§