pub struct Inputs { /* private fields */ }Expand description
A collection of input samples (X).
Stored as a contiguous buffer with row-major layout:
inputs.len() == len * input_dim
Implementations§
Source§impl Inputs
impl Inputs
Sourcepub fn from_flat(inputs: Vec<f32>, input_dim: usize) -> Result<Self>
pub fn from_flat(inputs: Vec<f32>, input_dim: usize) -> Result<Self>
Build inputs from a flat buffer with shape (len, input_dim).
Sourcepub fn from_rows(inputs: &[Vec<f32>]) -> Result<Self>
pub fn from_rows(inputs: &[Vec<f32>]) -> Result<Self>
Build inputs from per-sample rows.
This is a convenience constructor (it copies into contiguous storage).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inputs
impl RefUnwindSafe for Inputs
impl Send for Inputs
impl Sync for Inputs
impl Unpin for Inputs
impl UnwindSafe for Inputs
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