class_docstr: Implements an abstract preprocessor object which performs casting, resizing, batching and normalization.
  
  Args:
  ----
      output_size: expected size of each page in format (H, W)
      batch_size: the size of page batches
      mean: mean value of the training distribution by channel
      std: standard deviation of the training distribution by channel
class_docstr_tok: ["Implements","an","abstract","preprocessor","object","which","performs","casting",",","resizing",",","batching","and","normalization",".","Args",":","--","--","output_size",":","expected","size","of","each","page","in","format","(","H",",","W",")","batch_size",":","the","size","of","page","batches","mean",":","mean","value","of","the","training","distribution","by","channel","std",":","standard","deviation","of","the","training","distribution","by","channel"]
code: def __init__(
      self,
      output_size: Tuple[int, int],
      batch_size: int,
      mean: Tuple[float, float, float] = (0.5, 0.5, 0.5),
      std: Tuple[float, float, float] = (1.0, 1.0, 1.0),
      fp16: bool = False,
      **kwargs: Any,
  ) -> None:
      self.batch_size = batch_size
      self.resize = Resize(output_size, **kwargs)
      # Perform the division by 255 at the same time
      self.normalize = Normalize(mean, std)
  
file_path: doctr/doctr/models/preprocessor/tensorflow.py
imports: import math
  from typing import Any, List, Tuple, Union
  import numpy
  import tensorflow
  from doctr.transforms import Normalize, Resize
  from doctr.utils.multithreading import multithread_exec
  from doctr.utils.repr import NestedObject
label_desc: Use image node_id 1 to create a new PreProcessor object from inherited base classes: NestedObject with example: obj = PreProcessor(output_size, batch_size, mean, std, fp16)