class_docstr: Base dot model for collaborative filtering.
class_docstr_tok: ["Base","dot","model","for","collaborative","filtering","."]
docstr: Weight for item or user (based on `is_item`) for all in `arr`
docstr_tok: ["Weight","for","item","or","user","(","based","on","`","is_item","`",")","for","all","in","`","arr","`"]
code: def weight(self, arr, is_item=True):
      "Weight for item or user (based on `is_item`) for all in `arr`"
      idx = self._get_idx(arr, is_item)
      layer = (self.i_weight if is_item else self.u_weight).eval().cpu()
      return to_detach(layer(idx), gather=False)
  
file_path: fastai/fastai/collab.py
imports: from __future__ import annotations
  from .tabular.all import *
label_desc: Use image node_id 6 for calling the EmbeddingDotBias obj's underlying member method code with example usage: obj.weight(arr, is_item) and returns: to_detach