lightfm icon indicating copy to clipboard operation
lightfm copied to clipboard

Do momentum and gradients required for predictions?

Open dbalabka opened this issue 1 year ago • 0 comments

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.

dbalabka avatar Aug 03 '22 14:08 dbalabka