docstr: Configuration class used for image inputs in CoreML.
  
  Attributes:
  
  scale: (float)
      The scaling factor for all values in the image channels.
  bias: float or list of float
      If `color_layout` is 'G', bias would be a float
      If `color_layout` is 'RGB' or 'BGR', bias would be a list of float
  color_layout: string
      Color layout of the image.
      Valid values:
          'G': Grayscale
          'RGB': [Red, Green, Blue]
          'BRG': [Blue, Red, Green]
  channel_first: (bool) or None
      Set to True if input format is channel first.
      Default format is for TF is channel last. (channel_first=False)
                        for PyTorch is channel first. (channel_first=True)
docstr_tok: ["Configuration","class","used","for","image","inputs","in","CoreML",".","Attributes",":","scale",":","(","float",")","The","scaling","factor","for","all","values","in","the","image","channels",".","bias",":","float","or","list","of","float","If","`","color_layout","`","is","'","G","'",",","bias","would","be","a","float","If","`","color_layout","`","is","'RGB","'","or","'BGR","'",",","bias","would","be","a","list","of","float","color_layout",":","string","Color","layout","of","the","image",".","Valid","values",":","'","G","'",":","Grayscale","'RGB","'",":","[","Red",",","Green",",","Blue","]","'BRG","'",":","[","Blue",",","Red",",","Green","]","channel_first",":","(","bool",")","or","None","Set","to","True","if","input","format","is","channel","first",".","Default","format","is","for","TF","is","channel","last",".","(","channel_first=False",")","for","PyTorch","is","channel","first",".","(","channel_first=True",")"]
code: def __init__(
      self,
      name=None,
      shape=None,
      scale=1.0,
      bias=None,
      color_layout="RGB",
      channel_first=None,
  ):
      """
      Configuration class used for image inputs in CoreML.
  
      Attributes:
  
      scale: (float)
          The scaling factor for all values in the image channels.
      bias: float or list of float
          If `color_layout` is 'G', bias would be a float
          If `color_layout` is 'RGB' or 'BGR', bias would be a list of float
      color_layout: string
          Color layout of the image.
          Valid values:
              'G': Grayscale
              'RGB': [Red, Green, Blue]
              'BRG': [Blue, Red, Green]
      channel_first: (bool) or None
          Set to True if input format is channel first.
          Default format is for TF is channel last. (channel_first=False)
                            for PyTorch is channel first. (channel_first=True)
      """
      super(ImageType, self).__init__(name, shape)
      self.scale = scale
      if color_layout not in ["G", "RGB", "BGR"]:
          raise ValueError(
              "color_layout should be one of ['G', 'RGB', 'BGR'], got '{}' instead".format(
                  color_layout
              )
          )
      self.color_layout = color_layout
  
      if bias is None:
          self.bias = 0.0 if color_layout == "G" else [0.0, 0.0, 0.0]
      else:
          self.bias = bias
      self.channel_first = channel_first
  
imports: import logging
  import numpy
  import six
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type, is_builtin
label_desc: Use image node_id 1 to create a new ImageType object from inherited base classes: InputType with example: obj = ImageType(name, shape, scale, bias, color_layout, channel_first)