def add_transpose(self, name, axes, input_name, output_name):
        """
        Add a N-D transpose layer with axes as a parameter.
        Refer to the ``TransposeLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.

        axes: list of int or tuple of int
            The list containing a permutation of "[0,1,2,...,N-1]" where N is the rank of input/output tensor.

        input_name: str
            The input blob name of this layer.

        output_name: str
            The output blob name of this layer.

        See Also
        --------
        add_permute, add_reshape
        """

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])

        rank = len(axes)
        axes = [rank + axis if axis < 0 else axis for axis in axes]
        spec_layer.transpose.axes.extend(axes)

        return spec_layer

        Add a N-D transpose layer with axes as a parameter.
        Refer to the ``TransposeLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.

        axes: list of int or tuple of int
            The list containing a permutation of "[0,1,2,...,N-1]" where N is the rank of input/output tensor.

        input_name: str
            The input blob name of this layer.

        output_name: str
            The output blob name of this layer.

        See Also
        --------
        add_permute, add_reshape
        
coremltools/models/neural_network/builder.py