class_docstr: ### Middle block
  
  It combines a `ResidualBlock`, `AttentionBlock`, followed by another `ResidualBlock`.
  This block is applied at the lowest resolution of the U-Net.
class_docstr_tok: ["#","#","#","Middle","block","It","combines","a","`","ResidualBlock","`",",","`","AttentionBlock","`",",","followed","by","another","`","ResidualBlock","`",".","This","block","is","applied","at","the","lowest","resolution","of","the","U-Net","."]
code: def forward(self, x: torch.Tensor, t: torch.Tensor):
      x = self.res1(x, t)
      x = self.attn(x)
      x = self.res2(x, t)
      return x
  
imports: import math
  from typing import Optional, Tuple, Union, List
  import torch
  from torch import nn
  from labml_helpers.module import Module
label_desc: Use image node_id 2 for calling the MiddleBlock obj's underlying member method code with example usage: obj.forward(x, t) and returns: x