class_docstr: Resize input image to target size.
  
  Args:
      target_size(List[int]|int]): Target image size.
      interpolation(str): Interpolation mode, default is 'LINEAR'. It support 6 modes: 'NEAREST', 'LINEAR', 'CUBIC', 'AREA', 'LANCZOS4' and 'RANDOM'.
class_docstr_tok: ["Resize","input","image","to","target","size",".","Args",":","target_size","(","List","[","int","]","|int","]",")",":","Target","image","size",".","interpolation","(","str",")",":","Interpolation","mode",",","default","is","'LINEAR","'",".","It","support","6","modes",":","'NEAREST","'",",","'LINEAR","'",",","'CUBIC","'",",","'AREA","'",",","'LANCZOS4","'","and","'RANDOM","'","."]
code: def __init__(
      self,
      target_size: Union[List[int], int],
      interpolation: str = "LINEAR",
  ):
      self.interpolation = interpolation
      if not (
          interpolation == "RANDOM"
          or interpolation in self.interpolation_dict
      ):
          raise ValueError(
              "interpolation should be one of {}".format(
                  self.interpolation_dict.keys()
              )
          )
      if isinstance(target_size, list) or isinstance(
          target_size, tuple
      ):
          if len(target_size) != 2:
              raise TypeError(
                  "when target is list or tuple, it should include 2 elements, but it is {}".format(
                      target_size
                  )
              )
      elif not isinstance(target_size, int):
          raise TypeError(
              "Type of target_size is invalid. Must be Integer or List or tuple, now is {}".format(
                  type(target_size)
              )
          )
  
      self.target_size = target_size
  
imports: import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.functional
label_desc: Use image node_id 1 to create a new Resize object  with example: obj = Resize(target_size, interpolation)