pub trait LinearFactory<B: Backend>: Send + Sync {
// Required method
fn dense(
&self,
weight_row_major: &[f32],
out_features: usize,
in_features: usize,
) -> Box<dyn Linear<B>>;
}Expand description
Factory for constructing Linear<B> from raw loaded tensors.
A WeightLoader will typically hold a LinearFactory<B> and call it
for each layer weight. This indirection keeps the loader independent
of any specific Backend.