/// A function to read a weight vector from a given path.
A function to read a weight vector from a given path.
A function to read a weight vector from a given path .
pub fn read_weights_from_path(path: &Path) -> Vec<Weight> {
    let mut rdr = match csv::ReaderBuilder::new()
        .has_headers(true)
        .delimiter(b',')
        .quote(b'"')
        .from_path(path)
    {
        Ok(rdr) => rdr,
        Err(e) => {
            panic!("{}", e);
        }
    };
    rdr.deserialize()
        .map(|record| record.unwrap())
        .map(Weight::from)
        .collect()
}
pub fn read_weights_from_path ( path : & Path ) -> Vec < Weight > { let mut rdr = match csv :: ReaderBuilder :: new ( ) . has_headers ( true ) . delimiter ( b',' ) . quote ( b'"' ) . from_path ( path ) { Ok ( rdr ) => rdr , Err ( e ) => { panic ! ( " " e ) ; } } ; rdr . deserialize ( ) . map ( | record | record . unwrap ( ) ) . map ( Weight :: from ) . collect ( ) }
A function to read a weight vector from a given path.
A function to read a weight vector from a given path .
path
&Path