MCPcopy Create free account

hub / github.com/apple/coremltools / functions

Functions41,379 in github.com/apple/coremltools

↓ 1 callersMethod_check_program_opset_version
(self)
coremltools/converters/mil/mil/program.py:115
↓ 1 callersMethod_check_underflow_to_zero
(self, new_var, var)
coremltools/converters/mil/mil/passes/defs/quantization.py:468
↓ 1 callersFunction_check_unsupported_outputs
(unsupported_outputs)
coremltools/converters/mil/frontend/tensorflow/ssa_passes/tf_lstm_to_core_lstm.py:211
↓ 1 callersFunction_check_var_scalar_value_in_interval
:param x: var :param lower_bound: a scalar value :param upper_bound: a scalar value :return: True if the value of var is in the inter
coremltools/converters/mil/mil/passes/helper.py:100
↓ 1 callersMethod_check_vars_visibility_in_block
This utils does a one pass program-wise checking of vars visibility. That is, each input of an op, should appear before the op in the
coremltools/converters/mil/mil/block.py:174
↓ 1 callersFunction_check_weighting_scheme
Simple wrapper to ensure the weighting scheme is valid for CoreML conversion
coremltools/converters/sklearn/_k_neighbors_classifier.py:215
↓ 1 callersMethod_clean_up_child_ops
(block)
coremltools/converters/mil/mil/ops/defs/iOS15/control_flow.py:379
↓ 1 callersMethod_cleanup_dead_nodes
( self, graph: torch._C.Graph, )
coremltools/models/ml_program/experimental/torch/debugging_utils.py:371
↓ 1 callersMethod_clear
(self)
deps/protobuf/python/google/protobuf/internal/containers.py:638
↓ 1 callersMethod_clone_block
( src: torch._C.Block, dst: torch._C.Block, dst_graph: torch._C.Graph, find_va
coremltools/models/ml_program/experimental/torch/debugging_utils.py:472
↓ 1 callersMethod_clone_spec
( spec: "proto.Model_pb2.Model", )
coremltools/models/ml_program/experimental/debugging_utils.py:164
↓ 1 callersMethod_close_to_zero
(cls, val, np_type)
coremltools/converters/mil/mil/passes/defs/quantization.py:124
↓ 1 callersMethod_cluster_weights_1d
Cluster weights such that each centroid is a 1d scalar, i.e., cluster_dim == 1.
coremltools/optimize/torch/_utils/k_means.py:540
↓ 1 callersMethod_cluster_weights_2d
Cluster weights such that each centroid is a 2d vector, i.e., cluster_dim > 1. If axis = 0: vectors are chosen with elements along th
coremltools/optimize/torch/_utils/k_means.py:604
↓ 1 callersMethod_cluster_weights_with_masking
Cluster block weight with clustering only applied to masked weight elements.
coremltools/optimize/torch/_utils/k_means.py:508
↓ 1 callersMethod_cluster_weights_worker
( cls, rank: int, work_q: _Union[_mp.Queue, _queue.Queue], results_q: _Union[_
coremltools/optimize/torch/_utils/k_means.py:719
↓ 1 callersFunction_combine_lists_with_common_elements
Utility for merging lists with common elements. Parameters ---------- data: list[list[]] data is a list of lists with string
coremltools/optimize/_utils.py:884
↓ 1 callersFunction_combine_lists_with_common_elements
Parameters ---------- data: list[list[]] data is a list of lists with strings. Returns ------- merged: combined list
coremltools/optimize/coreml/experimental/_post_training_quantization.py:118
↓ 1 callersFunction_commingle_loop_vars_block
(block)
coremltools/converters/mil/backend/nn/passes/commingle_loop_vars.py:11
↓ 1 callersMethod_compare_predictions_numerical
( self, ref_preds, coreml_preds, snr_thresh=15, psnr_thresh=30 )
coremltools/test/neural_network/test_tf_numeric.py:34
↓ 1 callersMethod_compress_impl
Compresses a model layerwise using the following steps: 1) Compute inputs to the first layer which is set up for compression using in
coremltools/optimize/torch/layerwise_compression/layerwise_compressor.py:327
↓ 1 callersMethod_compress_impl
Implementation of the compression algorithm
coremltools/optimize/torch/layerwise_compression/algorithms.py:311
↓ 1 callersMethod_compress_tensor
(self, x, dtype)
coremltools/optimize/torch/palettization/_fake_palettizer_tensor_hook.py:103
↓ 1 callersMethod_compute_hessian
Compute Hessian of the L2 loss between the original output of the layer and the output computed using compressed weights.
coremltools/optimize/torch/layerwise_compression/algorithms.py:281
↓ 1 callersMethod_compute_iou_matrix
(boxes)
coremltools/converters/mil/mil/ops/tests/iOS14/test_tensor_operation.py:444
↓ 1 callersMethod_compute_quantization_params
Compute quantization parameters
coremltools/optimize/torch/quantization/post_training_quantization.py:356
↓ 1 callersMethod_compute_sensitivity_impl_multiple_workers
Computes sensitivity for the model weights using multiple processes. This mode is useful for large models for which computing gradien
coremltools/optimize/torch/palettization/sensitive_k_means.py:331
↓ 1 callersMethod_compute_sensitivity_impl_single_worker
Computes sensitivity for the model weights using a single process.
coremltools/optimize/torch/palettization/sensitive_k_means.py:307
↓ 1 callersFunction_compute_snr
(arr1, arr2)
coremltools/converters/mil/test_inputs_outputs_shape.py:56
↓ 1 callersMethod_compute_snr
(arr1, arr2)
coremltools/models/neural_network/quantization_utils.py:1227
↓ 1 callersFunction_concat_dims
(dims, none_if_empty=False)
coremltools/converters/mil/frontend/_utils.py:592
↓ 1 callersMethod_concat_to_pixel_shuffle_block
(self, block)
coremltools/converters/mil/mil/passes/defs/optimize_tensor_operation.py:403
↓ 1 callersMethod_concrete_fn_from_tf_keras
(keras_model: _tf.keras.Model)
coremltools/converters/mil/frontend/tensorflow2/load.py:314
↓ 1 callersMethod_const_elimination_block
(self, block)
coremltools/converters/mil/mil/passes/defs/cleanup/const_elimination.py:58
↓ 1 callersMethod_constant_deduplication_block
(self, block: Block)
coremltools/converters/mil/mil/passes/defs/cleanup/const_deduplication.py:137
↓ 1 callersFunction_constant_propagation
(fn, new_graph, constant_nodes, constant_node_num_outputs)
coremltools/converters/mil/frontend/tensorflow/tf_graph_pass/constant_propagation.py:66
↓ 1 callersFunction_construct_causal_attn_mask
(query_var: Var, key_var: Var)
coremltools/converters/mil/frontend/torch/ops.py:8870
↓ 1 callersMethod_construct_compression_info
Construct compression info from the traced model's state_dict. The state_dict of the traced model is something like {
coremltools/converters/mil/frontend/torch/converter.py:851
↓ 1 callersMethod_construct_compression_op
Construct the compression op based on the compression info.
coremltools/converters/mil/frontend/torch/converter.py:1172
↓ 1 callersFunction_construct_conv_transpose
( node, x: Var, weight: Var, pad: np.ndarray, out_padding: np.ndarray,
coremltools/converters/mil/frontend/torch/ops.py:1358
↓ 1 callersFunction_construct_ct_input_types_from_torch_user_inputs
( exported_program, # torch.export.ExportedProgram torch_user_inputs: Dict[str, torch.Tensor], )
coremltools/converters/mil/frontend/torch/exir_utils.py:92
↓ 1 callersFunction_construct_ct_range_dim_from_torch_value_ranges
( value_ranges, # torch.utils._sympy.value_ranges.ValueRanges )
coremltools/converters/mil/frontend/torch/exir_utils.py:32
↓ 1 callersFunction_construct_ct_tensor_type_from_torch
( name: str, tensor: torch.Tensor, symbol_name_to_ct_range_dim: Dict[str, RangeDim], )
coremltools/converters/mil/frontend/torch/exir_utils.py:55
↓ 1 callersMethod_construct_global_config
(self)
coremltools/optimize/torch/quantization/quantizer.py:161
↓ 1 callersFunction_construct_matmul
(x: Var, y: Var, name: Optional[str] = None)
coremltools/converters/mil/frontend/torch/ops.py:1038
↓ 1 callersFunction_construct_nodes_to_fuse_inputs
(nodes_to_fuse)
coremltools/converters/mil/frontend/torch/torchir_passes.py:112
↓ 1 callersFunction_construct_other_pipelines
Construct other pipelines based on the main pipeline. It includes: - The frontend pipeline which will run in the frontend converter - The
coremltools/converters/mil/converter.py:318
↓ 1 callersMethod_construct_palettization_op
The weight is constructed by 2**nbits unique values in each group. When `palettization_scale` is provided, it means the weight has s
coremltools/converters/mil/frontend/torch/converter.py:1031
↓ 1 callersMethod_construct_quant_dequant_op
Construct new quant-dequant pairs based on an input var.
coremltools/optimize/coreml/_quantization_passes.py:1662
↓ 1 callersMethod_construct_scope_info_list_from_op_scopes
(op: Operation)
coremltools/converters/mil/mil/passes/defs/optimize_state.py:117
↓ 1 callersMethod_construct_sparsification_op
( weight: np.ndarray, compression_info: CompressionInfo, name: str, compressed
coremltools/converters/mil/frontend/torch/converter.py:1143
↓ 1 callersFunction_construct_symbol_name_to_ct_range_dim_dict
( exported_program, # torch.export.ExportedProgram )
coremltools/converters/mil/frontend/torch/exir_utils.py:43
↓ 1 callersFunction_construct_unfold_indices
A utility function to construct indices for torch.unfold (im2col), assuming the torch.unfold input `x` to be contiguous
coremltools/converters/mil/frontend/torch/ops.py:8257
↓ 1 callersMethod_construct_weights_with_two_orders
Construct two quantized lut weights, represented in different quant/lut orders.
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py:2045
↓ 1 callersFunction_conv2d
()
coremltools/test/optimize/torch/pruning/test_magnitude_pruner.py:52
↓ 1 callersFunction_conv_bn_fusion
(conv_idx, bn_idx, layers)
coremltools/models/neural_network/optimization_utils.py:125
↓ 1 callersMethod_conv_forward
( self, input: Tensor, weight: Tensor, bias: _Optional[Tensor], output
coremltools/optimize/torch/quantization/modules/conv_transpose_fused.py:299
↓ 1 callersFunction_convert
(model, feature_names, target)
coremltools/converters/sklearn/_logistic_regression.py:55
↓ 1 callersFunction_convert
(model, features, target)
coremltools/converters/sklearn/_linear_regression.py:55
↓ 1 callersFunction_convert_1bit_array_to_byte_array
Convert bit array to byte array. arr: list Bits as a list where each element is an integer of 0 or 1 Returns ------- nu
coremltools/models/neural_network/quantization_utils.py:276
↓ 1 callersFunction_convert_k_neighbors_classifier
Convert the scikit KNeighborsClassifier to CoreML. Assumes initial validation of the scikit model has been done.
coremltools/converters/sklearn/_k_neighbors_classifier.py:71
↓ 1 callersFunction_convert_model_spec_to_pymil_prog
A utility that converts an ``mlprogram`` model into PyMIL program.
coremltools/models/utils.py:1306
↓ 1 callersFunction_convert_sklearn_model
Converts a generic sklearn pipeline, transformer, classifier, or regressor into an coreML specification.
coremltools/converters/sklearn/_converter_internal.py:104
↓ 1 callersMethod_convert_tensor_to_numpy
(self, input_dict)
coremltools/models/model.py:1069
↓ 1 callersFunction_convert_to_classifier
(proto, classifier_config, skip_model_load=False)
coremltools/converters/mil/backend/nn/load.py:55
↓ 1 callersFunction_convert_to_float
(feature)
coremltools/models/utils.py:1025
↓ 1 callersFunction_convert_to_image_input
(proto, inputs, skip_model_load=False)
coremltools/converters/mil/backend/nn/load.py:25
↓ 1 callersFunction_convert_to_inputtype
(inputs)
coremltools/converters/mil/frontend/torch/test/testing_utils.py:128
↓ 1 callersFunction_convert_to_sub_byte_dtype
Convert data to a specific sub-byte dtype, including shift between signed and unsigned range.
coremltools/converters/mil/mil/ops/tests/iOS18/test_compression.py:31
↓ 1 callersFunction_convert_to_torch_inputtype
( inputs: List[TensorType], allow_default_shape: bool = True )
coremltools/converters/mil/frontend/torch/converter.py:131
↓ 1 callersMethod_copy_construct_const_var
(source_const_var: Var)
coremltools/converters/mil/mil/passes/defs/symbol_transform.py:249
↓ 1 callersMethod_copy_impl
(self, dest)
coremltools/converters/mil/frontend/tensorflow/tfssa.py:57
↓ 1 callersMethod_copy_impl
(self, dest)
coremltools/converters/mil/frontend/tensorflow/parsed_tf_node.py:74
↓ 1 callersMethod_create_constexpr_var
( op: Operation, sparse_params: "optimize_utils.SparseParams", joint_compression: bool = False )
coremltools/optimize/coreml/_quantization_passes.py:451
↓ 1 callersMethod_create_constexpr_var
Create constexpr quant op based on opset version.
coremltools/optimize/coreml/_quantization_passes.py:1354
↓ 1 callersFunction_create_conv2d_weight
( in_channels: int, kernel_size: "tuple[int, int]", dtype: torch.dtype, )
coremltools/converters/mil/frontend/torch/ops.py:8326
↓ 1 callersMethod_create_function
Utility to construct a pymil function.
coremltools/converters/mil/mil/builder.py:264
↓ 1 callersFunction_create_large_module
()
coremltools/test/optimize/torch/pruning/test_magnitude_pruner.py:51
↓ 1 callersFunction_create_list_proto_value
(elements: List[str])
coremltools/models/ml_program/experimental/compute_plan_utils.py:309
↓ 1 callersMethod_create_model_with_outputs
( self, output_names: List[str], ignore_const_ops: bool, )
coremltools/models/ml_program/experimental/debugging_utils.py:310
↓ 1 callersFunction_create_module
()
coremltools/test/optimize/torch/pruning/test_magnitude_pruner.py:38
↓ 1 callersFunction_create_name_index
( names: Iterable[str], )
coremltools/models/ml_program/experimental/debugging_utils.py:1220
↓ 1 callersFunction_create_nested_blocks
An utility function that creates nested blocks for control flow ops.
coremltools/converters/mil/frontend/milproto/load.py:250
↓ 1 callersMethod_create_node_infos
( self, module_key: TorchScriptModuleInfo.Key, graph: torch._C.Graph, )
coremltools/models/ml_program/experimental/torch/debugging_utils.py:279
↓ 1 callersMethod_create_output_name_to_op_map
( ops: Iterable[proto.MIL_pb2.Operation], )
coremltools/models/ml_program/experimental/debugging_utils.py:173
↓ 1 callersMethod_create_placeholder
Converts an InputType into a Placeholder. 1. ``StateType`` into ``mb.state_tensor_placeholder``. 2. ``TensorType`` and ``Ima
coremltools/converters/mil/frontend/torch/converter.py:822
↓ 1 callersMethod_create_placeholders
( source_function: Function, canonical_materialization_map: Dict[str, int] )
coremltools/converters/mil/mil/passes/defs/symbol_transform.py:228
↓ 1 callersMethod_create_qconfig_from_quantization_config
Creates a :py:class:`QConfig` from ``quantization_config``
coremltools/optimize/torch/quantization/_qconfig_mapping.py:225
↓ 1 callersFunction_create_simple_model
()
coremltools/test/optimize/torch/palettization/test_palettization_api.py:39
↓ 1 callersFunction_create_var_from_spec
This helper function is used for creating PyMIL Var/ListVar from the proto spec. Mainly used for the construction of the control flow ops.
coremltools/converters/mil/frontend/milproto/load.py:225
↓ 1 callersMethod_create_vars
For each key K in `candidate_kv`, create a Var if the following are satisfied: - K exists in input_spec and is not an Intern
coremltools/converters/mil/mil/builder.py:131
↓ 1 callersFunction_datadir
(request)
coremltools/test/optimize/torch/conftest.py:54
↓ 1 callersMethod_dead_code_elimination_block
(block)
coremltools/converters/mil/mil/passes/defs/cleanup/dead_code_elimination.py:53
↓ 1 callersFunction_decompose_bytes_to_bit_arr
Unpack bytes to bits arr: list Byte Stream, as a list of uint8 values Returns ------- bit_arr: list Decomposed
coremltools/models/neural_network/quantization_utils.py:320
↓ 1 callersMethod_decompose_conv1d_block
(self, block: Block)
coremltools/converters/mil/backend/nn/passes/conv1d_decomposition.py:40
↓ 1 callersFunction_decompress_tensor
(x, device)
coremltools/optimize/torch/palettization/_fake_palettizer_tensor_hook.py:278
↓ 1 callersFunction_decorate_block_with_default_torch_scope
(block: Block)
coremltools/converters/mil/testing_utils.py:638
↓ 1 callersFunction_decorate_prog_with_default_torch_scope
Decorate every op in the program with a default TORCHSCRIPT_MODULE_TYPE scope info.
coremltools/converters/mil/testing_utils.py:633
↓ 1 callersFunction_decorate_prog_with_scope_if_not_present
For a program without any scope info, we manually add scopes to every op, in ordere to test that all graph passes can preserve the source sco
coremltools/converters/mil/testing_utils.py:610
↓ 1 callersMethod_decouple_state_and_input
Utils separates state input from non-state input features.
coremltools/converters/mil/backend/mil/load.py:618
← previousnext →9,401–9,500 of 41,379, ranked by callers