(builder, node, graph, err)
convert to CoreML Transpose Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3426
convert to CoreML Transpose Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3426
convert to CoreML Transpose Layer : https : // github . com / apple / coremltools / blob / 655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492 / mlmodel / format / NeuralNetwork . proto#L3426
def _convert_transpose(builder, node, graph, err):
    '''
    convert to CoreML Transpose Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3426
    '''
    
    axes = node.attrs.get('perm', [])
    # If 'perm' not provided, the reverse the dimensions
    if axes == []:
        rank = builder._get_rank(node.inputs[0])
        if rank == -1:
            return err.unsupported_op_configuration(builder, node, graph, "Rank unknown for input")
        axes = list(range(-1, -(rank+1), -1))

    builder.add_transpose(
        name=node.name,
        axes=axes,
        input_name=node.inputs[0],
        output_name=node.outputs[0]
    )
def _convert_transpose ( builder , node , graph , err ) : axes = node . attrs . get ( 'perm' , [ ] ) # If 'perm' not provided, the reverse the dimensions if axes == [ ] : rank = builder . _get_rank ( node . inputs [ 0 ] ) if rank == - 1 : return err . unsupported_op_configuration ( builder , node , graph , "Rank unknown for input" ) axes = list ( range ( - 1 , - ( rank + 1 ) , - 1 ) ) builder . add_transpose ( name = node . name , axes = axes , input_name = node . inputs [ 0 ] , output_name = node . outputs [ 0 ] )