Add pre-processing parameters to the neural network object

        Parameters
        ----------
        image_input_names: [str]
            Name of input blobs that are images

        is_bgr: boolean | dict()
            Channel order for input blobs that are images. BGR if True else RGB.
            To specify a different value for each image input,
            provide a dictionary with input names as keys.

        red_bias: float | dict()
            Image re-centering parameter (red channel)

        blue_bias: float | dict()
            Image re-centering parameter (blue channel)

        green_bias: float | dict()
            Image re-centering parameter (green channel)

        gray_bias: float | dict()
            Image re-centering parameter (for grayscale images)

        image_scale: float | dict()
            Value by which to scale the images.

        See Also
        --------
        set_input, set_output, set_class_labels

def set_pre_processing_parameters(self, image_input_names = [], is_bgr = False,
            red_bias = 0.0, green_bias = 0.0, blue_bias = 0.0, gray_bias = 0.0, image_scale = 1.0):
        """Add pre-processing parameters to the neural network object

        Parameters
        ----------
        image_input_names: [str]
            Name of input blobs that are images

        is_bgr: boolean | dict()
            Channel order for input blobs that are images. BGR if True else RGB.
            To specify a different value for each image input,
            provide a dictionary with input names as keys.

        red_bias: float | dict()
            Image re-centering parameter (red channel)

        blue_bias: float | dict()
            Image re-centering parameter (blue channel)

        green_bias: float | dict()
            Image re-centering parameter (green channel)

        gray_bias: float | dict()
            Image re-centering parameter (for grayscale images)

        image_scale: float | dict()
            Value by which to scale the images.

        See Also
        --------
        set_input, set_output, set_class_labels
        """
        spec = self.spec
        if not image_input_names:
            return # nothing to do here


        if not isinstance(is_bgr, dict): is_bgr = dict.fromkeys(image_input_names, is_bgr)
        if not isinstance(red_bias, dict): red_bias = dict.fromkeys(image_input_names, red_bias)
        if not isinstance(blue_bias, dict): blue_bias = dict.fromkeys(image_input_names, blue_bias)
        if not isinstance(green_bias, dict): green_bias = dict.fromkeys(image_input_names, green_bias)
        if not isinstance(gray_bias, dict): gray_bias = dict.fromkeys(image_input_names, gray_bias)
        if not isinstance(image_scale, dict): image_scale = dict.fromkeys(image_input_names, image_scale)

        # Add image inputs
        for input_ in spec.description.input:
            if input_.name in image_input_names:
                if input_.type.WhichOneof('Type') == 'multiArrayType':
                    array_shape = tuple(input_.type.multiArrayType.shape)
                    channels, height, width = array_shape
                    if channels == 1:
                        input_.type.imageType.colorSpace = _FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value('GRAYSCALE')
                    elif channels == 3:
                        if input_.name in is_bgr:
                            if is_bgr[input_.name]:
                                input_.type.imageType.colorSpace = _FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value('BGR')
                            else:
                                input_.type.imageType.colorSpace = _FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value('RGB')
                        else:
                            input_.type.imageType.colorSpace = _FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value('RGB')
                    else:
                        raise ValueError("Channel Value %d not supported for image inputs" % channels)
                    input_.type.imageType.width = width
                    input_.type.imageType.height = height

                preprocessing = self.nn_spec.preprocessing.add()
                preprocessing.featureName = input_.name
                scaler = preprocessing.scaler
                if input_.name in image_scale:
                    scaler.channelScale = image_scale[input_.name]
                else:
                    scaler.channelScale = 1.0
                if input_.name in red_bias: scaler.redBias = red_bias[input_.name]
                if input_.name in blue_bias: scaler.blueBias = blue_bias[input_.name]
                if input_.name in green_bias: scaler.greenBias = green_bias[input_.name]
                if input_.name in gray_bias: scaler.grayBias = gray_bias[input_.name]