def add_argmin(self, name, input_name, output_name, axis, keepdims=True):
        """
        Add an argmin layer to the model that returns the indices of the minimum
        value along a specified axis in the input tensor.
        Refer to the ``ArgMinLayerParams`` 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.
        axis: int
            axis along which the argmin is computed. Negative indexing is supported.
        keepdims: bool, optional
            if true, output rank is same as input rank, default: true.

        See Also
        --------
        add_argmax
        """

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer_params = spec_layer.argMin
        spec_layer_params.axis = axis
        spec_layer_params.removeDim = not keepdims

        input_rank = self._get_rank(input_name)
        if input_rank == 1:
            self.rank_dict[output_name] = 1
        else:
            if keepdims:
                self.rank_dict[output_name] = input_rank
            else:
                self.rank_dict[output_name] = input_rank - 1
        return spec_layer

        Add an argmin layer to the model that returns the indices of the minimum
        value along a specified axis in the input tensor.
        Refer to the ``ArgMinLayerParams`` 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.
        axis: int
            axis along which the argmin is computed. Negative indexing is supported.
        keepdims: bool, optional
            if true, output rank is same as input rank, default: true.

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