class_docstr: ResBlock adapted from DDPM.
class_docstr_tok: ["ResBlock","adapted","from","DDPM","."]
code: def forward(self, x, temb=None):
      h = self.act(self.GroupNorm_0(x))
      h = self.Conv_0(h)
      if temb is not None:
          h += self.Dense_0(self.act(temb))[:, :, None, None]
      h = self.act(self.GroupNorm_1(h))
      h = self.Dropout_0(h)
      h = self.Conv_1(h)
      if x.shape[1] != self.out_ch:
          if self.conv_shortcut:
              x = self.Conv_2(x)
          else:
              x = self.NIN_0(x)
      if not self.skip_rescale:
          return x + h
      else:
          return (x + h) / np.sqrt(2.0)
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from espnet2.enh.layers.ncsnpp_utils import layers, up_or_down_sampling
label_desc: Use image node_id 2 for calling the ResnetBlockDDPMpp obj's underlying member method code with example usage: obj.forward(x, temb) and returns: unknown, unknown