class_docstr: Base dot model for collaborative filtering.
class_docstr_tok: ["Base","dot","model","for","collaborative","filtering","."]
code: def forward(self, x):
      users, items = x[:, 0], x[:, 1]
      dot = self.u_weight(users) * self.i_weight(items)
      res = (
          dot.sum(1)
          + self.u_bias(users).squeeze()
          + self.i_bias(items).squeeze()
      )
      if self.y_range is None:
          return res
      return (
          torch.sigmoid(res) * (self.y_range[1] - self.y_range[0])
          + self.y_range[0]
      )
  
file_path: fastai/fastai/collab.py
imports: from __future__ import annotations
  from .tabular.all import *
label_desc: Use image node_id 2 for calling the EmbeddingDotBias obj's underlying member method code with example usage: obj.forward(x) and returns: unknown, res