Add resize bilinear layer to the model. A layer that resizes the input to a given spatial size using bilinear interpolation.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        target_height: int
            Output height dimension.
        target_width: int
            Output width dimension.
        mode: str
            Following values are supported: 'STRICT_ALIGN_ENDPOINTS_MODE', 'ALIGN_ENDPOINTS_MODE', 'UPSAMPLE_MODE', 'ROI_ALIGN_MODE'.
            This parameter determines the sampling grid used for bilinear interpolation. Kindly refer to NeuralNetwork.proto for details.

        See Also
        --------
        add_upsample

def add_resize_bilinear(self, name, input_name, output_name, target_height=1, target_width=1,
                            mode='ALIGN_ENDPOINTS_MODE'):
        """
        Add resize bilinear layer to the model. A layer that resizes the input to a given spatial size using bilinear interpolation.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        target_height: int
            Output height dimension.
        target_width: int
            Output width dimension.
        mode: str
            Following values are supported: 'STRICT_ALIGN_ENDPOINTS_MODE', 'ALIGN_ENDPOINTS_MODE', 'UPSAMPLE_MODE', 'ROI_ALIGN_MODE'.
            This parameter determines the sampling grid used for bilinear interpolation. Kindly refer to NeuralNetwork.proto for details.

        See Also
        --------
        add_upsample
        """
        spec = self.spec
        nn_spec = self.nn_spec

        # Add a new inner-product layer
        spec_layer = nn_spec.layers.add()
        spec_layer.name = name
        spec_layer.input.append(input_name)
        spec_layer.output.append(output_name)
        spec_layer_params = spec_layer.resizeBilinear
        spec_layer_params.targetSize.append(target_height)
        spec_layer_params.targetSize.append(target_width)
        if mode == 'ALIGN_ENDPOINTS_MODE':
            spec_layer_params.mode.samplingMethod = _NeuralNetwork_pb2.SamplingMode.Method.Value('ALIGN_ENDPOINTS_MODE')
        elif mode == 'STRICT_ALIGN_ENDPOINTS_MODE':
            spec_layer_params.mode.samplingMethod = _NeuralNetwork_pb2.SamplingMode.Method.Value('STRICT_ALIGN_ENDPOINTS_MODE')
        elif mode == 'UPSAMPLE_MODE':
            spec_layer_params.mode.samplingMethod = _NeuralNetwork_pb2.SamplingMode.Method.Value('UPSAMPLE_MODE')
        elif mode == 'ROI_ALIGN_MODE':
            spec_layer_params.mode.samplingMethod = _NeuralNetwork_pb2.SamplingMode.Method.Value('ROI_ALIGN_MODE')
        else:
            raise ValueError("Unspported resize bilinear mode %s" % mode)