class_docstr: FeedForward module definition.
  
  Args:
      size: Input/Output size.
      hidden_size: Hidden size.
      block_id: Block index.
      num_blocks: Number of blocks in the architecture.
docstr: Compute channel mixing.
  
  Args:
      x: FeedForward input sequences. (B, U, size)
      state: Decoder hidden state. [5 x (B, 1, size, N)]
  
  Returns:
      x: FeedForward output sequences. (B, U, size)
      state: Decoder hidden state. [5 x (B, 1, size, N)]
docstr_tok: ["Compute","channel","mixing",".","Args",":","x",":","FeedForward","input","sequences",".","(","B",",","U",",","size",")","state",":","Decoder","hidden","state",".","[","5","x","(","B",",","1",",","size",",","N",")","]","Returns",":","x",":","FeedForward","output","sequences",".","(","B",",","U",",","size",")","state",":","Decoder","hidden","state",".","[","5","x","(","B",",","1",",","size",",","N",")","]"]
code: def forward(
      self, x: torch.Tensor, state: Optional[List[torch.Tensor]] = None
  ) -> Tuple[torch.Tensor, Optional[List[torch.Tensor]]]:
      """Compute channel mixing.
  
      Args:
          x: FeedForward input sequences. (B, U, size)
          state: Decoder hidden state. [5 x (B, 1, size, N)]
  
      Returns:
          x: FeedForward output sequences. (B, U, size)
          state: Decoder hidden state. [5 x (B, 1, size, N)]
  
      """
      shifted_x = (
          self.time_shift(x)
          if state is None
          else state[0][..., self.block_id]
      )
  
      key = x * self.time_mix_key + shifted_x * (1 - self.time_mix_key)
      receptance = x * self.time_mix_receptance + shifted_x * (
          1 - self.time_mix_receptance
      )
  
      key = torch.square(torch.relu(self.proj_key(key)))
      value = self.proj_value(key)
      receptance = torch.sigmoid(self.proj_receptance(receptance))
  
      if state is not None:
          state[0][..., self.block_id] = x
  
      x = receptance * value
  
      return x, state
  
imports: from typing import List, Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the FeedForward obj's underlying member method code with example usage: obj.forward(x, state) and returns: x,  state