class_docstr: LinkNet as described in `"LinkNet: Exploiting Encoder Representations for Efficient Semantic Segmentation"
  <https://arxiv.org/pdf/1707.03718.pdf>`_.
  
  Args:
  ----
      feature extractor: the backbone serving as feature extractor
      fpn_channels: number of channels each extracted feature maps is mapped to
      assume_straight_pages: if True, fit straight bounding boxes only
      exportable: onnx exportable returns only logits
      cfg: the configuration dict of the model
      class_names: list of class names
class_docstr_tok: ["LinkNet","as","described","in","`","``","LinkNet",":","Exploiting","Encoder","Representations","for","Efficient","Semantic","Segmentation","''","<","https",":","\/\/arxiv.org\/pdf\/1707.03718.pdf",">","`","_",".","Args",":","--","--","feature","extractor",":","the","backbone","serving","as","feature","extractor","fpn_channels",":","number","of","channels","each","extracted","feature","maps","is","mapped","to","assume_straight_pages",":","if","True",",","fit","straight","bounding","boxes","only","exportable",":","onnx","exportable","returns","only","logits","cfg",":","the","configuration","dict","of","the","model","class_names",":","list","of","class","names"]
code: def call(
      self,
      x: tf.Tensor,
      target: Optional[List[Dict[str, np.ndarray]]] = None,
      return_model_output: bool = False,
      return_preds: bool = False,
      **kwargs: Any,
  ) -> Dict[str, Any]:
      feat_maps = self.feat_extractor(x, **kwargs)
      logits = self.fpn(feat_maps, **kwargs)
      logits = self.classifier(logits, **kwargs)
  
      out: Dict[str, tf.Tensor] = {}
      if self.exportable:
          out["logits"] = logits
          return out
  
      if return_model_output or target is None or return_preds:
          prob_map = _bf16_to_float32(tf.math.sigmoid(logits))
  
      if return_model_output:
          out["out_map"] = prob_map
  
      if target is None or return_preds:
          # Post-process boxes
          out["preds"] = [
              dict(zip(self.class_names, preds))
              for preds in self.postprocessor(prob_map.numpy())
          ]
  
      if target is not None:
          loss = self.compute_loss(logits, target)
          out["loss"] = loss
  
      return out
  
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 3 for calling the LinkNet obj's underlying member method code with example usage: obj.call(x, target, return_model_output, return_preds) and returns: out, out