class_docstr: Compute importance weights for atoms and perform a weighted sum.
  
  Parameters
  ----------
  in_feats : int
      Input atom feature size
class_docstr_tok: ["Compute","importance","weights","for","atoms","and","perform","a","weighted","sum",".","Parameters","--","--","--","--","--","in_feats",":","int","Input","atom","feature","size"]
docstr: Compute molecule representations out of atom representations
  
  Parameters
  ----------
  g : DGLGraph
      DGLGraph with batch size B for processing multiple molecules in parallel
  feats : FloatTensor of shape (N, self.in_feats)
      Representations for all atoms in the molecules
      * N is the total number of atoms in all molecules
  
  Returns
  -------
  FloatTensor of shape (B, self.in_feats)
      Representations for B molecules
docstr_tok: ["Compute","molecule","representations","out","of","atom","representations","Parameters","--","--","--","--","--","g",":","DGLGraph","DGLGraph","with","batch","size","B","for","processing","multiple","molecules","in","parallel","feats",":","FloatTensor","of","shape","(","N",",","self.in_feats",")","Representations","for","all","atoms","in","the","molecules","*","N","is","the","total","number","of","atoms","in","all","molecules","Returns","--","--","--","-","FloatTensor","of","shape","(","B",",","self.in_feats",")","Representations","for","B","molecules"]
code: def call(self, g, feats):
      """Compute molecule representations out of atom representations
  
      Parameters
      ----------
      g : DGLGraph
          DGLGraph with batch size B for processing multiple molecules in parallel
      feats : FloatTensor of shape (N, self.in_feats)
          Representations for all atoms in the molecules
          * N is the total number of atoms in all molecules
  
      Returns
      -------
      FloatTensor of shape (B, self.in_feats)
          Representations for B molecules
      """
      with g.local_scope():
          g.ndata["h"] = feats
          g.ndata["w"] = self.atom_weighting(g.ndata["h"])
          h_g_sum = sum_nodes(g, "h", "w")
  
      return h_g_sum
  
imports: import tensorflow
  from tensorflow.keras import layers
  from ...readout import max_nodes, mean_nodes, softmax_nodes, sum_nodes, topk_nodes
label_desc: Use image node_id 2 for calling the WeightAndSum obj's underlying member method code with example usage: obj.call(g, feats) and returns: h_g_sum