class_docstr: Residual module enhanced with Squeeze-and-Excitation::
  
      ----+- conv1 --  conv2 -- conv3 -- SE -o---
          |                                  |
          +---(channel project if needed)----+
  
  Re-implementation of the SE-Resnet block based on:
  "Hu et al., Squeeze-and-Excitation Networks, https://arxiv.org/abs/1709.01507".
class_docstr_tok: ["Residual","module","enhanced","with","Squeeze-and-Excitation",":",":","--","--","+-","conv1","--","conv2","--","conv3","--","SE","-o","--","-","|","|","+","--","-","(","channel","project","if","needed",")","--","--","+","Re-implementation","of","the","SE-Resnet","block","based","on",":","''","Hu","et","al.",",","Squeeze-and-Excitation","Networks",",","https",":","\/\/arxiv.org\/abs\/1709.01507","''","."]
docstr: Args:
      x: in shape (batch, in_channels, spatial_1[, spatial_2, ...]).
docstr_tok: ["Args",":","x",":","in","shape","(","batch",",","in_channels",",","spatial_1","[",",","spatial_2",",","...","]",")","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """
      Args:
          x: in shape (batch, in_channels, spatial_1[, spatial_2, ...]).
      """
      residual = self.project(x)
      x = self.conv1(x)
      x = self.conv2(x)
      x = self.conv3(x)
      x = self.se_layer(x)
      x += residual
      x = self.act(x)
      return x
  
imports: from __future__ import annotations
  import math
  import torch
  import torch.nn
  from monai.networks.blocks import Convolution
  from monai.networks.layers.factories import Act, Conv, Norm, Pool, split_args
label_desc: Use image node_id 2 for calling the SEBlock obj's underlying member method code with example usage: obj.forward(x) and returns: x