class_docstr: Dynamic lightweight convolution taking T x B x C inputs
  Args:
      input_size: # of channels of the input
      kernel_size: convolution channels
      padding_l: padding to the left when using "same" padding
      num_heads: number of heads used. The weight is of shape (num_heads, 1, kernel_size)
      weight_dropout: the drop rate of the DropConnect to drop the weight
      weight_softmax: normalize the weight with softmax before the convolution
      renorm_padding: re-normalize the filters to ignore the padded part (only the non-padding parts sum up to 1)
      bias: use bias
      conv_bias: bias of the convolution
      query_size: specified when feeding a different input as the query
      in_proj: project the input and generate the filter together
  
  Shape:
      Input: TxBxC, i.e. (timesteps, batch_size, input_size)
      Output: TxBxC, i.e. (timesteps, batch_size, input_size)
  
  Attributes:
      weight: the learnable weights of the module of shape
          `(num_heads, 1, kernel_size)`
      bias:   the learnable bias of the module of shape `(input_size)`
class_docstr_tok: ["Dynamic","lightweight","convolution","taking","T","x","B","x","C","inputs","Args",":","input_size",":","#","of","channels","of","the","input","kernel_size",":","convolution","channels","padding_l",":","padding","to","the","left","when","using","``","same","''","padding","num_heads",":","number","of","heads","used",".","The","weight","is","of","shape","(","num_heads",",","1",",","kernel_size",")","weight_dropout",":","the","drop","rate","of","the","DropConnect","to","drop","the","weight","weight_softmax",":","normalize","the","weight","with","softmax","before","the","convolution","renorm_padding",":","re-normalize","the","filters","to","ignore","the","padded","part","(","only","the","non-padding","parts","sum","up","to","1",")","bias",":","use","bias","conv_bias",":","bias","of","the","convolution","query_size",":","specified","when","feeding","a","different","input","as","the","query","in_proj",":","project","the","input","and","generate","the","filter","together","Shape",":","Input",":","TxBxC",",","i.e",".","(","timesteps",",","batch_size",",","input_size",")","Output",":","TxBxC",",","i.e",".","(","timesteps",",","batch_size",",","input_size",")","Attributes",":","weight",":","the","learnable","weights","of","the","module","of","shape","`","(","num_heads",",","1",",","kernel_size",")","`","bias",":","the","learnable","bias","of","the","module","of","shape","`","(","input_size",")","`"]
docstr: The conventional implementation of convolutions.
  Unfolding the input by having a window shifting to the right.
docstr_tok: ["The","conventional","implementation","of","convolutions",".","Unfolding","the","input","by","having","a","window","shifting","to","the","right","."]
code: def _forward_unfolded(
      self,
      x,
      incremental_state: Optional[
          Dict[str, Dict[str, Optional[Tensor]]]
      ],
      query,
  ):
      """The conventional implementation of convolutions.
      Unfolding the input by having a window shifting to the right."""
      T, B, C = x.size()
      K, H = self.kernel_size, self.num_heads
      R = C // H
      assert R * H == C == self.input_size
  
      TxBxH = T * B * H
  
      if self.in_proj:
          proj = self.weight_linear(x)
          x = proj.narrow(2, 0, self.input_size).contiguous()
          weight = (
              proj.narrow(2, self.input_size, H * K)
              .contiguous()
              .view(TxBxH, -1)
          )
      else:
          weight = self.weight_linear(query).view(TxBxH, -1)
  
      # renorm_padding is only implemented in _forward_expanded
      assert not self.renorm_padding or incremental_state is not None
  
      if incremental_state is not None:
          input_buffer = self._get_input_buffer(incremental_state)
          if input_buffer is not None:
              x_unfold = torch.cat(
                  [input_buffer, x.unsqueeze(3)], dim=3
              )
          else:
              x_unfold = x.unsqueeze(3).clone()
          if self.kernel_size > 1:
              self._set_input_buffer(
                  incremental_state,
                  x_unfold[:, :, :, -self.kernel_size + 1 :],
              )
          x_unfold = x_unfold.view(TxBxH, R, -1)
      else:
          padding_l = self.padding_l
          if K > T and padding_l == K - 1:
              weight = weight.narrow(1, K - T, T)
              K, padding_l = T, T - 1
          # unfold the input: T x B x C --> T' x B x C x K
          x_unfold = unfold1d(x, K, padding_l, 0.0)
          x_unfold = x_unfold.view(TxBxH, R, K)
  
      if self.weight_softmax and not self.renorm_padding:
          weight = F.softmax(weight, dim=1)
      weight = weight.narrow(1, 0, K)
  
      if incremental_state is not None:
          weight = weight[:, -(x_unfold.size(2)) :]
          K = weight.size(1)
  
      if self.weight_softmax and self.renorm_padding:
          weight = F.softmax(weight, dim=1)
  
      weight = self.weight_dropout_module(weight, inplace=False)
  
      output = torch.bmm(
          x_unfold, weight.unsqueeze(2)
      )  # T x B x H x R x 1
      output = output.view(T, B, C)
      return output
  
imports: from typing import Dict, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.incremental_decoding_utils import FairseqIncrementalState, with_incremental_state
  from fairseq.modules.fairseq_dropout import FairseqDropout
  from torch import Tensor
  from .unfold import unfold1d
label_desc: Use image node_id 4 for calling the DynamicConv_scripatable obj's underlying member method code with example usage: obj._forward_unfolded(x, incremental_state, query) and returns: output