You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
There are many places where copies are done (via select_rows for instance) when a simple borrow would have been enough.
We could probably save some memory by:
implementing Borrow and AsRef between Matrix and MatrixSlice(Mut) (they make sense I think)
having more generic traits that require Borrow<T> or AsRef<T> instead of &T
Example with Optimizable:
/// Trait for models which can be gradient-optimized.pubtraitOptimizable{/// The input data type to the model.typeInputs;/// The target data type to the model.typeTargets;/// Compute the gradient for the model.fncompute_grad(&self,params:&[f64],inputs:Borrow<Self::Inputs>,targets:Borrow<Self::Targets>)
-> (f64,Vec<f64>);}
Then we could use MatrixSlice instead of select_rowshere.