class_docstr: GraphSage layer in Inductive learning paper by hamilton
  Here, graphsage layer is a reduced function in DGL framework
class_docstr_tok: ["GraphSage","layer","in","Inductive","learning","paper","by","hamilton","Here",",","graphsage","layer","is","a","reduced","function","in","DGL","framework"]
code: def forward(self, g, h):
      h = self.dropout(h)
      g.ndata["h"] = h
      if self.use_bn and not hasattr(self, "bn"):
          device = h.device
          self.bn = nn.BatchNorm1d(h.size()[1]).to(device)
      g.update_all(
          fn.copy_u(u="h", out="m"), self.aggregator, self.bundler
      )
      if self.use_bn:
          h = self.bn(h)
      h = g.ndata.pop("h")
      return h
  
imports: import dgl.function
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from scipy.linalg import block_diag
  from model.loss import EntropyLoss
  from ..model_utils import masked_softmax
  from .aggregator import LSTMAggregator, MaxPoolAggregator, MeanAggregator
  from .bundler import Bundler
label_desc: Use image node_id 2 for calling the GraphSageLayer obj's underlying member method code with example usage: obj.forward(g, h) and returns: h