class_docstr: ### Up block
  
  This combines `ResidualBlock` and `AttentionBlock`. These are used in the second half of U-Net at each resolution.
class_docstr_tok: ["#","#","#","Up","block","This","combines","`","ResidualBlock","`","and","`","AttentionBlock","`",".","These","are","used","in","the","second","half","of","U-Net","at","each","resolution","."]
code: def forward(self, x: torch.Tensor, t: torch.Tensor):
      x = self.res(x, t)
      x = self.attn(x)
      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 UpBlock obj's underlying member method code with example usage: obj.forward(x, t) and returns: x