mct-nightly 2.1.0.20240720.437__py3-none-any.whl → 2.1.0.20240722.456__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/METADATA +1 -1
- {mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/RECORD +7 -7
- model_compression_toolkit/__init__.py +1 -1
- model_compression_toolkit/core/keras/reader/node_builder.py +11 -12
- {mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/LICENSE.md +0 -0
- {mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/WHEEL +0 -0
- {mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/top_level.txt +0 -0
{mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
model_compression_toolkit/__init__.py,sha256=
|
1
|
+
model_compression_toolkit/__init__.py,sha256=iezGRE9BMbpwAOs234q9S_hM-r__OjgRKtfVjPT5EOc,1573
|
2
2
|
model_compression_toolkit/constants.py,sha256=9pVleMwnhlM4QwIL2HcEq42I1uF4rlSw63RUjkxOF4w,3923
|
3
3
|
model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
|
4
4
|
model_compression_toolkit/logger.py,sha256=3DByV41XHRR3kLTJNbpaMmikL8icd9e1N-nkQAY9oDk,4567
|
@@ -199,7 +199,7 @@ model_compression_toolkit/core/keras/quantizer/lut_fake_quant.py,sha256=Up3-sbuA
|
|
199
199
|
model_compression_toolkit/core/keras/reader/__init__.py,sha256=mjbqLD-KcG3eNeCYpu1GBS7VclGVOQ63x2p6mAAuba4,698
|
200
200
|
model_compression_toolkit/core/keras/reader/common.py,sha256=eZWjBcvTDUX7fCWmy1OAH4lYLFTh59_UQ_nP_Gjp4yw,2594
|
201
201
|
model_compression_toolkit/core/keras/reader/connectivity_handler.py,sha256=AgF6qXZOJMeXvc-pBnGY23BJz7wPBx2aTYxHiO8efec,11303
|
202
|
-
model_compression_toolkit/core/keras/reader/node_builder.py,sha256=
|
202
|
+
model_compression_toolkit/core/keras/reader/node_builder.py,sha256=NDgrEiy2WEe9k5ZuBaTynCFpwNrVIEIDdG_HNjI4MAM,14129
|
203
203
|
model_compression_toolkit/core/keras/reader/reader.py,sha256=wS9UQ2wJKnkZYe9JHwQp7ygDr6CRlzrxmIyLDv1Qz6U,8109
|
204
204
|
model_compression_toolkit/core/keras/reader/nested_model/__init__.py,sha256=mjbqLD-KcG3eNeCYpu1GBS7VclGVOQ63x2p6mAAuba4,698
|
205
205
|
model_compression_toolkit/core/keras/reader/nested_model/edges_merger.py,sha256=K6KAH9o8KSG6baLmhKoCrYK-i-wb6gRKiZmoijFqEYA,7906
|
@@ -517,8 +517,8 @@ model_compression_toolkit/xquant/pytorch/model_analyzer.py,sha256=b93o800yVB3Z-i
|
|
517
517
|
model_compression_toolkit/xquant/pytorch/pytorch_report_utils.py,sha256=yrZNVRm2IRU7r7R-hjS2lOQ6wvEEvbeunvf2jKoWjXk,3277
|
518
518
|
model_compression_toolkit/xquant/pytorch/similarity_functions.py,sha256=CERxq5K8rqaiE-DlwhZBTUd9x69dtYJlkHOPLB54vm8,2354
|
519
519
|
model_compression_toolkit/xquant/pytorch/tensorboard_utils.py,sha256=eyMoXt5o5EnMr6d-rpCwQdX5mAiYiymvbgKv4tf7-a0,4576
|
520
|
-
mct_nightly-2.1.0.
|
521
|
-
mct_nightly-2.1.0.
|
522
|
-
mct_nightly-2.1.0.
|
523
|
-
mct_nightly-2.1.0.
|
524
|
-
mct_nightly-2.1.0.
|
520
|
+
mct_nightly-2.1.0.20240722.456.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
|
521
|
+
mct_nightly-2.1.0.20240722.456.dist-info/METADATA,sha256=Y6Uw2eCZDA8p3Lvun9r2JjrjxfAMHaCWHKIYyfqatzA,19719
|
522
|
+
mct_nightly-2.1.0.20240722.456.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
523
|
+
mct_nightly-2.1.0.20240722.456.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
|
524
|
+
mct_nightly-2.1.0.20240722.456.dist-info/RECORD,,
|
@@ -27,4 +27,4 @@ from model_compression_toolkit import data_generation
|
|
27
27
|
from model_compression_toolkit import pruning
|
28
28
|
from model_compression_toolkit.trainable_infrastructure.keras.load_model import keras_load_quantized_model
|
29
29
|
|
30
|
-
__version__ = "2.1.0.
|
30
|
+
__version__ = "2.1.0.20240722.000456"
|
@@ -242,10 +242,10 @@ def build_node(node: KerasNode,
|
|
242
242
|
output_shape = keras_layer.get_output_shape_at(io_index)
|
243
243
|
|
244
244
|
if layer_class in [TFOpLambda, SlicingOpLambda]:
|
245
|
-
# Some functional ops
|
246
|
-
#
|
247
|
-
#
|
248
|
-
inputs_as_list = __is_functional_inputs_a_list(op_call_args)
|
245
|
+
# Some functional ops should receive the input tensors as a list,
|
246
|
+
# so each FunctionalNode holds a flag to indicate that.
|
247
|
+
# Other functional ops can receive each argument as list, but in that case not all inputs appear in that list.
|
248
|
+
inputs_as_list = __is_functional_inputs_a_list(op_call_args, keras_layer)
|
249
249
|
|
250
250
|
kwarg2index = get_kwargs2index(keras_layer)
|
251
251
|
|
@@ -301,21 +301,20 @@ def build_node(node: KerasNode,
|
|
301
301
|
return node
|
302
302
|
|
303
303
|
|
304
|
-
def __is_functional_inputs_a_list(op_call_args: Any) -> bool:
|
304
|
+
def __is_functional_inputs_a_list(op_call_args: Any, keras_layer: Any) -> bool:
|
305
305
|
"""
|
306
306
|
Check whether the input tensors should be passed as a list
|
307
|
-
or not.
|
307
|
+
or not. This is relevant only for specific TF operators that are specified in the function's condition.
|
308
308
|
|
309
309
|
Args:
|
310
310
|
op_call_args: Arguments list to check.
|
311
|
+
keras_layer: TFOpLambda layer.
|
311
312
|
|
312
313
|
Returns:
|
313
314
|
Whether the input tensors should be passed as a list or not.
|
314
315
|
"""
|
315
316
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
return inputs_as_list
|
321
|
-
return False
|
317
|
+
return (keras_layer.symbol in
|
318
|
+
[TFOpLambda(tf.concat).symbol, TFOpLambda(tf.stack).symbol,TFOpLambda(tf.add_n).symbol] and
|
319
|
+
len(op_call_args) > 0 and
|
320
|
+
isinstance(op_call_args[0], list))
|
{mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/LICENSE.md
RENAMED
File without changes
|
File without changes
|
{mct_nightly-2.1.0.20240720.437.dist-info → mct_nightly-2.1.0.20240722.456.dist-info}/top_level.txt
RENAMED
File without changes
|