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
Currently, in the teacher trait, Teacher<M>::teach_event<Y, C>(&self, &mut Self::Training, &mut M, &C, &M::Input, Y) has two mutable arguments, the associated training type and model. My question is, whether we could rewrite this into a function with immutable arguments, that returns new values for these arguments. This way we might be able to rewrite learn_history's loop over the history as a folding operation (reduction).
The text was updated successfully, but these errors were encountered:
I think this can be done. I also like the idea of expressing learn_history in terms of fold very much. However having the low level mutable interface is very handy in some applications there I use the model in one thread, while the other is training it.
My suggestion is to introduce a function wrapping the low level interface and using this function to rewrite learn_history in terms of fold.
Currently, in the teacher trait,
Teacher<M>::teach_event<Y, C>(&self, &mut Self::Training, &mut M, &C, &M::Input, Y)
has two mutable arguments, the associated training type and model. My question is, whether we could rewrite this into a function with immutable arguments, that returns new values for these arguments. This way we might be able to rewritelearn_history
's loop over the history as a folding operation (reduction).The text was updated successfully, but these errors were encountered: