(builder, node, graph, err)
convert to CoreML Broadcast To Static/Dynamic Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4086
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4108
convert to CoreML Broadcast To Static/Dynamic Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4086
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4108
convert to CoreML Broadcast To Static / Dynamic Layer : https : // github . com / apple / coremltools / blob / 655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492 / mlmodel / format / NeuralNetwork . proto#L4086 https : // github . com / apple / coremltools / blob / 655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492 / mlmodel / format / NeuralNetwork . proto#L4108
def _convert_expand(builder, node, graph, err):
    '''
    convert to CoreML Broadcast To Static/Dynamic Layer:
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4086
    https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L4108
    '''
    load_input_constants(builder, node, graph, err)
    if node.inputs[1] in node.input_tensors:
        output_shape = node.input_tensors[node.inputs[1]].astype(np.int64)
        builder.add_broadcast_to_static(
            name=node.name,
            input_name=node.inputs[0],
            output_name=node.outputs[0],
            output_shape=output_shape
        )
    else:
        builder.add_broadcast_to_dynamic(
            name=node.name,
            input_names=node.inputs,
            output_name=node.outputs[0],
        )
def _convert_expand ( builder , node , graph , err ) : load_input_constants ( builder , node , graph , err ) if node . inputs [ 1 ] in node . input_tensors : output_shape = node . input_tensors [ node . inputs [ 1 ] ] . astype ( np . int64 ) builder . add_broadcast_to_static ( name = node . name , input_name = node . inputs [ 0 ] , output_name = node . outputs [ 0 ] , output_shape = output_shape ) else : builder . add_broadcast_to_dynamic ( name = node . name , input_names = node . inputs , output_name = node . outputs [ 0 ] , )