def add_squeeze(self, name, input_name, output_name, axes=None, squeeze_all=False):
        """
        Add a squeeze layer to the model that decrease the rank of the input
        tensor by removing unit dimensions.
        Refer to the ``SqueezeLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        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.
        axes: list of int or tuple of int, optional
            Dimensions to perform the operation, default: ``None`` (squeeze_all).
        squeeze_all: bool, optional
            If true, all dimensions that are 1 are squeezed, default: false.

        See Also
        --------
        add_expand_dims
        """

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer_params = spec_layer.squeeze
        if axes is not None:
            spec_layer_params.axes.extend(axes)
        spec_layer_params.squeezeAll = squeeze_all

        if squeeze_all or axes is None:
            # All the dimensions that are 1 will be squeezed
            # converter should update rank if shape is known
            self.rank_dict[output_name] = -1
        else:
            rank = self._get_rank(input_name) - len(axes)
            self.rank_dict[output_name] = rank if rank != 0 else 1
        return spec_layer

        Add a squeeze layer to the model that decrease the rank of the input
        tensor by removing unit dimensions.
        Refer to the ``SqueezeLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        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.
        axes: list of int or tuple of int, optional
            Dimensions to perform the operation, default: ``None`` (squeeze_all).
        squeeze_all: bool, optional
            If true, all dimensions that are 1 are squeezed, default: false.

        See Also
        --------
        add_expand_dims
        
coremltools/models/neural_network/builder.py