mct-nightly 2.1.0.20240812.432__py3-none-any.whl → 2.1.0.20240813.442__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.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/METADATA +1 -1
- {mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/RECORD +56 -55
- model_compression_toolkit/__init__.py +1 -1
- model_compression_toolkit/constants.py +0 -7
- model_compression_toolkit/core/common/graph/functional_node.py +1 -1
- model_compression_toolkit/core/common/quantization/quantization_config.py +1 -1
- model_compression_toolkit/core/keras/resource_utilization_data_facade.py +4 -3
- model_compression_toolkit/core/pytorch/resource_utilization_data_facade.py +1 -1
- model_compression_toolkit/data_generation/__init__.py +1 -1
- model_compression_toolkit/data_generation/keras/keras_data_generation.py +7 -3
- model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py +1 -1
- model_compression_toolkit/exporter/model_exporter/keras/keras_export_facade.py +4 -3
- model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_onnx_pytorch_exporter.py +1 -1
- model_compression_toolkit/exporter/model_exporter/pytorch/pytorch_export_facade.py +1 -1
- model_compression_toolkit/exporter/model_wrapper/keras/builder/fully_quantized_model_builder.py +4 -3
- model_compression_toolkit/exporter/model_wrapper/keras/validate_layer.py +4 -3
- model_compression_toolkit/exporter/model_wrapper/pytorch/builder/fully_quantized_model_builder.py +1 -1
- model_compression_toolkit/exporter/model_wrapper/pytorch/validate_layer.py +1 -2
- model_compression_toolkit/gptq/keras/quantization_facade.py +8 -5
- model_compression_toolkit/gptq/keras/quantizer/base_keras_gptq_quantizer.py +4 -3
- model_compression_toolkit/gptq/pytorch/quantization_facade.py +2 -1
- model_compression_toolkit/gptq/pytorch/quantizer/base_pytorch_gptq_quantizer.py +1 -1
- model_compression_toolkit/pruning/keras/pruning_facade.py +5 -3
- model_compression_toolkit/pruning/pytorch/pruning_facade.py +2 -1
- model_compression_toolkit/ptq/keras/quantization_facade.py +5 -3
- model_compression_toolkit/ptq/pytorch/quantization_facade.py +2 -1
- model_compression_toolkit/qat/keras/quantization_facade.py +7 -5
- model_compression_toolkit/qat/keras/quantizer/base_keras_qat_quantizer.py +4 -3
- model_compression_toolkit/qat/pytorch/quantization_facade.py +2 -1
- model_compression_toolkit/qat/pytorch/quantizer/base_pytorch_qat_quantizer.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/latest/__init__.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/target_platform_capabilities.py +2 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tpc_keras.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tp_model.py +1 -0
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_keras.py +5 -3
- model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_pytorch.py +2 -0
- model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/latest/__init__.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/target_platform_capabilities.py +2 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/latest/__init__.py +1 -1
- model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/target_platform_capabilities.py +2 -1
- model_compression_toolkit/trainable_infrastructure/keras/base_keras_quantizer.py +4 -3
- model_compression_toolkit/trainable_infrastructure/keras/load_model.py +4 -3
- model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py +4 -3
- model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py +1 -1
- model_compression_toolkit/verify_packages.py +33 -0
- model_compression_toolkit/xquant/keras/facade_xquant_report.py +4 -3
- model_compression_toolkit/xquant/pytorch/facade_xquant_report.py +1 -1
- {mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/LICENSE.md +0 -0
- {mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/WHEEL +0 -0
- {mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/top_level.txt +0 -0
{mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/RECORD
RENAMED
@@ -1,8 +1,9 @@
|
|
1
|
-
model_compression_toolkit/__init__.py,sha256=
|
2
|
-
model_compression_toolkit/constants.py,sha256=
|
1
|
+
model_compression_toolkit/__init__.py,sha256=TfJUGlJPIuxH63h0s2ppXvyeiTCGanUIGaxWyU1e6XE,1573
|
2
|
+
model_compression_toolkit/constants.py,sha256=i4wYheBkIdQmsQA-axIpcT3YiSO1USNc-jaNiNE8w6E,3920
|
3
3
|
model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
|
4
4
|
model_compression_toolkit/logger.py,sha256=3DByV41XHRR3kLTJNbpaMmikL8icd9e1N-nkQAY9oDk,4567
|
5
5
|
model_compression_toolkit/metadata.py,sha256=UtXS5ClK-qPoxGRuytlDGZSzgLo911dMni2EFRcg6io,3623
|
6
|
+
model_compression_toolkit/verify_packages.py,sha256=TlS-K1EP-QsghqWUW7SDPkAJiUf7ryw4tvhFDe6rCUk,1405
|
6
7
|
model_compression_toolkit/core/__init__.py,sha256=tnDtL9KmT0vsOU27SsJ19TKDEbIH-tXYeGxTo5YnNUM,2077
|
7
8
|
model_compression_toolkit/core/analyzer.py,sha256=X-2ZpkH1xdXnISnw1yJvXnvV-ssoUh-9LkLISSWNqiY,3691
|
8
9
|
model_compression_toolkit/core/graph_prep_runner.py,sha256=7-b7Jd5jBVaXOWg5nSqbEyzBtdaGDbCxs8aqMV6GZ6I,11287
|
@@ -34,7 +35,7 @@ model_compression_toolkit/core/common/graph/__init__.py,sha256=Xr-Lt_qXMdrCnnOaU
|
|
34
35
|
model_compression_toolkit/core/common/graph/base_graph.py,sha256=lg5QaBkRbmvM3tGZ0Q34S3m0CbFql3LUv5BaXLe5TG8,37824
|
35
36
|
model_compression_toolkit/core/common/graph/base_node.py,sha256=Tv_whLIy-Da0DWZIycnvZ2cf2Qa1rCwpcH8kTkkhv2s,31415
|
36
37
|
model_compression_toolkit/core/common/graph/edge.py,sha256=buoSEUZwilWBK3WeBKpJ-GeDaUA1SDdOHxDpxU_bGpk,3784
|
37
|
-
model_compression_toolkit/core/common/graph/functional_node.py,sha256=
|
38
|
+
model_compression_toolkit/core/common/graph/functional_node.py,sha256=J804e0gK_cykxkUZDI0dAB3rZYkhlacORGSoVVVw4No,3962
|
38
39
|
model_compression_toolkit/core/common/graph/graph_matchers.py,sha256=CrDoHYq4iPaflgJWmoJ1K4ziLrRogJvFTVWg8P0UcDU,4744
|
39
40
|
model_compression_toolkit/core/common/graph/graph_searches.py,sha256=2oKuW6L8hP-oL0lFO9PhQFt9fEFgVJwpc1u4fHExAtE,5128
|
40
41
|
model_compression_toolkit/core/common/graph/virtual_activation_weights_node.py,sha256=3el-A7j1oyoo1_9zq3faQp7IeRsFXFCvnrb3zZFXpU0,9803
|
@@ -104,7 +105,7 @@ model_compression_toolkit/core/common/quantization/core_config.py,sha256=f0uSuY9
|
|
104
105
|
model_compression_toolkit/core/common/quantization/debug_config.py,sha256=8G8SpE_4rb8xBp8d6mMq8R_OnXJ_1oxB2g-Lxk9EJCM,1691
|
105
106
|
model_compression_toolkit/core/common/quantization/filter_nodes_candidates.py,sha256=fwF4VILaX-u3ZaFd81xjbJuhg8Ef-JX_KfMXW0TPV-I,7136
|
106
107
|
model_compression_toolkit/core/common/quantization/node_quantization_config.py,sha256=YycYN8_JMzvSR3pTVm5dT5x4zP3yBHn0Z9agnwrvOKI,26395
|
107
|
-
model_compression_toolkit/core/common/quantization/quantization_config.py,sha256=
|
108
|
+
model_compression_toolkit/core/common/quantization/quantization_config.py,sha256=7dDs9pq9dM9ADVeIi7wyMpW9ZbAI9GLujgxt7nxvnng,7105
|
108
109
|
model_compression_toolkit/core/common/quantization/quantization_fn_selection.py,sha256=eyosbVdnCwed7oMQ19tqnh0VoyGZ_UAuD_UnNoXyBpo,2210
|
109
110
|
model_compression_toolkit/core/common/quantization/quantization_params_fn_selection.py,sha256=MwIOBZ4BlZSTIOG75PDvlI3JmZ6t8YjPc1VP9Adei60,3847
|
110
111
|
model_compression_toolkit/core/common/quantization/quantize_graph_weights.py,sha256=N005MSvx8UypVpa7XrxNrB2G732n2wHj3RmLyjTgd3I,2728
|
@@ -155,7 +156,7 @@ model_compression_toolkit/core/keras/default_framework_info.py,sha256=HcHplb7Icn
|
|
155
156
|
model_compression_toolkit/core/keras/keras_implementation.py,sha256=hzNC6wz1gtL2EqmRCMCQYl8AqIDJPu6rdOX6nvPgjCM,30193
|
156
157
|
model_compression_toolkit/core/keras/keras_model_validation.py,sha256=1wNV2clFdC9BzIELRLSO2uKf0xqjLqlkTJudwtCeaJk,1722
|
157
158
|
model_compression_toolkit/core/keras/keras_node_prior_info.py,sha256=HUmzEXDQ8LGX7uOYSRiLZ2TNbYxLX9J9IeAa6QYlifg,3927
|
158
|
-
model_compression_toolkit/core/keras/resource_utilization_data_facade.py,sha256=
|
159
|
+
model_compression_toolkit/core/keras/resource_utilization_data_facade.py,sha256=s56UIgiPipUQRNd2sd1xW6GFfYNMBmrocRCNtvpYLbY,4977
|
159
160
|
model_compression_toolkit/core/keras/tf_tensor_numpy.py,sha256=AJMPD_cAwf7nzTlLMf_Y1kofXkh_xm8Ji7J6yDpbAKc,2691
|
160
161
|
model_compression_toolkit/core/keras/back2framework/__init__.py,sha256=rhIiXg_nBgUZ-baE3M6SzCuQbcnq4iebY1jtJBvKHOM,808
|
161
162
|
model_compression_toolkit/core/keras/back2framework/factory_model_builder.py,sha256=UIQgOOdexycrSKombTMJVvTthR7MlrCihoqM8Kg-rnE,2293
|
@@ -217,7 +218,7 @@ model_compression_toolkit/core/pytorch/default_framework_info.py,sha256=r1XyzUFv
|
|
217
218
|
model_compression_toolkit/core/pytorch/pytorch_device_config.py,sha256=S25cuw10AW3SEN_fRAGRcG_I3wdvvQx1ehSJzPnn-UI,4404
|
218
219
|
model_compression_toolkit/core/pytorch/pytorch_implementation.py,sha256=xmcJyU-rkIDX1a_X9LILzf2Ko2z_4I4xnlHkezKH-2w,27669
|
219
220
|
model_compression_toolkit/core/pytorch/pytorch_node_prior_info.py,sha256=2LDQ7qupglHQ7o1Am7LWdfYVacfQnl-aW2N6l9det1w,3264
|
220
|
-
model_compression_toolkit/core/pytorch/resource_utilization_data_facade.py,sha256=
|
221
|
+
model_compression_toolkit/core/pytorch/resource_utilization_data_facade.py,sha256=xpKj99OZKT9NT0vKIl_cOe8d89d2gef1gKoNT6PFElE,4989
|
221
222
|
model_compression_toolkit/core/pytorch/utils.py,sha256=GE7T8q93I5C4As0iOias_dk9HpOvXM1N6---dJlyD60,3863
|
222
223
|
model_compression_toolkit/core/pytorch/back2framework/__init__.py,sha256=H_WixgN0elVWf3exgGYsi58imPoYDj5eYPeh6x4yfug,813
|
223
224
|
model_compression_toolkit/core/pytorch/back2framework/factory_model_builder.py,sha256=bwppTPRs6gL96nm7qPiKrNcBj4Krr0yEsOWjRF0aXmQ,2339
|
@@ -268,7 +269,7 @@ model_compression_toolkit/core/pytorch/reader/node_holders.py,sha256=7XNc7-l1MZP
|
|
268
269
|
model_compression_toolkit/core/pytorch/reader/reader.py,sha256=GEJE0QX8XJFWbYCkbRBtzttZtmmuoACLx8gw9KyAQCE,6015
|
269
270
|
model_compression_toolkit/core/pytorch/statistics_correction/__init__.py,sha256=Rf1RcYmelmdZmBV5qOKvKWF575ofc06JFQSq83Jz99A,696
|
270
271
|
model_compression_toolkit/core/pytorch/statistics_correction/apply_second_moment_correction.py,sha256=VgU24J3jf7QComHH7jonOXSkg6mO4TOch3uFkOthZvM,3261
|
271
|
-
model_compression_toolkit/data_generation/__init__.py,sha256=
|
272
|
+
model_compression_toolkit/data_generation/__init__.py,sha256=9xLN7VE3lnYVjoroYfJ24dxK_-kGEbMmMVeS1PPkPEY,1513
|
272
273
|
model_compression_toolkit/data_generation/common/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
273
274
|
model_compression_toolkit/data_generation/common/constants.py,sha256=21e3ZX9WVYojexG2acTgklrBk8ZO9DjJnKpP4KHZC44,1018
|
274
275
|
model_compression_toolkit/data_generation/common/data_generation.py,sha256=W8PeOcL1fBVB1WgXSCrEw-G7AWa6MNzjTqcFbmMhrGE,6687
|
@@ -281,7 +282,7 @@ model_compression_toolkit/data_generation/keras/__init__.py,sha256=lNJ29DYxaLUPD
|
|
281
282
|
model_compression_toolkit/data_generation/keras/constants.py,sha256=sxhhGHC-INBs1nVXhyokbFi9ob4jPkSRviuc83JRsgQ,1152
|
282
283
|
model_compression_toolkit/data_generation/keras/image_operations.py,sha256=OtJ5Yz8BZVOnGqyTHwlseRe4EmoLDYxz3bblGtw6HnY,6233
|
283
284
|
model_compression_toolkit/data_generation/keras/image_pipeline.py,sha256=E-HVverorhq33xzteuwUPtOrGDIYoEEs4fZJgiqOAzQ,7043
|
284
|
-
model_compression_toolkit/data_generation/keras/keras_data_generation.py,sha256=
|
285
|
+
model_compression_toolkit/data_generation/keras/keras_data_generation.py,sha256=udPoA_bRt1IP5uPSZpGX7oFAxoJN_6zcUNc4yTh0HJk,21457
|
285
286
|
model_compression_toolkit/data_generation/keras/model_info_exctractors.py,sha256=1E5xbn0P3py4EYjdpPD9JwGr4jlc3qe1ml1py0t40b8,8026
|
286
287
|
model_compression_toolkit/data_generation/keras/optimization_utils.py,sha256=cHv2tl-_9_D14mWqzNYtKFY8q7sJfW_V__dpZqzRvIo,20546
|
287
288
|
model_compression_toolkit/data_generation/keras/optimization_functions/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
@@ -297,7 +298,7 @@ model_compression_toolkit/data_generation/pytorch/image_operations.py,sha256=KUQ
|
|
297
298
|
model_compression_toolkit/data_generation/pytorch/image_pipeline.py,sha256=dcQr-67u9-ggGuS39YAvR7z-Y0NOdJintcVQ5vy1bM8,7478
|
298
299
|
model_compression_toolkit/data_generation/pytorch/model_info_exctractors.py,sha256=y6vMed6lQQj67-BXZKrAcWUNTkH8YjiUhknOV4wSpRA,9399
|
299
300
|
model_compression_toolkit/data_generation/pytorch/optimization_utils.py,sha256=vRMeUEdInPuJisiO-SKo_9miWZV90sz8GCg5MY0AqiU,18098
|
300
|
-
model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py,sha256=
|
301
|
+
model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py,sha256=cUkFg-9LWwRKy11tlASJwp1FbDx6a7sZWpJNMz01hWA,21626
|
301
302
|
model_compression_toolkit/data_generation/pytorch/optimization_functions/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
302
303
|
model_compression_toolkit/data_generation/pytorch/optimization_functions/batchnorm_alignment_functions.py,sha256=dMc4zz9XfYfAT4Cxns57VgvGZWPAMfaGlWLFyCyl8TA,1968
|
303
304
|
model_compression_toolkit/data_generation/pytorch/optimization_functions/bn_layer_weighting_functions.py,sha256=We0fVMQ4oU7Y0IWQ8fKy8KpqkIiLyKoQeF9XKAQ6TH0,3317
|
@@ -316,26 +317,26 @@ model_compression_toolkit/exporter/model_exporter/keras/export_serialization_for
|
|
316
317
|
model_compression_toolkit/exporter/model_exporter/keras/fakely_quant_keras_exporter.py,sha256=n_iXPwMomMVJTZH9M1WV7OJo11ppXOWkANu41fIlsjY,11702
|
317
318
|
model_compression_toolkit/exporter/model_exporter/keras/fakely_quant_tflite_exporter.py,sha256=XoFGkVBikKh1BuxObrMLjfVLDIgy3X0rhmEl08CdJls,3727
|
318
319
|
model_compression_toolkit/exporter/model_exporter/keras/int8_tflite_exporter.py,sha256=iTUXaia8XLJmmWdk4iiCah9sxeIyBJy42s9_EpuPhnw,8261
|
319
|
-
model_compression_toolkit/exporter/model_exporter/keras/keras_export_facade.py,sha256=
|
320
|
+
model_compression_toolkit/exporter/model_exporter/keras/keras_export_facade.py,sha256=NzcX7rxLk__Kpuim_VXaOHS4tyiRtRBoERPE00GbdfA,5862
|
320
321
|
model_compression_toolkit/exporter/model_exporter/keras/mctq_keras_exporter.py,sha256=qXXkv3X_wb7t622EOHwXIxfGLGaDqh0T0y4UxREi4Bo,1976
|
321
322
|
model_compression_toolkit/exporter/model_exporter/pytorch/__init__.py,sha256=uZ2RigbY9O2PJ0Il8wPpS_s7frgg9WUGd_SHeKGyl1A,699
|
322
323
|
model_compression_toolkit/exporter/model_exporter/pytorch/base_pytorch_exporter.py,sha256=UPVkEUQCMZ4Lld6CRnEOPEmlfe5vcQZG0Q3FwRBodD4,4021
|
323
324
|
model_compression_toolkit/exporter/model_exporter/pytorch/export_serialization_format.py,sha256=bPevy6OBqng41PqytBR55e6cBEuyrUS0H8dWX4zgjQ4,967
|
324
|
-
model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_onnx_pytorch_exporter.py,sha256=
|
325
|
+
model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_onnx_pytorch_exporter.py,sha256=647EM7a_at-bGB81ES_6qBjValMnRF5-1TP7Uz6kWQg,6692
|
325
326
|
model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_torchscript_pytorch_exporter.py,sha256=ksWV2A-Njo-wAxQ_Ye2sLIZXBWJ_WNyjT7-qFFwvV2o,2897
|
326
|
-
model_compression_toolkit/exporter/model_exporter/pytorch/pytorch_export_facade.py,sha256=
|
327
|
+
model_compression_toolkit/exporter/model_exporter/pytorch/pytorch_export_facade.py,sha256=8vYGKa58BkasvoHejYaPwubOJPcW0s-RY79_Kkw0Hy8,6236
|
327
328
|
model_compression_toolkit/exporter/model_wrapper/__init__.py,sha256=7CF2zvpTrIEm8qnbuHnLZyTZkwBBxV24V8QA0oxGbh0,1187
|
328
329
|
model_compression_toolkit/exporter/model_wrapper/fw_agnostic/__init__.py,sha256=pKAdbTCFM_2BrZXUtTIw0ouKotrWwUDF_hP3rPwCM2k,696
|
329
330
|
model_compression_toolkit/exporter/model_wrapper/fw_agnostic/get_inferable_quantizers.py,sha256=Bd3QhAR__YC9Xmobd5qHv9ofh_rPn_eTFV0sXizcBnY,2297
|
330
331
|
model_compression_toolkit/exporter/model_wrapper/keras/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
331
|
-
model_compression_toolkit/exporter/model_wrapper/keras/validate_layer.py,sha256=
|
332
|
+
model_compression_toolkit/exporter/model_wrapper/keras/validate_layer.py,sha256=SvSGpU0IEUcy6zwChtPm_9lOSNXf4bPN0pwqvVZToik,3929
|
332
333
|
model_compression_toolkit/exporter/model_wrapper/keras/builder/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
333
|
-
model_compression_toolkit/exporter/model_wrapper/keras/builder/fully_quantized_model_builder.py,sha256=
|
334
|
+
model_compression_toolkit/exporter/model_wrapper/keras/builder/fully_quantized_model_builder.py,sha256=Ov28M0uJ_xZdvl9gk39psoqnBiv9i2irScKUNrEaGug,5536
|
334
335
|
model_compression_toolkit/exporter/model_wrapper/keras/builder/node_to_quantizer.py,sha256=uL6tJWC4s2IWUy8GJVwtMWpwZZioRRztfKyPJHo14xI,9442
|
335
336
|
model_compression_toolkit/exporter/model_wrapper/pytorch/__init__.py,sha256=Rf1RcYmelmdZmBV5qOKvKWF575ofc06JFQSq83Jz99A,696
|
336
|
-
model_compression_toolkit/exporter/model_wrapper/pytorch/validate_layer.py,sha256=
|
337
|
+
model_compression_toolkit/exporter/model_wrapper/pytorch/validate_layer.py,sha256=vQUGbCi8_pGoN8DwQ0IblSeN6L9t6Cr0reZNuCbBpkM,3469
|
337
338
|
model_compression_toolkit/exporter/model_wrapper/pytorch/builder/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
338
|
-
model_compression_toolkit/exporter/model_wrapper/pytorch/builder/fully_quantized_model_builder.py,sha256=
|
339
|
+
model_compression_toolkit/exporter/model_wrapper/pytorch/builder/fully_quantized_model_builder.py,sha256=qlPYvgpIEfvwxjjkxUB-lwsGOs7GA5eWoY5xznq7tFg,5395
|
339
340
|
model_compression_toolkit/exporter/model_wrapper/pytorch/builder/node_to_quantizer.py,sha256=4sN5z-6BXrTE5Dp2FX_jKO9ty5iZ2r4RM7XvXtDVLSI,9348
|
340
341
|
model_compression_toolkit/gptq/__init__.py,sha256=YKg-tMj9D4Yd0xW9VRD5EN1J5JrmlRbNEF2fOSgodqA,1228
|
341
342
|
model_compression_toolkit/gptq/runner.py,sha256=La12JTYjWyJW0YW4Al4TP1_Xi4JWBCEKw6FR_JQsxe0,5982
|
@@ -350,9 +351,9 @@ model_compression_toolkit/gptq/keras/gptq_keras_implementation.py,sha256=axBwnCS
|
|
350
351
|
model_compression_toolkit/gptq/keras/gptq_loss.py,sha256=rbRkF15MYd6nq4G49kcjb_dPTa-XNq9cTkrb93mXawo,6241
|
351
352
|
model_compression_toolkit/gptq/keras/gptq_training.py,sha256=NXTNsVrO9DTh0uvc8V7rFaM0fYg2OA18ZrYd-cKZ7Z4,19159
|
352
353
|
model_compression_toolkit/gptq/keras/graph_info.py,sha256=MKIfrRTRH3zCuxCR1g9ZVIFyuSSr0e0sDybqh4LDM7E,4672
|
353
|
-
model_compression_toolkit/gptq/keras/quantization_facade.py,sha256=
|
354
|
+
model_compression_toolkit/gptq/keras/quantization_facade.py,sha256=t4Jxtu8qyGbIftI5l2sb79Ydd85XM6GyDpkCqiotVF8,15711
|
354
355
|
model_compression_toolkit/gptq/keras/quantizer/__init__.py,sha256=-DK1CDXvlsnEbki4lukZLpl6Xrbo91_jcqxXlG5Eg6Q,963
|
355
|
-
model_compression_toolkit/gptq/keras/quantizer/base_keras_gptq_quantizer.py,sha256=
|
356
|
+
model_compression_toolkit/gptq/keras/quantizer/base_keras_gptq_quantizer.py,sha256=Rbl9urzkmACvVxICSEyJ02qFOBxWK0UQWtysFJzBVZw,4899
|
356
357
|
model_compression_toolkit/gptq/keras/quantizer/quant_utils.py,sha256=Vt7Qb8i4JsE4sFtcjpfM4FTXTtfV1t6SwfoNH8a_Iaw,5055
|
357
358
|
model_compression_toolkit/gptq/keras/quantizer/quantization_builder.py,sha256=FmK5cPwgLAzrDjHTWf_vbRO5s70S7iwpnjnlqEQTuGE,4408
|
358
359
|
model_compression_toolkit/gptq/keras/quantizer/regularization_factory.py,sha256=guf7ygnLsZeWnTDz4yJdE2iTkd1oE0uQAZwKnGV3OAk,1957
|
@@ -367,9 +368,9 @@ model_compression_toolkit/gptq/pytorch/gptq_loss.py,sha256=kDuWw-6zh17wZpYWh4Xa9
|
|
367
368
|
model_compression_toolkit/gptq/pytorch/gptq_pytorch_implementation.py,sha256=tECPTavxn8EEwgLaP2zvxdJH6Vg9jC0YOIMJ7857Sdc,1268
|
368
369
|
model_compression_toolkit/gptq/pytorch/gptq_training.py,sha256=-daninmlPGfKsBNPB2C3gT6rK0G5YeyJsuOLA0JlfBU,16633
|
369
370
|
model_compression_toolkit/gptq/pytorch/graph_info.py,sha256=4mVM-VvnBaA64ACVdOe6wTGHdMSa2UTLIUe7nACLcdo,4008
|
370
|
-
model_compression_toolkit/gptq/pytorch/quantization_facade.py,sha256=
|
371
|
+
model_compression_toolkit/gptq/pytorch/quantization_facade.py,sha256=TMus5LYJnTngLKot7coVax8gsIzPDYVU9m6orFPvWSY,13949
|
371
372
|
model_compression_toolkit/gptq/pytorch/quantizer/__init__.py,sha256=ZHNHo1yzye44m9_ht4UUZfTpK01RiVR3Tr74-vtnOGI,968
|
372
|
-
model_compression_toolkit/gptq/pytorch/quantizer/base_pytorch_gptq_quantizer.py,sha256=
|
373
|
+
model_compression_toolkit/gptq/pytorch/quantizer/base_pytorch_gptq_quantizer.py,sha256=fKg-PNOhGBiL-4eySS9Fyw0GkA76Pq8jT_HbJuJ8iZU,4143
|
373
374
|
model_compression_toolkit/gptq/pytorch/quantizer/quant_utils.py,sha256=OocYYRqvl7rZ37QT0hTzfJnWGiNCPskg7cziTlR7TRk,3893
|
374
375
|
model_compression_toolkit/gptq/pytorch/quantizer/quantization_builder.py,sha256=uT9N_aBj965hvQfKd67fS1B0SXGnOLVcqa3wW4b2iZE,4566
|
375
376
|
model_compression_toolkit/gptq/pytorch/quantizer/regularization_factory.py,sha256=mDWZERLwtDzqWeJUwHMVyGdlS8wPLjJ3NvZiKBP6BNA,1959
|
@@ -381,22 +382,22 @@ model_compression_toolkit/gptq/pytorch/quantizer/ste_rounding/__init__.py,sha256
|
|
381
382
|
model_compression_toolkit/gptq/pytorch/quantizer/ste_rounding/symmetric_ste.py,sha256=6uxq_w62jn8DDOt9T7VtA6jZ8jTAPcbTufKFOYpVUm4,8768
|
382
383
|
model_compression_toolkit/pruning/__init__.py,sha256=lQMZS8G0pvR1LVi53nnJHNXgLNTan_MWMdwsVxhjrow,1106
|
383
384
|
model_compression_toolkit/pruning/keras/__init__.py,sha256=3Lkr37Exk9u8811hw8hVqkGcbTQGcLjd3LLuLC3fa_E,698
|
384
|
-
model_compression_toolkit/pruning/keras/pruning_facade.py,sha256=
|
385
|
+
model_compression_toolkit/pruning/keras/pruning_facade.py,sha256=0XmUqYMrCOXfNJac-k-baegBY7G0Tg3V2HOwGknUubI,8867
|
385
386
|
model_compression_toolkit/pruning/pytorch/__init__.py,sha256=pKAdbTCFM_2BrZXUtTIw0ouKotrWwUDF_hP3rPwCM2k,696
|
386
|
-
model_compression_toolkit/pruning/pytorch/pruning_facade.py,sha256=
|
387
|
+
model_compression_toolkit/pruning/pytorch/pruning_facade.py,sha256=oStXze__7XCm0RJ_N8iRGWhMKo4JQQYSNEUq_pOVUZI,9546
|
387
388
|
model_compression_toolkit/ptq/__init__.py,sha256=Z_hkmTh7aLFei1DJKV0oNVUbrv_Q_0CTw-qD85Xf8UM,904
|
388
389
|
model_compression_toolkit/ptq/runner.py,sha256=_c1dSjlPPpsx59Vbg1buhG9bZq__OORz1VlPkwjJzoc,2552
|
389
390
|
model_compression_toolkit/ptq/keras/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
390
|
-
model_compression_toolkit/ptq/keras/quantization_facade.py,sha256=
|
391
|
+
model_compression_toolkit/ptq/keras/quantization_facade.py,sha256=DAAJPd6pKLgiwoJT-_u2dvVOO4Ox6IgJgfiUbnNRBwQ,10968
|
391
392
|
model_compression_toolkit/ptq/pytorch/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
392
|
-
model_compression_toolkit/ptq/pytorch/quantization_facade.py,sha256=
|
393
|
+
model_compression_toolkit/ptq/pytorch/quantization_facade.py,sha256=xHVTrm9Fyk_j4j8G1Pb97qacN_gn9cGYpsT1HXdTc1A,9305
|
393
394
|
model_compression_toolkit/qat/__init__.py,sha256=kj2qsZh_Ca7PncsHKcaL5EVT2H8g4hYtvaQ3KFxOkwE,1143
|
394
395
|
model_compression_toolkit/qat/common/__init__.py,sha256=6tLZ4R4pYP6QVztLVQC_jik2nES3l4uhML0qUxZrezk,829
|
395
396
|
model_compression_toolkit/qat/common/qat_config.py,sha256=zoq0Vb74vCY7WlWD8JH_KPrHDoUHSvMc3gcO53u7L2U,3394
|
396
397
|
model_compression_toolkit/qat/keras/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
397
|
-
model_compression_toolkit/qat/keras/quantization_facade.py,sha256=
|
398
|
+
model_compression_toolkit/qat/keras/quantization_facade.py,sha256=i5uRwOWLxsAcLGFAdTGEe-nLaCdcDYz6ojfhByRtIJg,17270
|
398
399
|
model_compression_toolkit/qat/keras/quantizer/__init__.py,sha256=zmYyCa25_KLCSUCGUDRslh3RCIjcRMxc_oXa54Aui-4,996
|
399
|
-
model_compression_toolkit/qat/keras/quantizer/base_keras_qat_quantizer.py,sha256=
|
400
|
+
model_compression_toolkit/qat/keras/quantizer/base_keras_qat_quantizer.py,sha256=hoY3AETaLSRP7YfecZ32tyUUj-X_DHRWkV8nALYeRlY,2202
|
400
401
|
model_compression_toolkit/qat/keras/quantizer/quant_utils.py,sha256=cBULOgWUodcBO1lHevZggdTevuDYI6tQceV86U2x6DA,2543
|
401
402
|
model_compression_toolkit/qat/keras/quantizer/quantization_builder.py,sha256=HD0JIOiqnrpqj5qk6RyzuCsSGZsDUVohdCYSePmJBNQ,5872
|
402
403
|
model_compression_toolkit/qat/keras/quantizer/lsq/__init__.py,sha256=lNJ29DYxaLUPDstRDA1PGI5r9Fulq_hvrZMlhst1Z5g,697
|
@@ -406,9 +407,9 @@ model_compression_toolkit/qat/keras/quantizer/ste_rounding/__init__.py,sha256=cc
|
|
406
407
|
model_compression_toolkit/qat/keras/quantizer/ste_rounding/symmetric_ste.py,sha256=I4KlaGv17k71IyjuSG9M0OlXlD5P0pfvKa6oCyRQ5FE,13517
|
407
408
|
model_compression_toolkit/qat/keras/quantizer/ste_rounding/uniform_ste.py,sha256=EED6LfqhX_OhDRJ9e4GwbpgNC9vq7hoXyJS2VPvG2qc,10789
|
408
409
|
model_compression_toolkit/qat/pytorch/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
409
|
-
model_compression_toolkit/qat/pytorch/quantization_facade.py,sha256=
|
410
|
+
model_compression_toolkit/qat/pytorch/quantization_facade.py,sha256=1eg0jMgFzRLYIFnG9GJnJ8U3W4IOM-4Z27s9Wq-JeOQ,13452
|
410
411
|
model_compression_toolkit/qat/pytorch/quantizer/__init__.py,sha256=xYa4C8pr9cG1f3mQQcBXO_u3IdJN-zl7leZxuXDs86w,1003
|
411
|
-
model_compression_toolkit/qat/pytorch/quantizer/base_pytorch_qat_quantizer.py,sha256=
|
412
|
+
model_compression_toolkit/qat/pytorch/quantizer/base_pytorch_qat_quantizer.py,sha256=WQSrtoWmRhyJnABrO6lwUtJruwLFZjBzLxbYh3banYI,2213
|
412
413
|
model_compression_toolkit/qat/pytorch/quantizer/quantization_builder.py,sha256=sFWGu76PZ9dSRf3L0uZI6YwLIs0biBND1tl76I1piBQ,5721
|
413
414
|
model_compression_toolkit/qat/pytorch/quantizer/quantizer_utils.py,sha256=nO7IrDRo5b9Asf21WJacE4vf5voD3UzF_oGjBoGusD4,5335
|
414
415
|
model_compression_toolkit/qat/pytorch/quantizer/lsq/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
@@ -437,50 +438,50 @@ model_compression_toolkit/target_platform_capabilities/target_platform/targetpla
|
|
437
438
|
model_compression_toolkit/target_platform_capabilities/tpc_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
438
439
|
model_compression_toolkit/target_platform_capabilities/tpc_models/get_target_platform_capabilities.py,sha256=CWind2Kd91lzBTRAh1A9sHuNw17xXhMb3gV436RpK8c,3033
|
439
440
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/__init__.py,sha256=lNJ29DYxaLUPDstRDA1PGI5r9Fulq_hvrZMlhst1Z5g,697
|
440
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/target_platform_capabilities.py,sha256=
|
441
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/latest/__init__.py,sha256=
|
441
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/target_platform_capabilities.py,sha256=yIWwvfTpiT0wRf7GwPgK9elKbGh46jxCrkcLVEjvesU,6081
|
442
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/latest/__init__.py,sha256=eVIRpx5O0JQI7TSdw5JAWtwrG3MQ8-7hYThQvB9da5c,1528
|
442
443
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/__init__.py,sha256=1mMOREEMoNHu_KTMGDp4crN61opKWX6aFn1DrDLvqcc,717
|
443
444
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tp_model.py,sha256=6mbv-fNVz559j5XCSX5e8aENUJACYuJzQcZBLPh12gU,11057
|
444
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_keras.py,sha256=
|
445
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_keras.py,sha256=Ffsr6g_E_3GzrmZ2PKl2D4bC0Czo0OtQPxlGHg1fdew,6490
|
445
446
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_pytorch.py,sha256=iCBfBmIRozoeGVPC3MjZpVyp-Nx4fC94_PKILC82K-Y,5731
|
446
447
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/__init__.py,sha256=vFDyiMymNZSRCdTgAyWn4A-tZD3vzze_PTLBSF2OYe8,721
|
447
448
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tp_model.py,sha256=bx5lPJCsC5KsIg4noYycWTvbZwyPOepHDpkS6MLnX7E,10793
|
448
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_keras.py,sha256=
|
449
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_keras.py,sha256=Ucan5bShJPGzxEI2r8aG1ArRS2cIdc5FF6KluRVDjtI,6499
|
449
450
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_pytorch.py,sha256=09fbd5vEnSQDWfCkMRtYZYy7kIYiWkXDcH_dT1cAmoY,5739
|
450
451
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/__init__.py,sha256=NUuczImqUxzdfflqSdqkeAN8aCU6Tuiu6U0Fnj9Tzmw,721
|
451
452
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tp_model.py,sha256=ypbOiVR0ZVHw78g6z9YIoPH0BZut6mPzqgrl6EOpIDI,10543
|
452
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_keras.py,sha256=
|
453
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_keras.py,sha256=XyMjVY9APnzqf1A-tzSy-OcNyhoIQsAQKxOiUCx5DFE,6511
|
453
454
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_pytorch.py,sha256=X853xDEF-3rcPoqxbrlYN28vvW3buSdM36c_eN_LKx8,5758
|
454
455
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/__init__.py,sha256=vKWAoQ2KkhuptS5HZB50zHG6KY8wHpHTxPugw_nGCRo,717
|
455
456
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tp_model.py,sha256=NI-QPOmg7YqPCQg8X5P1doP_mFIZ2kXm8NxcvzAg7aA,11132
|
456
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tpc_keras.py,sha256=
|
457
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tpc_keras.py,sha256=J2lkRjmb-BXXpaHZ_OZDS9bbDKGY-Q1Inx_1asXElwo,6593
|
457
458
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tpc_pytorch.py,sha256=jAyTXhcChO124odtWC3bYKRH4ZyqLPkKQluJFOoyPIM,5726
|
458
459
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/__init__.py,sha256=wUk4Xsg7jpxOWYjq2K3WUwLcI185p_sVPK-ttG0ydhA,721
|
459
460
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tp_model.py,sha256=T8o20d-Kerr91l4RR09MFbqoTWAXgqjVUyW-nE43zDg,10865
|
460
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tpc_keras.py,sha256=
|
461
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tpc_keras.py,sha256=EgDKcY-ba9cBmQmh0-sv45GLm-HP6Cc4Rgf-KxZXTgM,6601
|
461
462
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tpc_pytorch.py,sha256=dFQjzFlLDwoUqKNP1at1fS1N1WJadSSasRyzHl6vaB8,5733
|
462
463
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/__init__.py,sha256=gAeebYCKyIXH9-Qwze7FwvTihudzAHk_Qsg94fQbkjQ,717
|
463
464
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tp_model.py,sha256=ChprWTT6hLoKBM7iTVhQWQZYAXM_XOMHaK8PC8GEu30,12018
|
464
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tpc_keras.py,sha256=
|
465
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tpc_keras.py,sha256=gMQ2qNm7T5FukkR_3DwVB1B41CMEW-KnrT-mPDMfCL8,6593
|
465
466
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tpc_pytorch.py,sha256=HRo0W5l4IJesr_np4ZhXoMk_xfdiV53LgamquQIryJA,5800
|
466
467
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/__init__.py,sha256=C2kwyDE1-rtukkbNSoKRv9q8Nt2GOCaBbl0BdOr3goA,721
|
467
468
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tp_model.py,sha256=YANvT38YiwO9jE3dC04wHDZBGJQ34hGTvKygHwwbI_U,11751
|
468
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tpc_keras.py,sha256=
|
469
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tpc_keras.py,sha256=XM6qBLIvzsmdFf-AZq5WOlORK2GXC_X-gulReNxHb9E,6601
|
469
470
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tpc_pytorch.py,sha256=nP05jqvh6uaj30a3W7zEkJfKtqfP0Nz5bobwRqbYrdM,5807
|
470
471
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/__init__.py,sha256=tHTUvsaerSfbe22pU0kIDauPpFD7Pq5EmZytVIDkHz4,717
|
471
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tp_model.py,sha256=
|
472
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_keras.py,sha256=
|
473
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_pytorch.py,sha256=
|
472
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tp_model.py,sha256=purcM7kLdh2HyJaxzROAoVSwz1Xlo6GPEe8JQKfMcuM,12911
|
473
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_keras.py,sha256=j57CrY5w4Bxpwx35yi3pYJtLyDgq3YOq_crTmSKarUY,6803
|
474
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_pytorch.py,sha256=DVBWc_97B0s9PHHPYRoT5FFYs8tcGY7LC3GU1TqP88c,5986
|
474
475
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
475
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/target_platform_capabilities.py,sha256=
|
476
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/latest/__init__.py,sha256=
|
476
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/target_platform_capabilities.py,sha256=is00rNrDmmirYsyMtMkWz0DwOA92-x7hAJwpd6z1n2E,2806
|
477
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/latest/__init__.py,sha256=CXC-HQolSDu7j8V-Xm-SWGCd74gXB3XnAkEhI_TVbIQ,1516
|
477
478
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/__init__.py,sha256=t4JKsPcor-7KSCKzIwuaBv0NLNwfhuewAQGlDl6iBeo,717
|
478
479
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tp_model.py,sha256=k1cYUXpVNAvuBVUinSZGu_wDZQvUGAp8e4x9xHBUAOE,8275
|
479
480
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tpc_keras.py,sha256=h_hePXCggG2qktLuoNAOE1XNtc0qEwMyky7om1c8eC8,4483
|
480
481
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tpc_pytorch.py,sha256=65WJPRCjliXEUL4AjZRxcyVS3y7KHTMDdkqy6D95kRw,3814
|
481
482
|
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/__init__.py,sha256=cco4TmeIDIh32nj9ZZXVkws4dd9F2UDrmjKzTN8G0V0,697
|
482
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/target_platform_capabilities.py,sha256=
|
483
|
-
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/latest/__init__.py,sha256=
|
483
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/target_platform_capabilities.py,sha256=_tf41m40fbax27y5A5JoGHw4p5NY-Kb3c8oxSTnRD_E,2802
|
484
|
+
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/latest/__init__.py,sha256=LIUUQn42YU7oD2YfnEgP0gfqm7Hq9e0fD_8418aKzKI,1511
|
484
485
|
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/__init__.py,sha256=t4JKsPcor-7KSCKzIwuaBv0NLNwfhuewAQGlDl6iBeo,717
|
485
486
|
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/tp_model.py,sha256=rxDkISGCxTB2RaVm59zJWxaJKxGgt4uceDgQ_9E_RmI,10033
|
486
487
|
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/tpc_keras.py,sha256=-4vNf2Q6c_rgaac19AFO8hG4ANaPfgNPf0kN44mL6TQ,6830
|
@@ -494,13 +495,13 @@ model_compression_toolkit/trainable_infrastructure/common/get_quantizers.py,sha2
|
|
494
495
|
model_compression_toolkit/trainable_infrastructure/common/quant_utils.py,sha256=zdiew1jwR7tUKm9XWlHnAPxIZsAdKqbzzC2vH02j5wA,1505
|
495
496
|
model_compression_toolkit/trainable_infrastructure/common/trainable_quantizer_config.py,sha256=My5Wz34jPOyh8z33OTpKnOobRB0cpO_Qgmtsd5lizHo,4791
|
496
497
|
model_compression_toolkit/trainable_infrastructure/keras/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
497
|
-
model_compression_toolkit/trainable_infrastructure/keras/base_keras_quantizer.py,sha256=
|
498
|
+
model_compression_toolkit/trainable_infrastructure/keras/base_keras_quantizer.py,sha256=9_6ztYvXOBB7_PNf1Syi5zPTwLi5xfbYiKd_UYJ6hwo,4113
|
498
499
|
model_compression_toolkit/trainable_infrastructure/keras/config_serialization.py,sha256=txdWXdZoHazg-3MDPb9P-oXRM92LRn2G_8woEplwKaI,4360
|
499
|
-
model_compression_toolkit/trainable_infrastructure/keras/load_model.py,sha256
|
500
|
-
model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py,sha256=
|
500
|
+
model_compression_toolkit/trainable_infrastructure/keras/load_model.py,sha256=DJHibcLo-UCuHV6UPLeVd7dKmPfkGXEiLqCCqvQrISM,3769
|
501
|
+
model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py,sha256=aBtXxCAbnqn4PUa3wP55M0W5gKIQVGppLtfgFQ48T6s,5585
|
501
502
|
model_compression_toolkit/trainable_infrastructure/keras/quantizer_utils.py,sha256=MVwXNymmFRB2NXIBx4e2mdJ1RfoHxRPYRgjb1MQP5kY,1797
|
502
503
|
model_compression_toolkit/trainable_infrastructure/pytorch/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
503
|
-
model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py,sha256=
|
504
|
+
model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py,sha256=hbE_KV3IrBl4XZPgat5gMM0j1Nkv6iwPXzYhonmXBAE,2902
|
504
505
|
model_compression_toolkit/xquant/__init__.py,sha256=vdmr8sQw3jIBLF9ck7qrskPoXzDKtksHWlMOkU1JUnQ,1003
|
505
506
|
model_compression_toolkit/xquant/common/__init__.py,sha256=ycb1Xt7PtixY2Uabr94JGSwBMcct66O8ZMVf3Qa3ud8,719
|
506
507
|
model_compression_toolkit/xquant/common/constants.py,sha256=k-9LOEv1n_m8dV4chX0dNOTWyhhF7S00E0lkUxtO84E,1592
|
@@ -515,20 +516,20 @@ model_compression_toolkit/xquant/common/tensorboard_utils.py,sha256=85ABGQGKPZzc
|
|
515
516
|
model_compression_toolkit/xquant/common/xquant_config.py,sha256=Qt56cra2tU1PeHlLx_Cqztf5q-ED8MPelhb8coSumFw,1675
|
516
517
|
model_compression_toolkit/xquant/keras/__init__.py,sha256=zbtceCVRsi-Gvl_pOmq5laqVqu55vAU1ie2FR2RK1Po,709
|
517
518
|
model_compression_toolkit/xquant/keras/dataset_utils.py,sha256=quvVymhvpcPIOneCu5J6K_QAqBHOCIj8IxZxSN2fItA,2258
|
518
|
-
model_compression_toolkit/xquant/keras/facade_xquant_report.py,sha256=
|
519
|
+
model_compression_toolkit/xquant/keras/facade_xquant_report.py,sha256=7pf3PUMAj7BCsbRc6Up6KOWk1g_9wVXwoGUbtrSgX7Y,3502
|
519
520
|
model_compression_toolkit/xquant/keras/keras_report_utils.py,sha256=zUvhqehKKRHEkk6y8g1xQH47b6fTMuPy6stGEZ6mI24,3081
|
520
521
|
model_compression_toolkit/xquant/keras/model_analyzer.py,sha256=WXi9BPI9_TzRWn50lM1i-6cwPPRW0p43Shg_xpHFclU,6521
|
521
522
|
model_compression_toolkit/xquant/keras/similarity_functions.py,sha256=P2qMJAo94Sz_BCao-bnhEeewKtjeLLDDH2r9luDXJ04,2710
|
522
523
|
model_compression_toolkit/xquant/keras/tensorboard_utils.py,sha256=635ZcK6_5jdpa7G6Tjq0hkveEYLJQyYRXCFCKL0EioM,9163
|
523
524
|
model_compression_toolkit/xquant/pytorch/__init__.py,sha256=ycb1Xt7PtixY2Uabr94JGSwBMcct66O8ZMVf3Qa3ud8,719
|
524
525
|
model_compression_toolkit/xquant/pytorch/dataset_utils.py,sha256=KFKiFkhIPpEr1ZH5jekZFrgs20VzzKVxSV9YMgH68yI,2894
|
525
|
-
model_compression_toolkit/xquant/pytorch/facade_xquant_report.py,sha256=
|
526
|
+
model_compression_toolkit/xquant/pytorch/facade_xquant_report.py,sha256=sr_7TkmkRE0FhdJ7BwXGLFELmR4l_nK7IlTys6oYgoU,3179
|
526
527
|
model_compression_toolkit/xquant/pytorch/model_analyzer.py,sha256=b93o800yVB3Z-ihJBLy5Cic-MQiUM_ZGV6SCXoNdscE,5549
|
527
528
|
model_compression_toolkit/xquant/pytorch/pytorch_report_utils.py,sha256=bOc-hFL3gdoSM1Th_S2N_-9JJSlPGpZCTx_QLJHS6lg,3388
|
528
529
|
model_compression_toolkit/xquant/pytorch/similarity_functions.py,sha256=CERxq5K8rqaiE-DlwhZBTUd9x69dtYJlkHOPLB54vm8,2354
|
529
530
|
model_compression_toolkit/xquant/pytorch/tensorboard_utils.py,sha256=yjghWXxqOtT-QXoXBOuJyh45yUpFI0pKjdDegum2i68,9705
|
530
|
-
mct_nightly-2.1.0.
|
531
|
-
mct_nightly-2.1.0.
|
532
|
-
mct_nightly-2.1.0.
|
533
|
-
mct_nightly-2.1.0.
|
534
|
-
mct_nightly-2.1.0.
|
531
|
+
mct_nightly-2.1.0.20240813.442.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
|
532
|
+
mct_nightly-2.1.0.20240813.442.dist-info/METADATA,sha256=BuAU5P_gzUVjd4HUhpx1TKL9kRd878YqLWwXvz8pglY,19718
|
533
|
+
mct_nightly-2.1.0.20240813.442.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
534
|
+
mct_nightly-2.1.0.20240813.442.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
|
535
|
+
mct_nightly-2.1.0.20240813.442.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.20240813.000442"
|
@@ -13,17 +13,10 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
15
|
|
16
|
-
import importlib
|
17
16
|
|
18
17
|
# Supported frameworks in MCT:
|
19
18
|
TENSORFLOW = 'tensorflow'
|
20
19
|
PYTORCH = 'pytorch'
|
21
|
-
FOUND_TF = importlib.util.find_spec(TENSORFLOW) is not None
|
22
|
-
FOUND_TORCH = importlib.util.find_spec("torch") is not None
|
23
|
-
FOUND_TORCHVISION = importlib.util.find_spec("torchvision") is not None
|
24
|
-
FOUND_ONNX = importlib.util.find_spec("onnx") is not None
|
25
|
-
FOUND_ONNXRUNTIME = importlib.util.find_spec("onnxruntime") is not None
|
26
|
-
FOUND_SONY_CUSTOM_LAYERS = importlib.util.find_spec('sony_custom_layers') is not None
|
27
20
|
|
28
21
|
# Metadata fields
|
29
22
|
MCT_VERSION = 'mct_version'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import Dict, Any, Tuple, Type, List, Union
|
2
2
|
|
3
|
-
from model_compression_toolkit.
|
3
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
4
4
|
from model_compression_toolkit.core.common.graph.base_node import BaseNode
|
5
5
|
import numpy as np
|
6
6
|
|
@@ -56,7 +56,7 @@ class QuantizationConfig:
|
|
56
56
|
weights_second_moment_correction: bool = False,
|
57
57
|
input_scaling: bool = False,
|
58
58
|
softmax_shift: bool = False,
|
59
|
-
shift_negative_activation_correction: bool =
|
59
|
+
shift_negative_activation_correction: bool = True,
|
60
60
|
activation_channel_equalization: bool = False,
|
61
61
|
z_threshold: float = math.inf,
|
62
62
|
min_threshold: float = MIN_THRESHOLD,
|
@@ -20,7 +20,7 @@ from model_compression_toolkit.logger import Logger
|
|
20
20
|
from model_compression_toolkit.constants import TENSORFLOW
|
21
21
|
from model_compression_toolkit.target_platform_capabilities.target_platform import TargetPlatformCapabilities
|
22
22
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization_data import compute_resource_utilization_data
|
23
|
-
from model_compression_toolkit.
|
23
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
24
24
|
|
25
25
|
if FOUND_TF:
|
26
26
|
from model_compression_toolkit.target_platform_capabilities.constants import DEFAULT_TP_MODEL
|
@@ -89,5 +89,6 @@ else:
|
|
89
89
|
# If tensorflow is not installed,
|
90
90
|
# we raise an exception when trying to use this function.
|
91
91
|
def keras_resource_utilization_data(*args, **kwargs):
|
92
|
-
Logger.critical("Tensorflow must be installed to use
|
93
|
-
"The 'tensorflow' package is
|
92
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
93
|
+
"keras_resource_utilization_data. The 'tensorflow' package is either not installed or is "
|
94
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
@@ -23,7 +23,7 @@ from model_compression_toolkit.core.common.framework_info import FrameworkInfo
|
|
23
23
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization_data import compute_resource_utilization_data
|
24
24
|
from model_compression_toolkit.core.common.quantization.core_config import CoreConfig
|
25
25
|
from model_compression_toolkit.core.common.mixed_precision.mixed_precision_quantization_config import MixedPrecisionQuantizationConfig
|
26
|
-
from model_compression_toolkit.
|
26
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
27
27
|
|
28
28
|
if FOUND_TORCH:
|
29
29
|
from model_compression_toolkit.core.pytorch.default_framework_info import DEFAULT_PYTORCH_INFO
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
15
|
|
16
|
-
from model_compression_toolkit.
|
16
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCHVISION, FOUND_TORCH, FOUND_TF
|
17
17
|
from model_compression_toolkit.data_generation.common.data_generation_config import DataGenerationConfig
|
18
18
|
from model_compression_toolkit.data_generation.common.enums import ImageGranularity, DataInitType, SchedulerType, BNLayerWeightingType, OutputLossType, BatchNormAlignemntLossType, ImagePipelineType, ImageNormalizationType
|
19
19
|
|
@@ -16,7 +16,7 @@ import time
|
|
16
16
|
from typing import Callable, Tuple, List, Dict, Union
|
17
17
|
from tqdm import tqdm
|
18
18
|
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
20
20
|
from model_compression_toolkit.data_generation.common.constants import DEFAULT_N_ITER, DEFAULT_DATA_GEN_BS
|
21
21
|
from model_compression_toolkit.data_generation.common.data_generation import get_data_generation_classes
|
22
22
|
from model_compression_toolkit.data_generation.common.image_pipeline import image_normalization_dict
|
@@ -349,8 +349,12 @@ if FOUND_TF:
|
|
349
349
|
else:
|
350
350
|
def get_keras_data_generation_config(*args, **kwargs):
|
351
351
|
Logger.critical(
|
352
|
-
"Tensorflow must be installed
|
352
|
+
"Tensorflow must be installed with a version of 2.15 or lower to use "
|
353
|
+
"get_tensorflow_data_generation_config. The 'tensorflow' package is missing or is installed with a "
|
354
|
+
"version higher than 2.15.") # pragma: no cover
|
353
355
|
|
354
356
|
|
355
357
|
def keras_data_generation_experimental(*args, **kwargs):
|
356
|
-
Logger.critical("Tensorflow must be installed
|
358
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
359
|
+
"tensorflow_data_generation_experimental. The 'tensorflow' package is missing or is installed "
|
360
|
+
"with a version higher than 2.15.") # pragma: no cover
|
@@ -17,7 +17,7 @@ from typing import Callable, Any, Tuple, List, Union
|
|
17
17
|
|
18
18
|
from tqdm import tqdm
|
19
19
|
|
20
|
-
from model_compression_toolkit.
|
20
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCHVISION, FOUND_TORCH
|
21
21
|
from model_compression_toolkit.core.pytorch.utils import set_model
|
22
22
|
from model_compression_toolkit.data_generation.common.constants import DEFAULT_N_ITER, DEFAULT_DATA_GEN_BS
|
23
23
|
from model_compression_toolkit.data_generation.common.data_generation import get_data_generation_classes
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# ==============================================================================
|
15
15
|
from typing import Callable, Dict
|
16
16
|
|
17
|
-
from model_compression_toolkit.
|
17
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
18
18
|
from model_compression_toolkit.exporter.model_exporter.fw_agonstic.quantization_format import QuantizationFormat
|
19
19
|
from model_compression_toolkit.logger import Logger
|
20
20
|
|
@@ -101,5 +101,6 @@ if FOUND_TF:
|
|
101
101
|
return exporter.get_custom_objects()
|
102
102
|
else:
|
103
103
|
def keras_export_model(*args, **kwargs):
|
104
|
-
Logger.critical("Tensorflow must be installed to use keras_export_model.
|
105
|
-
"The 'tensorflow' package is missing
|
104
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use keras_export_model."
|
105
|
+
"The 'tensorflow' package is missing or is installed "
|
106
|
+
"with a version higher than 2.15.") # pragma: no cover
|
model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_onnx_pytorch_exporter.py
CHANGED
@@ -18,7 +18,7 @@ from io import BytesIO
|
|
18
18
|
import torch.nn
|
19
19
|
|
20
20
|
from mct_quantizers import PytorchActivationQuantizationHolder, PytorchQuantizationWrapper
|
21
|
-
from model_compression_toolkit.
|
21
|
+
from model_compression_toolkit.verify_packages import FOUND_ONNX
|
22
22
|
from model_compression_toolkit.logger import Logger
|
23
23
|
from model_compression_toolkit.core.pytorch.utils import to_torch_tensor
|
24
24
|
from model_compression_toolkit.exporter.model_exporter.pytorch.base_pytorch_exporter import BasePyTorchExporter
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# ==============================================================================
|
15
15
|
from typing import Callable
|
16
16
|
|
17
|
-
from model_compression_toolkit.
|
17
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
18
18
|
from model_compression_toolkit.exporter.model_exporter.fw_agonstic.quantization_format import QuantizationFormat
|
19
19
|
from model_compression_toolkit.exporter.model_exporter.pytorch.export_serialization_format import \
|
20
20
|
PytorchExportSerializationFormat
|
model_compression_toolkit/exporter/model_wrapper/keras/builder/fully_quantized_model_builder.py
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
from typing import Tuple, Callable
|
17
17
|
from model_compression_toolkit.core import common
|
18
18
|
from model_compression_toolkit.core.common import Graph
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
20
20
|
from model_compression_toolkit.core.common.user_info import UserInformation
|
21
21
|
from model_compression_toolkit.logger import Logger
|
22
22
|
import model_compression_toolkit.core as C
|
@@ -101,5 +101,6 @@ if FOUND_TF:
|
|
101
101
|
return exportable_model, user_info
|
102
102
|
else:
|
103
103
|
def get_exportable_keras_model(*args, **kwargs): # pragma: no cover
|
104
|
-
Logger.critical("Tensorflow must be installed to use
|
105
|
-
"The 'tensorflow' package is missing
|
104
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
105
|
+
"get_exportable_keras_model. The 'tensorflow' package is missing or is installed with a "
|
106
|
+
"version higher than 2.15.") # pragma: no cover
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from typing import Any
|
16
16
|
|
17
17
|
from mct_quantizers import BaseInferableQuantizer, KerasActivationQuantizationHolder
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
19
19
|
from model_compression_toolkit.logger import Logger
|
20
20
|
|
21
21
|
if FOUND_TF:
|
@@ -76,5 +76,6 @@ if FOUND_TF:
|
|
76
76
|
return True
|
77
77
|
else:
|
78
78
|
def is_keras_layer_exportable(*args, **kwargs): # pragma: no cover
|
79
|
-
Logger.critical("Tensorflow must be installed to use
|
80
|
-
"The 'tensorflow' package is missing
|
79
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
80
|
+
"is_keras_layer_exportable. The 'tensorflow' package is missing or is installed with a "
|
81
|
+
"version higher than 2.15.") # pragma: no cover
|
model_compression_toolkit/exporter/model_wrapper/pytorch/builder/fully_quantized_model_builder.py
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
from typing import Union, Callable
|
17
17
|
from model_compression_toolkit.core import common
|
18
18
|
from model_compression_toolkit.core.common import Graph
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
20
20
|
from model_compression_toolkit.logger import Logger
|
21
21
|
from model_compression_toolkit.core.common import BaseNode
|
22
22
|
import model_compression_toolkit.core as C
|
@@ -15,8 +15,7 @@
|
|
15
15
|
from typing import Any
|
16
16
|
|
17
17
|
from model_compression_toolkit.logger import Logger
|
18
|
-
from model_compression_toolkit.
|
19
|
-
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
20
19
|
|
21
20
|
if FOUND_TORCH:
|
22
21
|
import torch.nn as nn
|
@@ -21,7 +21,8 @@ from model_compression_toolkit.core.common.quantization.quantize_graph_weights i
|
|
21
21
|
from model_compression_toolkit.core.common.visualization.tensorboard_writer import init_tensorboard_writer
|
22
22
|
from model_compression_toolkit.gptq.common.gptq_constants import REG_DEFAULT
|
23
23
|
from model_compression_toolkit.logger import Logger
|
24
|
-
from model_compression_toolkit.constants import TENSORFLOW,
|
24
|
+
from model_compression_toolkit.constants import TENSORFLOW, ACT_HESSIAN_DEFAULT_BATCH_SIZE
|
25
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
25
26
|
from model_compression_toolkit.core.common.user_info import UserInformation
|
26
27
|
from model_compression_toolkit.gptq.common.gptq_config import GradientPTQConfig, GPTQHessianScoresConfig
|
27
28
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
@@ -251,10 +252,12 @@ else:
|
|
251
252
|
# If tensorflow is not installed,
|
252
253
|
# we raise an exception when trying to use these functions.
|
253
254
|
def get_keras_gptq_config(*args, **kwargs):
|
254
|
-
Logger.critical("Tensorflow must be installed to use
|
255
|
-
"The 'tensorflow' package is missing
|
255
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
256
|
+
"get_keras_gptq_config. The 'tensorflow' package is missing or is "
|
257
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
256
258
|
|
257
259
|
|
258
260
|
def keras_gradient_post_training_quantization(*args, **kwargs):
|
259
|
-
Logger.critical("Tensorflow must be installed to use
|
260
|
-
"The 'tensorflow' package is missing
|
261
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
262
|
+
"keras_gradient_post_training_quantization. The 'tensorflow' package is missing or is "
|
263
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
@@ -16,7 +16,7 @@ from abc import abstractmethod
|
|
16
16
|
from typing import Union, Dict, List
|
17
17
|
|
18
18
|
from model_compression_toolkit.logger import Logger
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
20
20
|
from model_compression_toolkit.gptq.common.gptq_constants import WEIGHTS_QUANTIZATION_PARAMS
|
21
21
|
|
22
22
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, TrainableQuantizerActivationConfig
|
@@ -105,5 +105,6 @@ if FOUND_TF:
|
|
105
105
|
else:
|
106
106
|
class BaseKerasGPTQTrainableQuantizer: # pragma: no cover
|
107
107
|
def __init__(self, *args, **kwargs):
|
108
|
-
Logger.critical("Tensorflow must be installed to use
|
109
|
-
"The 'tensorflow' package is missing
|
108
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
109
|
+
"BaseKerasGPTQTrainableQuantizer. The 'tensorflow' package is missing or is "
|
110
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
@@ -16,7 +16,8 @@ import copy
|
|
16
16
|
|
17
17
|
from typing import Callable
|
18
18
|
from model_compression_toolkit.core import common
|
19
|
-
from model_compression_toolkit.constants import
|
19
|
+
from model_compression_toolkit.constants import ACT_HESSIAN_DEFAULT_BATCH_SIZE
|
20
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
20
21
|
from model_compression_toolkit.core.common.visualization.tensorboard_writer import init_tensorboard_writer
|
21
22
|
from model_compression_toolkit.gptq.common.gptq_constants import REG_DEFAULT
|
22
23
|
from model_compression_toolkit.logger import Logger
|
@@ -16,7 +16,7 @@ from abc import abstractmethod
|
|
16
16
|
from typing import Union, Dict
|
17
17
|
|
18
18
|
from model_compression_toolkit.logger import Logger
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
20
20
|
from model_compression_toolkit.gptq.common.gptq_constants import WEIGHTS_QUANTIZATION_PARAMS
|
21
21
|
|
22
22
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
@@ -16,7 +16,8 @@
|
|
16
16
|
from typing import Callable, Tuple
|
17
17
|
|
18
18
|
from model_compression_toolkit import get_target_platform_capabilities
|
19
|
-
from model_compression_toolkit.constants import TENSORFLOW
|
19
|
+
from model_compression_toolkit.constants import TENSORFLOW
|
20
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
20
21
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
21
22
|
from model_compression_toolkit.core.common.pruning.pruner import Pruner
|
22
23
|
from model_compression_toolkit.core.common.pruning.pruning_config import PruningConfig
|
@@ -149,5 +150,6 @@ else:
|
|
149
150
|
# If tensorflow is not installed,
|
150
151
|
# we raise an exception when trying to use these functions.
|
151
152
|
def keras_pruning_experimental(*args, **kwargs):
|
152
|
-
Logger.critical("Tensorflow must be installed to use
|
153
|
-
"The 'tensorflow' package is missing
|
153
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
154
|
+
"keras_pruning_experimental. The 'tensorflow' package is missing or is "
|
155
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
@@ -15,7 +15,8 @@
|
|
15
15
|
|
16
16
|
from typing import Callable, Tuple
|
17
17
|
from model_compression_toolkit import get_target_platform_capabilities
|
18
|
-
from model_compression_toolkit.constants import
|
18
|
+
from model_compression_toolkit.constants import PYTORCH
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
19
20
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
20
21
|
from model_compression_toolkit.core.common.pruning.pruner import Pruner
|
21
22
|
from model_compression_toolkit.core.common.pruning.pruning_config import PruningConfig
|
@@ -21,7 +21,8 @@ from model_compression_toolkit.core.analyzer import analyzer_model_quantization
|
|
21
21
|
from model_compression_toolkit.core.common.quantization.quantize_graph_weights import quantize_graph_weights
|
22
22
|
from model_compression_toolkit.core.common.visualization.tensorboard_writer import init_tensorboard_writer
|
23
23
|
from model_compression_toolkit.logger import Logger
|
24
|
-
from model_compression_toolkit.constants import TENSORFLOW
|
24
|
+
from model_compression_toolkit.constants import TENSORFLOW
|
25
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
25
26
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
26
27
|
from model_compression_toolkit.core.common.mixed_precision.mixed_precision_quantization_config import \
|
27
28
|
MixedPrecisionQuantizationConfig
|
@@ -178,5 +179,6 @@ else:
|
|
178
179
|
# If tensorflow is not installed,
|
179
180
|
# we raise an exception when trying to use these functions.
|
180
181
|
def keras_post_training_quantization(*args, **kwargs):
|
181
|
-
Logger.critical("Tensorflow must be installed to use
|
182
|
-
"The 'tensorflow' package is missing
|
182
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
183
|
+
"keras_post_training_quantization. The 'tensorflow' package is missing or is "
|
184
|
+
"installed with a version higher than 2.15.") # pragma: no cover
|
@@ -18,7 +18,8 @@ from typing import Callable
|
|
18
18
|
|
19
19
|
from model_compression_toolkit.core.common.visualization.tensorboard_writer import init_tensorboard_writer
|
20
20
|
from model_compression_toolkit.logger import Logger
|
21
|
-
from model_compression_toolkit.constants import PYTORCH
|
21
|
+
from model_compression_toolkit.constants import PYTORCH
|
22
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
22
23
|
from model_compression_toolkit.target_platform_capabilities.target_platform import TargetPlatformCapabilities
|
23
24
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
24
25
|
from model_compression_toolkit.core import CoreConfig
|
@@ -19,7 +19,7 @@ from functools import partial
|
|
19
19
|
from model_compression_toolkit.core import CoreConfig
|
20
20
|
from model_compression_toolkit.core.common.visualization.tensorboard_writer import init_tensorboard_writer
|
21
21
|
from model_compression_toolkit.logger import Logger
|
22
|
-
from model_compression_toolkit.
|
22
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
23
23
|
from model_compression_toolkit.core.common.mixed_precision.resource_utilization_tools.resource_utilization import ResourceUtilization
|
24
24
|
from model_compression_toolkit.core.common.mixed_precision.mixed_precision_quantization_config import \
|
25
25
|
MixedPrecisionQuantizationConfig
|
@@ -291,10 +291,12 @@ else:
|
|
291
291
|
# If tensorflow is not installed,
|
292
292
|
# we raise an exception when trying to use these functions.
|
293
293
|
def keras_quantization_aware_training_init_experimental(*args, **kwargs):
|
294
|
-
Logger.critical("Tensorflow must be installed to use
|
295
|
-
"The 'tensorflow' package is missing
|
294
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
295
|
+
"keras_quantization_aware_training_init_experimental. The 'tensorflow' package is missing "
|
296
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
296
297
|
|
297
298
|
|
298
299
|
def keras_quantization_aware_training_finalize_experimental(*args, **kwargs):
|
299
|
-
Logger.critical("Tensorflow must be installed to use
|
300
|
-
"The 'tensorflow' package is missing
|
300
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
301
|
+
"keras_quantization_aware_training_finalize_experimental. The 'tensorflow' package is missing "
|
302
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from typing import Union
|
16
16
|
|
17
17
|
from model_compression_toolkit.logger import Logger
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
19
19
|
|
20
20
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
21
21
|
TrainableQuantizerActivationConfig, BaseKerasTrainableQuantizer
|
@@ -44,5 +44,6 @@ else: # pragma: no cover
|
|
44
44
|
quantization_config: Union[TrainableQuantizerWeightsConfig, TrainableQuantizerActivationConfig]):
|
45
45
|
|
46
46
|
super().__init__(quantization_config)
|
47
|
-
Logger.critical("Tensorflow must be installed to use
|
48
|
-
"The 'tensorflow' package is missing
|
47
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
48
|
+
"BaseKerasQATTrainableQuantizer. The 'tensorflow' package is missing "
|
49
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -16,7 +16,8 @@ import copy
|
|
16
16
|
from typing import Callable
|
17
17
|
from functools import partial
|
18
18
|
|
19
|
-
from model_compression_toolkit.constants import
|
19
|
+
from model_compression_toolkit.constants import PYTORCH
|
20
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
20
21
|
|
21
22
|
from model_compression_toolkit.core import CoreConfig
|
22
23
|
from model_compression_toolkit.core import common
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from typing import Union
|
16
16
|
|
17
17
|
from model_compression_toolkit.logger import Logger
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
19
19
|
|
20
20
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
21
21
|
TrainableQuantizerActivationConfig
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/latest/__init__.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
from model_compression_toolkit.
|
15
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
16
16
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.imx500_tpc.v1.tp_model import get_tp_model, generate_tp_model, \
|
17
17
|
get_op_quantization_configs
|
18
18
|
if FOUND_TF:
|
@@ -14,7 +14,8 @@
|
|
14
14
|
# ==============================================================================
|
15
15
|
from model_compression_toolkit.logger import Logger
|
16
16
|
|
17
|
-
from model_compression_toolkit.constants import
|
17
|
+
from model_compression_toolkit.constants import TENSORFLOW, PYTORCH
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
18
19
|
from model_compression_toolkit.target_platform_capabilities.constants import LATEST
|
19
20
|
|
20
21
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_DEPTHWISE_KERNEL, \
|
21
21
|
KERAS_KERNEL, BIAS_ATTR, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_KERNEL, BIAS_ATTR, \
|
21
21
|
KERAS_DEPTHWISE_KERNEL, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_DEPTHWISE_KERNEL, \
|
21
21
|
KERAS_KERNEL, BIAS_ATTR, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_DEPTHWISE_KERNEL, \
|
21
21
|
KERAS_KERNEL, BIAS_ATTR, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v2_lut/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_KERNEL, BIAS_ATTR, \
|
21
21
|
KERAS_DEPTHWISE_KERNEL, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_DEPTHWISE_KERNEL, \
|
21
21
|
KERAS_KERNEL, BIAS_ATTR, BIAS
|
22
22
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v3_lut/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_KERNEL, BIAS_ATTR, \
|
21
21
|
KERAS_DEPTHWISE_KERNEL, BIAS
|
22
22
|
|
@@ -199,6 +199,7 @@ def generate_tp_model(default_config: OpQuantizationConfig,
|
|
199
199
|
default_qco.clone_and_edit(enable_activation_quantization=False,
|
200
200
|
supported_input_activation_n_bits=(8, 16))
|
201
201
|
.clone_and_edit_weight_attribute(enable_weights_quantization=False))
|
202
|
+
tp.OperatorsSet("Default16BitInout", const_configuration_options_inout16)
|
202
203
|
|
203
204
|
# Create Mixed-Precision quantization configuration options from the given list of OpQuantizationConfig objects
|
204
205
|
mixed_precision_configuration_options = tp.QuantizationConfigOptions(mixed_precision_cfg_list,
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_keras.py
CHANGED
@@ -16,7 +16,7 @@ import tensorflow as tf
|
|
16
16
|
from packaging import version
|
17
17
|
|
18
18
|
from model_compression_toolkit.defaultdict import DefaultDict
|
19
|
-
from model_compression_toolkit.
|
19
|
+
from model_compression_toolkit.verify_packages import FOUND_SONY_CUSTOM_LAYERS
|
20
20
|
from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_DEPTHWISE_KERNEL, \
|
21
21
|
KERAS_KERNEL, BIAS_ATTR, BIAS
|
22
22
|
|
@@ -26,11 +26,11 @@ if FOUND_SONY_CUSTOM_LAYERS:
|
|
26
26
|
if version.parse(tf.__version__) >= version.parse("2.13"):
|
27
27
|
from keras.src.layers import Conv2D, DepthwiseConv2D, Dense, Reshape, ZeroPadding2D, Dropout, \
|
28
28
|
MaxPooling2D, Activation, ReLU, Add, Subtract, Multiply, PReLU, Flatten, Cropping2D, LeakyReLU, Permute, \
|
29
|
-
Conv2DTranspose, Identity
|
29
|
+
Conv2DTranspose, Identity, Concatenate
|
30
30
|
else:
|
31
31
|
from keras.layers import Conv2D, DepthwiseConv2D, Dense, Reshape, ZeroPadding2D, Dropout, \
|
32
32
|
MaxPooling2D, Activation, ReLU, Add, Subtract, Multiply, PReLU, Flatten, Cropping2D, LeakyReLU, Permute, \
|
33
|
-
Conv2DTranspose, Identity
|
33
|
+
Conv2DTranspose, Identity, Concatenate
|
34
34
|
|
35
35
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.imx500_tpc.v4.tp_model import get_tp_model
|
36
36
|
import model_compression_toolkit as mct
|
@@ -93,6 +93,8 @@ def generate_keras_tpc(name: str, tp_model: tp.TargetPlatformModel):
|
|
93
93
|
|
94
94
|
with keras_tpc:
|
95
95
|
tp.OperationsSetToLayers("NoQuantization", no_quant_list)
|
96
|
+
tp.OperationsSetToLayers("Default16BitInout", [tf.stack,
|
97
|
+
tf.concat, Concatenate])
|
96
98
|
tp.OperationsSetToLayers("Conv",
|
97
99
|
[Conv2D,
|
98
100
|
DepthwiseConv2D,
|
model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v4/tpc_pytorch.py
CHANGED
@@ -85,6 +85,8 @@ def generate_pytorch_tpc(name: str, tp_model: tp.TargetPlatformModel):
|
|
85
85
|
topk,
|
86
86
|
squeeze,
|
87
87
|
MaxPool2d])
|
88
|
+
tp.OperationsSetToLayers("Default16BitInout",
|
89
|
+
[torch.stack, torch.cat, torch.concat, torch.concatenate])
|
88
90
|
|
89
91
|
tp.OperationsSetToLayers("Conv", [Conv2d, ConvTranspose2d],
|
90
92
|
attr_mapping=pytorch_linear_attr_mapping)
|
model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/latest/__init__.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
from model_compression_toolkit.
|
15
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
16
16
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.qnnpack_tpc.v1.tp_model import get_tp_model, generate_tp_model, get_op_quantization_configs
|
17
17
|
if FOUND_TF:
|
18
18
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.qnnpack_tpc.v1.tpc_keras import get_keras_tpc as get_keras_tpc_latest
|
@@ -13,7 +13,8 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
15
|
|
16
|
-
from model_compression_toolkit.constants import
|
16
|
+
from model_compression_toolkit.constants import TENSORFLOW, PYTORCH
|
17
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
17
18
|
from model_compression_toolkit.logger import Logger
|
18
19
|
from model_compression_toolkit.target_platform_capabilities.constants import LATEST
|
19
20
|
|
model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/latest/__init__.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
from model_compression_toolkit.
|
15
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
16
16
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.tflite_tpc.v1.tp_model import get_tp_model, generate_tp_model, get_op_quantization_configs
|
17
17
|
if FOUND_TF:
|
18
18
|
from model_compression_toolkit.target_platform_capabilities.tpc_models.tflite_tpc.v1.tpc_keras import get_keras_tpc as get_keras_tpc_latest
|
@@ -13,7 +13,8 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
15
|
|
16
|
-
from model_compression_toolkit.constants import
|
16
|
+
from model_compression_toolkit.constants import TENSORFLOW, PYTORCH
|
17
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH, FOUND_TF
|
17
18
|
from model_compression_toolkit.logger import Logger
|
18
19
|
from model_compression_toolkit.target_platform_capabilities.constants import LATEST
|
19
20
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from typing import Dict, Any, Union, List
|
16
16
|
|
17
17
|
from model_compression_toolkit.logger import Logger
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
19
19
|
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import VariableGroup
|
20
20
|
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import BaseTrainableQuantizer, VAR, GROUP
|
21
21
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
@@ -83,5 +83,6 @@ if FOUND_TF:
|
|
83
83
|
else:
|
84
84
|
class BaseKerasTrainableQuantizer(BaseTrainableQuantizer):
|
85
85
|
def __init__(self, *args, **kwargs):
|
86
|
-
Logger.critical("Tensorflow must be installed to use
|
87
|
-
"The 'tensorflow' package is missing
|
86
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
87
|
+
"BaseKerasTrainableQuantizer. The 'tensorflow' package is missing "
|
88
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -17,7 +17,7 @@ from typing import Any
|
|
17
17
|
import mct_quantizers
|
18
18
|
from mct_quantizers.common.get_all_subclasses import get_all_subclasses
|
19
19
|
|
20
|
-
from model_compression_toolkit.
|
20
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
21
21
|
from model_compression_toolkit.logger import Logger
|
22
22
|
|
23
23
|
if FOUND_TF:
|
@@ -72,5 +72,6 @@ else:
|
|
72
72
|
Returns: A keras Model
|
73
73
|
|
74
74
|
"""
|
75
|
-
Logger.critical("Tensorflow must be installed to use
|
76
|
-
"The 'tensorflow' package is missing
|
75
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
76
|
+
"keras_load_quantized_model. The 'tensorflow' package is missing "
|
77
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# ==============================================================================
|
15
15
|
from typing import Dict
|
16
16
|
|
17
|
-
from model_compression_toolkit.
|
17
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
18
18
|
from model_compression_toolkit.logger import Logger
|
19
19
|
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import BaseTrainableQuantizer
|
20
20
|
|
@@ -110,5 +110,6 @@ else:
|
|
110
110
|
layer: A keras layer.
|
111
111
|
weights_quantizers: A dictionary between a weight's name to its quantizer.
|
112
112
|
"""
|
113
|
-
Logger.critical("Tensorflow must be installed to use
|
114
|
-
"The 'tensorflow' package is missing
|
113
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
114
|
+
"KerasTrainableQuantizationWrapper. The 'tensorflow' package is missing "
|
115
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from typing import Union, List
|
16
16
|
|
17
17
|
from model_compression_toolkit.logger import Logger
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
19
19
|
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import VariableGroup
|
20
20
|
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import BaseTrainableQuantizer, VAR, GROUP
|
21
21
|
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Copyright 2024 Sony Semiconductor Israel, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
# ==============================================================================
|
15
|
+
|
16
|
+
import importlib
|
17
|
+
from packaging import version
|
18
|
+
|
19
|
+
from model_compression_toolkit.constants import TENSORFLOW
|
20
|
+
|
21
|
+
FOUND_TF = importlib.util.find_spec(TENSORFLOW) is not None
|
22
|
+
|
23
|
+
if FOUND_TF:
|
24
|
+
import tensorflow as tf
|
25
|
+
# MCT doesn't support TensorFlow version 2.16 or higher
|
26
|
+
if version.parse(tf.__version__) >= version.parse("2.16"):
|
27
|
+
FOUND_TF = False
|
28
|
+
|
29
|
+
FOUND_TORCH = importlib.util.find_spec("torch") is not None
|
30
|
+
FOUND_TORCHVISION = importlib.util.find_spec("torchvision") is not None
|
31
|
+
FOUND_ONNX = importlib.util.find_spec("onnx") is not None
|
32
|
+
FOUND_ONNXRUNTIME = importlib.util.find_spec("onnxruntime") is not None
|
33
|
+
FOUND_SONY_CUSTOM_LAYERS = importlib.util.find_spec('sony_custom_layers') is not None
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
from typing import Callable, Dict, Any
|
17
17
|
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TF
|
19
19
|
from model_compression_toolkit.xquant.common.core_report_generator import core_report_generator
|
20
20
|
from model_compression_toolkit.xquant import XQuantConfig
|
21
21
|
from model_compression_toolkit.logger import Logger
|
@@ -61,5 +61,6 @@ if FOUND_TF:
|
|
61
61
|
return _collected_data
|
62
62
|
else:
|
63
63
|
def xquant_report_keras_experimental(*args, **kwargs):
|
64
|
-
Logger.critical("Tensorflow must be installed to use
|
65
|
-
|
64
|
+
Logger.critical("Tensorflow must be installed with a version of 2.15 or lower to use "
|
65
|
+
"xquant_report_keras_experimental. The 'tensorflow' package is missing "
|
66
|
+
"or is installed with a version higher than 2.15.") # pragma: no cover
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
from typing import Callable
|
17
17
|
|
18
|
-
from model_compression_toolkit.
|
18
|
+
from model_compression_toolkit.verify_packages import FOUND_TORCH
|
19
19
|
from model_compression_toolkit.xquant.common.core_report_generator import core_report_generator
|
20
20
|
from model_compression_toolkit.xquant import XQuantConfig
|
21
21
|
from model_compression_toolkit.logger import Logger
|
{mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/LICENSE.md
RENAMED
File without changes
|
File without changes
|
{mct_nightly-2.1.0.20240812.432.dist-info → mct_nightly-2.1.0.20240813.442.dist-info}/top_level.txt
RENAMED
File without changes
|