code: def __init__(self, nfeat, nnext, nhid, link_pred=False, entropy=True):
      super(BatchedDiffPool, self).__init__()
      self.link_pred = link_pred
      self.log = {}
      self.link_pred_layer = LinkPredLoss()
      self.embed = BatchedGraphSAGE(nfeat, nhid, use_bn=True)
      self.assign = DiffPoolAssignment(nfeat, nnext)
      self.reg_loss = nn.ModuleList([])
      self.loss_log = {}
      if link_pred:
          self.reg_loss.append(LinkPredLoss())
      if entropy:
          self.reg_loss.append(EntropyLoss())
  
file_path: dgl/examples/pytorch/diffpool/model/tensorized_layers/diffpool.py
imports: import torch
  from torch import nn
  from model.loss import EntropyLoss, LinkPredLoss
  from model.tensorized_layers.assignment import DiffPoolAssignment
  from model.tensorized_layers.graphsage import BatchedGraphSAGE
label_desc: Use image node_id 1 to create a new BatchedDiffPool object from inherited base classes: nn with example: obj = BatchedDiffPool(nfeat, nnext, nhid, link_pred, entropy)