class_docstr: A flexible implementation of UNet-like encoder-decoder architecture.
class_docstr_tok: ["A","flexible","implementation","of","UNet-like","encoder-decoder","architecture","."]
docstr: Do a typical encoder-decoder-header inference.
  
  Args:
      inputs: input should have spatially N dimensions ``(Batch, in_channels, dim_0[, dim_1, ..., dim_N])``,
          N is defined by `dimensions`.
  
  Returns:
      A torch Tensor of "raw" predictions in shape ``(Batch, out_channels, dim_0[, dim_1, ..., dim_N])``.
docstr_tok: ["Do","a","typical","encoder-decoder-header","inference",".","Args",":","inputs",":","input","should","have","spatially","N","dimensions","``","(","Batch",",","in_channels",",","dim_0","[",",","dim_1",",","...",",","dim_N","]",")","``",",","N","is","defined","by","`","dimensions","`",".","Returns",":","A","torch","Tensor","of","``","raw","''","predictions","in","shape","``","(","Batch",",","out_channels",",","dim_0","[",",","dim_1",",","...",",","dim_N","]",")","``","."]
code: def forward(self, inputs: torch.Tensor):
      """
      Do a typical encoder-decoder-header inference.
  
      Args:
          inputs: input should have spatially N dimensions ``(Batch, in_channels, dim_0[, dim_1, ..., dim_N])``,
              N is defined by `dimensions`.
  
      Returns:
          A torch Tensor of "raw" predictions in shape ``(Batch, out_channels, dim_0[, dim_1, ..., dim_N])``.
  
      """
      x = inputs
      enc_out = self.encoder(x)
      decoder_out = self.decoder(enc_out, self.skip_connect)
      x_seg = self.segmentation_head(decoder_out)
  
      return x_seg
  
imports: from __future__ import annotations
  import warnings
  from collections.abc import Sequence
  from pydoc import locate
  from typing import Any
  import torch
  from torch import nn
  from monai.networks.blocks import BaseEncoder, UpSample
  from monai.networks.layers.factories import Conv
  from monai.networks.layers.utils import get_act_layer
  from monai.networks.nets import EfficientNetEncoder
  from monai.networks.nets.basic_unet import UpCat
  from monai.utils import InterpolateMode, optional_import
label_desc: Use image node_id 2 for calling the FlexibleUNet obj's underlying member method code with example usage: obj.forward(inputs) and returns: x_seg