docstr: Compute tree-lstm prediction given a batch.
  Parameters
  ----------
  batch : dgl.data.SSTBatch
      The data batch.
  h : Tensor
      Initial hidden state.
  c : Tensor
      Initial cell state.
  Returns
  -------
  logits : Tensor
      The prediction of each node.
docstr_tok: ["Compute","tree-lstm","prediction","given","a","batch",".","Parameters","--","--","--","--","--","batch",":","dgl.data.SSTBatch","The","data","batch",".","h",":","Tensor","Initial","hidden","state",".","c",":","Tensor","Initial","cell","state",".","Returns","--","--","--","-","logits",":","Tensor","The","prediction","of","each","node","."]
code: def forward(self, batch, h, c):
      """Compute tree-lstm prediction given a batch.
      Parameters
      ----------
      batch : dgl.data.SSTBatch
          The data batch.
      h : Tensor
          Initial hidden state.
      c : Tensor
          Initial cell state.
      Returns
      -------
      logits : Tensor
          The prediction of each node.
      """
      g = batch.graph
      g = g.to(self.ctx)
      # feed embedding
      embeds = self.embedding(batch.wordid * batch.mask)
      wiou = self.cell.W_iou(self.dropout(embeds))
      g.ndata["iou"] = wiou * batch.mask.expand_dims(-1).astype(
          wiou.dtype
      )
      g.ndata["h"] = h
      g.ndata["c"] = c
      # propagate
      dgl.prop_nodes_topo(
          g,
          message_func=self.cell.message_func,
          reduce_func=self.cell.reduce_func,
          apply_node_func=self.cell.apply_node_func,
      )
      # compute logits
      h = self.dropout(g.ndata.pop("h"))
      logits = self.linear(h)
      return logits
  
imports: import itertools
  import time
  import dgl
  import mxnet
  import networkx
  import numpy
  from mxnet import gluon
label_desc: Use image node_id 2 for calling the TreeLSTM obj's underlying member method code with example usage: obj.forward(batch, h, c) and returns: logits