code: def __init__(self, layer_shapes: List[Tuple[int, int, int]]) -> None:
      super().__init__()
      strides = [
          1 if (in_shape[-1] == out_shape[-1]) else 2
          for in_shape, out_shape in zip(
              layer_shapes[:-1], layer_shapes[1:]
          )
      ]
  
      chans = [shape[0] for shape in layer_shapes]
  
      _decoder_layers = [
          self.decoder_block(ochan, ichan, stride)
          for ichan, ochan, stride in zip(
              chans[:-1], chans[1:], strides
          )
      ]
  
      self.decoders = nn.ModuleList(_decoder_layers)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import torch
  from torch import nn
  from torch.nn import functional
  from torchvision.models._utils import IntermediateLayerGetter
  from doctr.file_utils import CLASS_NAME
  from doctr.models.classification import resnet18, resnet34, resnet50
  from ...utils import _bf16_to_float32, load_pretrained_params
  from .base import LinkNetPostProcessor, _LinkNet
label_desc: Use image node_id 1 to create a new LinkNetFPN object from inherited base classes: nn with example: obj = LinkNetFPN(layer_shapes)