lightfm
lightfm copied to clipboard
Do momentum and gradients required for predictions?
Method _check_initialized()
called on each prediction methods call. It checks that embeddings, biases, gradients and momentum are set while only embeddings and biases are used for predictions. Do we really require gradients and momentum for predictions?
https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L262-L273
https://github.com/lyst/lightfm/blob/master/lightfm/lightfm.py#L259
IMO we can clean up momentums and gradients to minimize memory usage to use the model only for inference.