class_docstr: Implements the VGG architecture from `"Very Deep Convolutional Networks for Large-Scale Image Recognition"
  <https://arxiv.org/pdf/1409.1556.pdf>`_.
  
  Args:
  ----
      num_blocks: number of convolutional block in each stage
      planes: number of output channels in each stage
      rect_pools: whether pooling square kernels should be replace with rectangular ones
      include_top: whether the classifier head should be instantiated
      num_classes: number of output classes
      input_shape: shapes of the input tensor
class_docstr_tok: ["Implements","the","VGG","architecture","from","`","``","Very","Deep","Convolutional","Networks","for","Large-Scale","Image","Recognition","''","<","https",":","\/\/arxiv.org\/pdf\/1409.1556.pdf",">","`","_",".","Args",":","--","--","num_blocks",":","number","of","convolutional","block","in","each","stage","planes",":","number","of","output","channels","in","each","stage","rect_pools",":","whether","pooling","square","kernels","should","be","replace","with","rectangular","ones","include_top",":","whether","the","classifier","head","should","be","instantiated","num_classes",":","number","of","output","classes","input_shape",":","shapes","of","the","input","tensor"]
code: def __init__(
      self,
      num_blocks: List[int],
      planes: List[int],
      rect_pools: List[bool],
      include_top: bool = False,
      num_classes: int = 1000,
      input_shape: Optional[Tuple[int, int, int]] = None,
      cfg: Optional[Dict[str, Any]] = None,
  ) -> None:
      _layers = []
      # Specify input_shape only for the first layer
      kwargs = {"input_shape": input_shape}
      for nb_blocks, out_chan, rect_pool in zip(
          num_blocks, planes, rect_pools
      ):
          for _ in range(nb_blocks):
              _layers.extend(conv_sequence(out_chan, "relu", True, kernel_size=3, **kwargs))  # type: ignore[arg-type]
              kwargs = {}
          _layers.append(
              layers.MaxPooling2D((2, 1 if rect_pool else 2))
          )
  
      if include_top:
          _layers.extend(
              [
                  layers.GlobalAveragePooling2D(),
                  layers.Dense(num_classes),
              ]
          )
      super().__init__(_layers)
      self.cfg = cfg
  
file_path: doctr/doctr/models/classification/vgg/tensorflow.py
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  from tensorflow.keras import layers
  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 1 to create a new VGG object from inherited base classes: Sequential with example: obj = VGG(num_blocks, planes, rect_pools, include_top, num_classes, input_shape, cfg)