class_docstr: Graph convolution module used by the GraphSAGE model with edge weights.
  
  Parameters
  ----------
  in_feat : int
      Input feature size.
  out_feat : int
      Output feature size.
class_docstr_tok: ["Graph","convolution","module","used","by","the","GraphSAGE","model","with","edge","weights",".","Parameters","--","--","--","--","--","in_feat",":","int","Input","feature","size",".","out_feat",":","int","Output","feature","size","."]
docstr: Forward computation
  
  Parameters
  ----------
  g : Graph
      The input graph.
  h : Tensor
      The input node feature.
  w : Tensor
      The edge weight.
docstr_tok: ["Forward","computation","Parameters","--","--","--","--","--","g",":","Graph","The","input","graph",".","h",":","Tensor","The","input","node","feature",".","w",":","Tensor","The","edge","weight","."]
code: def forward(self, g, h, w):
      """Forward computation
  
      Parameters
      ----------
      g : Graph
          The input graph.
      h : Tensor
          The input node feature.
      w : Tensor
          The edge weight.
      """
      with g.local_scope():
          g.ndata["h"] = h
          g.edata["w"] = w
          g.update_all(
              message_func=fn.u_mul_e("h", "w", "m"),
              reduce_func=fn.mean("m", "h_N"),
          )
          h_N = g.ndata["h_N"]
          h_total = torch.cat([h, h_N], dim=1)
          return self.linear(h_total)
  
imports: import os
  import dgl
  import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
  import dgl.data
label_desc: Use image node_id 2 for calling the WeightedSAGEConv obj's underlying member method code with example usage: obj.forward(g, h, w) and returns: self