vadixidav/mli

Create trait for deep assignment

vadixidav opened this issue · 0 comments

Currently, there is a really hacky implementation of the NAG momentum optimizer in the deep-train example. One of the hacky things that had to be done was creating a train variable delta and then zeroing everything in it to initialize the momentum. The zeroing part of that process was done by multiplying it by 0.0. While this works as intended, it is a bit hacky and unintuitive. To fix this, we should create a trait for deep assignment and implement that on all combinators, GenericArray, NumericArray, ndarray::ArrayBase, and nalgebra::Matrix.