code: def resnet18(pretrained: bool = False, **kwargs: Any) -> ResNet:
      """Resnet-18 architecture as described in `"Deep Residual Learning for Image Recognition",
      <https://arxiv.org/pdf/1512.03385.pdf>`_.
  
      >>> import tensorflow as tf
      >>> from doctr.models import resnet18
      >>> model = resnet18(pretrained=False)
      >>> input_tensor = tf.random.uniform(shape=[1, 512, 512, 3], maxval=1, dtype=tf.float32)
      >>> out = model(input_tensor)
  
      Args:
      ----
          pretrained: boolean, True if model is pretrained
          **kwargs: keyword arguments of the ResNet architecture
  
      Returns:
      -------
          A classification model
      """
      return _resnet(
          "resnet18",
          pretrained,
          [2, 2, 2, 2],
          [64, 128, 256, 512],
          [False, True, True, True],
          [False] * 4,
          [None] * 4,
          True,
          **kwargs,
      )
  
imports: from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import tensorflow
  from tensorflow.keras import layers
  from tensorflow.keras.applications import ResNet50
  from tensorflow.keras.models import Sequential
  from doctr.datasets import VOCABS
  from ...utils import conv_sequence, load_pretrained_params
label_desc: Use image node_id 3 for calling a global function with example usage: resnet18(pretrained) and returns: _resnet