repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
coremltools
coremltools/converters/mil/mil/ops/tests/iOS18/test_tensor_transformation.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil._deployment_compa...
546
16,991
coremltools
coremltools/converters/mil/mil/ops/tests/iOS15/test_elementwise_unary.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil.ops.defs.iOS15 ...
41
1,184
coremltools
coremltools/converters/mil/mil/ops/tests/iOS15/test_image_resizing.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
372
13,801
coremltools
coremltools/converters/mil/mil/ops/tests/iOS15/test_tensor_transformation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
102
3,098
coremltools
coremltools/converters/mil/mil/ops/tests/coreml_dialect/test_coreml_dialect.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import pytest from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.bui...
68
2,648
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_tensor_operation.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil import testing_re...
86
2,795
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_conv.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np import pytest from coremltools.converters.mil.mil import Builder as mb from core...
73
2,854
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_constexpr_ops.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
699
25,788
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_scatter_gather.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
247
9,075
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_image_resizing.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
196
6,176
coremltools
coremltools/converters/mil/mil/ops/tests/iOS16/test_tensor_transformation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools._deps import _HAS_TORCH, MSG_TOR...
165
5,721
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_elementwise_unary.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools from unittest.mock import patch import numpy as np import pytest import coremltool...
200
7,570
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_linear.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
186
7,433
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_tensor_operation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil import Builde...
148
5,598
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_quantization.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools from typing import Tuple import numpy as np import pytest from coremltools._deps i...
495
17,939
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_conv.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools._deps i...
192
6,200
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_scatter_gather.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest import coremltools as ct from coremltools.convert...
469
18,854
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_normalization.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools._deps import _HAS_TF_2, _HAS_TOR...
177
6,358
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_recurrent.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools._deps import _HAS_TORCH, MSG_TOR...
326
8,057
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_image_resizing.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil import Builde...
420
15,870
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_reduction.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil import Builde...
64
2,429
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_activation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil import Builde...
183
6,819
coremltools
coremltools/converters/mil/mil/ops/tests/iOS17/test_tensor_transformation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import numpy as np import pytest from coremltools.converters.mil.mil import Builde...
382
13,613
coremltools
coremltools/converters/mil/mil/ops/defs/_utils.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numbers from typing import List, Tuple import numpy as np from coremltools.conv...
661
24,694
coremltools
coremltools/converters/mil/mil/ops/defs/complex_dialect_ops.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause """ This file contains the dialect ops for handling complex numbers. For example, torch.fft.fft acce...
859
30,651
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/__init__.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil._deployment_compatibility import AvailableTarget as target from corem...
23
821
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/recurrent.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type import ...
39
1,861
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/compression.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math from typing import List, Optional import numpy as np from coremltools.converters.mil.mil...
761
31,205
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/tensor_transformation.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters.mil.m...
153
5,481
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/transformers.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters.mil....
167
6,653
coremltools
coremltools/converters/mil/mil/ops/defs/iOS18/states.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
44
1,357
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/image_resizing.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import (DefaultInputs, InputSpec, ...
897
34,112
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/elementwise_unary.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numpy as np from coremltools.converters.mil.mil import types from coremltools.co...
892
19,957
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/reduction.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import Operation, precondition, types from cor...
550
14,838
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/linear.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import ( DefaultInputs, InputSpec, ...
360
13,351
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/__init__.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil._deployment_compatibility import \ AvailableTarget as target _IOS...
53
3,183
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/random.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import (get_new_symbol, ...
301
9,533
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/activation.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numpy as np from coremltools.converters.mil.mil import types from coremltools.co...
622
15,398
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/normalization.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import (DefaultInputs, InputSpec, ...
382
12,601
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/recurrent.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Operation, Var, types from coremltools.converters.mil.mil....
526
21,292
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/conv.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Operation, types from coremltools.converters.mil.mil.block...
432
16,928
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/elementwise_binary.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import operator import numpy as np from coremltools.converters.mil.mil import ( InputSpec, O...
630
15,055
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/tensor_operation.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numpy as np from coremltools.converters.mil.mil import get_new_symbol, get_new_v...
1,352
43,439
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/tensor_transformation.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from typing import List import numpy as np import sympy as sm from coremltools import _logger as lo...
1,102
36,294
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/classify.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import Operation, types from coremltools.conv...
77
3,285
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/pool.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Operation, types from coremltools.converters.mil.mil.block...
265
9,304
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/scatter_gather.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import Operation, types from coremltools.conv...
558
16,964
coremltools
coremltools/converters/mil/mil/ops/defs/iOS15/control_flow.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import copy import numpy as np from coremltools import _logger as logger from coremltools.converter...
860
29,691
coremltools
coremltools/converters/mil/mil/ops/defs/coreml_dialect/ops.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
68
1,980
coremltools
coremltools/converters/mil/mil/ops/defs/iOS16/image_resizing.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type import ...
87
3,411
coremltools
coremltools/converters/mil/mil/ops/defs/iOS16/constexpr_ops.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters.mil....
373
13,765
coremltools
coremltools/converters/mil/mil/ops/defs/iOS16/tensor_operation.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clausefrom import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters....
116
3,931
coremltools
coremltools/converters/mil/mil/ops/defs/iOS16/tensor_transformation.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clausefrom coremltools.converters.mil.mil import types import numpy as np from coremltools.converters.mil.m...
187
6,965
coremltools
coremltools/converters/mil/mil/ops/defs/iOS16/scatter_gather.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Operation, types from coremltools.converters.mil.mil.input...
216
7,219
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/image_resizing.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import Operation, get_new_symbol, types from ...
347
14,849
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/elementwise_unary.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impo...
203
6,178
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/reduction.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters.mil....
127
4,137
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/linear.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
120
4,484
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/__init__.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil._deployment_compatibility import AvailableTarget as target _IOS17_TA...
48
1,325
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/activation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
358
9,885
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/normalization.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
149
5,542
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/recurrent.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impo...
99
4,426
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/conv.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
70
3,110
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/quantization_ops.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from typing import Optional, Tuple import numpy as np from coremltools.converters.mil.mil import Var...
244
9,696
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/tensor_operation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.input_type impor...
192
7,907
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/tensor_transformation.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from typing import List from coremltools.converters.mil.mil import types from coremltools.converters...
620
20,501
coremltools
coremltools/converters/mil/mil/ops/defs/iOS17/scatter_gather.py
.py
# Copyright (c) 2023, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil import types from coremltools.converters.mil....
477
18,780
coremltools
coremltools/converters/mil/mil/types/type_mapping.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from collections import namedtuple from typing import Optional, Union import numpy as _np import num...
613
18,296
coremltools
coremltools/converters/mil/mil/types/type_spec.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause class Type: """ - Type.name : A string with the name of the object - Type.tparam : For ...
90
2,994
coremltools
coremltools/converters/mil/mil/types/type_list.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from . import type_int from .annotate import annotate from .get_type_info import get_type_info from ....
70
1,974
coremltools
coremltools/converters/mil/mil/types/type_dict.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from . import type_bool, type_int from .annotate import annotate from .get_type_info import get_type_...
69
1,765
coremltools
coremltools/converters/mil/mil/types/type_str.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .annotate import annotate, class_annotate, delay_type from .type_spec import Type @class_annot...
23
641
coremltools
coremltools/converters/mil/mil/types/type_tensor.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np import sympy as sm from coremltools import _logger as logger from .get_type_info...
214
6,668
coremltools
coremltools/converters/mil/mil/types/__init__.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .annotate import annotate, apply_delayed_types, class_annotate, delay_type from .get_type_info i...
94
2,170
coremltools
coremltools/converters/mil/mil/types/type_globals_pseudo_type.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .type_spec import Type class globals_pseudo_type: @classmethod def __type_info__(cls):...
13
370
coremltools
coremltools/converters/mil/mil/types/type_int.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numpy as np import sympy as sm from coremltools import _logger as logger from ....
232
6,951
coremltools
coremltools/converters/mil/mil/types/type_double.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import numpy as np from coremltools import _logger as logger from .annotate import ann...
164
5,147
coremltools
coremltools/converters/mil/mil/types/type_void.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .type_spec import Type class void: @classmethod def __type_info__(cls): return...
13
352
coremltools
coremltools/converters/mil/mil/types/type_bool.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .annotate import annotate, class_annotate, delay_type from .type_spec import Type @class_annot...
50
1,230
coremltools
coremltools/converters/mil/mil/types/type_unknown.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .type_spec import Type class unknown: """ unknown is basically Any type. """ ...
20
468
coremltools
coremltools/converters/mil/mil/types/symbolic.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np import sympy as sm k_used_symbols = {} k_num_internal_syms = 0 _OBJECT_DTYPE = ...
85
2,237
coremltools
coremltools/converters/mil/mil/types/type_complex.py
.py
# Copyright (c) 2022, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools import _logger as logger from .annotate import annotate, class_...
172
5,705
coremltools
coremltools/converters/mil/mil/types/get_type_info.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from .type_spec import FunctionType, Type from .type_void import void def get_python_method_type(py...
60
2,123
coremltools
coremltools/converters/mil/mil/types/global_methods.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause """ This defines a list of all the "global methods" like len. Or type cast operators like int, list,...
50
1,468
coremltools
coremltools/converters/mil/mil/types/type_tuple.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from . import type_int, type_unknown from .annotate import annotate from .get_type_info import get_ty...
54
1,263
coremltools
coremltools/converters/mil/mil/types/type_state.py
.py
# Copyright (c) 2024, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil.types.get_type_info import get_type_info from coremltools.convert...
49
1,164
coremltools
coremltools/converters/mil/mil/types/annotate.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause class delay_type_cls: def __getattr__(self, t): return t # this delay type thingee is ...
116
3,411
coremltools
coremltools/converters/mil/frontend/_utils.py
.py
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import math as math import string from typing import List, Optional, Union import n...
938
36,451
coremltools
coremltools/converters/mil/frontend/tensorflow/naming_utils.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause _varname_charset = set( [chr(i) for i in range(ord("A"), ord("Z") + 1)] + [chr(i) for i in r...
36
993
coremltools
coremltools/converters/mil/frontend/tensorflow/dialect_ops.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Operation, types from coremltools.converters.mil.mil.input...
172
6,346
coremltools
coremltools/converters/mil/frontend/tensorflow/parse.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as _np from tensorflow.core.framework.types_pb2 import DataType from tensorflow.python.f...
139
4,082
coremltools
coremltools/converters/mil/frontend/tensorflow/tfssa.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import copy from coremltools import _logger as logger from coremltools.converters.mil.mil import typ...
550
21,046
coremltools
coremltools/converters/mil/frontend/tensorflow/parsed_tf_node.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types from .tfssa import ParsedNode class ParsedTFNode(...
81
3,234
coremltools
coremltools/converters/mil/frontend/tensorflow/load.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import gc import os from tempfile import NamedTemporaryFile import tensorflow as tf from packaging.v...
317
12,897
coremltools
coremltools/converters/mil/frontend/tensorflow/__init__.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import logging # suppress TensorFlow stdout prints import os from coremltools._deps import _HAS_TF ...
24
762
coremltools
coremltools/converters/mil/frontend/tensorflow/ops.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as _np import numpy as np from coremltools import _logger as logger from coremltools.co...
3,694
129,113
coremltools
coremltools/converters/mil/frontend/tensorflow/converter.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools import _logger as logger from coremltools.converters._profile_utils import _profile ...
526
23,778
coremltools
coremltools/converters/mil/frontend/tensorflow/convert_utils.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from collections import defaultdict from tqdm import tqdm as _tqdm from coremltools import _logger ...
212
7,497
coremltools
coremltools/converters/mil/frontend/tensorflow/tf_op_registry.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools import _logger as logger _TF_OPS_REGISTRY = {} def register_tf_op(_func=None, tf...
59
2,039
coremltools
coremltools/converters/mil/frontend/tensorflow/dot_visitor.py
.py
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import types class DotVisitor: """ Generates a dot desc...
150
4,544