We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I have a model like this:
class Model(torch.nn.Module): ... self.user_embed = torch.nn.Embedding(n_users, n_factors) ...
What would be the best way to implement def learn_one... given that new users get added from a stream?
def learn_one...
The text was updated successfully, but these errors were encountered:
Hi @zeyaddeeb, I would stick to the regression learn_one method:
def learn_one(self, x: dict, y: RegTarget, **kwargs) -> "Regressor": if not self.module_initialized: self.kwargs["n_features"] = len(x) self.initialize_module(**self.kwargs) x_t = dict2tensor(x, self.device) y_t = float2tensor(y, device=self.device) self._learn(x_t, y_t) return self
The helper methods _learn, dict2tensor and float2tensor might help you as well.
Best Cedric
Sorry, something went wrong.
No branches or pull requests
If I have a model like this:
What would be the best way to implement
def learn_one...
given that new users get added from a stream?The text was updated successfully, but these errors were encountered: