class_docstr: LinkNet Decoder module
class_docstr_tok: ["LinkNet","Decoder","module"]
code: def __init__(
      self,
      out_chans: int,
      in_shapes: List[Tuple[int, ...]],
  ) -> None:
      super().__init__()
      self.out_chans = out_chans
      strides = [2] * (len(in_shapes) - 1) + [1]
      i_chans = [s[-1] for s in in_shapes[::-1]]
      o_chans = i_chans[1:] + [out_chans]
      self.decoders = [
          decoder_block(in_chan, out_chan, s, input_shape=in_shape)
          for in_chan, out_chan, s, in_shape in zip(
              i_chans, o_chans, strides, in_shapes[::-1]
          )
      ]
  
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import tensorflow
  from tensorflow import keras
  from tensorflow.keras import Model, Sequential, layers
  from doctr.file_utils import CLASS_NAME
  from doctr.models.classification import resnet18, resnet34, resnet50
  from doctr.models.utils import IntermediateLayerGetter, _bf16_to_float32, conv_sequence, load_pretrained_params
  from doctr.utils.repr import NestedObject
  from .base import LinkNetPostProcessor, _LinkNet
label_desc: Use image node_id 1 to create a new LinkNetFPN object from inherited base classes: Model, NestedObject with example: obj = LinkNetFPN(out_chans, in_shapes)