class_docstr: This class is an implementation of the paper https://arxiv.org/pdf/1606.07783.
  It is a bidirectional CNN model that captures context like RNNs do.
  
  The module expects that input mini-batch is already padded.
  
  TODO: Current implementation has a single layer conv-maxpool operation.
class_docstr_tok: ["This","class","is","an","implementation","of","the","paper","https",":","\/\/arxiv.org\/pdf\/1606.07783",".","It","is","a","bidirectional","CNN","model","that","captures","context","like","RNNs","do",".","The","module","expects","that","input","mini-batch","is","already","padded",".","TODO",":","Current","implementation","has","a","single","layer","conv-maxpool","operation","."]
code: def _word_forward(
      self, inputs: torch.Tensor, word_idx: int
  ) -> torch.Tensor:
      # inputs -> (batch, words, embed_dim)
      start_idx = word_idx - self.fwd_bwd_ctxt_len
      word_with_bwd_context = inputs.narrow(
          1, start_idx, self.fwd_bwd_ctxt_len
      )
  
      word_with_fwd_context = inputs.narrow(
          1, word_idx, self.fwd_bwd_ctxt_len
      )
  
      start_idx = word_idx - self.surr_ctxt_len
      word_with_surr_context = inputs.narrow(
          1, start_idx, 2 * self.surr_ctxt_len
      )
  
      return torch.cat(
          (
              self.backward_conv(word_with_bwd_context),
              self.forward_conv(word_with_fwd_context),
              self.surround_conv(word_with_surr_context),
          ),
          dim=1,
      )
  
file_path: pytext/pytext/models/representations/biseqcnn.py
imports: from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
  from pytext.config.module_config import CNNParams
  from pytext.models.representations.representation_base import RepresentationBase
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 4 for calling the BSeqCNNRepresentation obj's underlying member method code with example usage: obj._word_forward(inputs, word_idx) and returns: torch