mct-nightly 1.10.0.20231017.post414__tar.gz → 1.10.0.20231019.post424__tar.gz
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-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/PKG-INFO +1 -1
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/mct_nightly.egg-info/PKG-INFO +1 -1
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/mct_nightly.egg-info/SOURCES.txt +7 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/framework_implementation.py +0 -12
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/hessian/hessian_info_service.py +17 -1
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/constants.py +7 -0
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/core/keras/graph_substitutions/substitutions/dwconv_to_conv.py +127 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/keras_implementation.py +3 -17
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/pytorch_implementation.py +0 -15
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/common/qat_config.py +4 -1
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/__init__.py +2 -0
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/keras/quantizer/lsq/symmetric_lsq.py +254 -0
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/keras/quantizer/lsq/uniform_lsq.py +250 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/quant_utils.py +17 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/__init__.py +3 -1
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/pytorch/quantizer/lsq/symmetric_lsq.py +228 -0
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/pytorch/quantizer/lsq/uniform_lsq.py +223 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/quantizer_utils.py +17 -4
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/__init__.py +14 -0
- mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/trainable_infrastructure/pytorch/__init__.py +14 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/setup.cfg +1 -1
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/LICENSE.md +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/README.md +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/mct_nightly.egg-info/dependency_links.txt +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/mct_nightly.egg-info/requires.txt +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/mct_nightly.egg-info/top_level.txt +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/analyzer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/back2framework/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/back2framework/base_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/base_substitutions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/base_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/histogram_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/mean_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/min_max_per_channel_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/statistics_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/collectors/statistics_collector_generator.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/data_loader.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/defaultdict.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/framework_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/fusion/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/fusion/layer_fusing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/base_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/base_node.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/edge.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/functional_node.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/graph_matchers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/graph_searches.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/bipartite_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/compute_graph_max_cut.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/cut.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/max_cut_astar.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/memory_element.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/memory_graph/memory_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/graph/virtual_activation_weights_node.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/hessian/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/hessian/hessian_info_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/hessian/trace_hessian_calculator.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/hessian/trace_hessian_request.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/base_graph_filter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/base_matcher.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/edge_matcher.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/function.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/node_matcher.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/matchers/walk_matcher.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/memory_computation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/bit_width_setter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/configurable_quant_id.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/configurable_quantizer_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/distance_weighting.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi_aggregation_methods.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi_data.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi_functions_mapping.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi_methods.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/mixed_precision_quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/search_methods/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/search_methods/linear_programming.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/sensitivity_evaluation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/set_layer_to_bitwidth.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/mixed_precision/solution_refinement_procedure.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/model_builder_mode.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/model_collector.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/model_validation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/network_editors/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/network_editors/actions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/network_editors/edit_network.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/network_editors/node_filters.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/node_prior_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/candidate_node_quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/core_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/debug_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/filter_nodes_candidates.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/node_quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_analyzer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_fn_selection.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_fn_selection.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/error_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/kmeans_params.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/lut_kmeans_params.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/outlier_filter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/power_of_two_selection.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/qparams_activations_computation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/qparams_computation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/qparams_search.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/qparams_weights_computation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/symmetric_selection.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantization_params_generation/uniform_selection.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantize_graph_weights.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantize_node.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantizers/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantizers/kmeans_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantizers/lut_kmeans_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantizers/quantizers_helpers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/quantizers/uniform_quantizers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/quantization/set_node_quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/similarity_analyzer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/statistics_correction/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/statistics_correction/apply_bias_correction_to_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/statistics_correction/apply_second_moment_correction_to_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/statistics_correction/compute_bias_correction_of_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/statistics_correction/statistics_correction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/apply_substitutions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/batchnorm_folding.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/batchnorm_reconstruction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/batchnorm_refusing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/linear_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/linear_collapsing_substitution.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/residual_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/scale_equalization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/shift_negative_activation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/softmax_shift.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/virtual_activation_weights_composition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/substitutions/weights_activation_split.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/user_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/visualization/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/visualization/final_config_visualizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/visualization/nn_visualizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/common/visualization/tensorboard_writer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/graph_prep_runner.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/factory_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/float_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/instance_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/keras_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/mixed_precision_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/back2framework/quantized_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/custom_layer_validation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/default_framework_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/activation_decomposition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_folding.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_reconstruction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_refusing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/input_scaling.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/linear_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/multi_head_attention_decomposition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/relu_bound_to_power_of_2.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/remove_relu_upper_bound.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/residual_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/scale_equalization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/separableconv_decomposition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/shift_negative_activation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/softmax_shift.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/virtual_activation_weights_composition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/graph_substitutions/substitutions/weights_activation_split.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/hessian/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/hessian/activation_trace_hessian_calculator_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/hessian/trace_hessian_calculator_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/hessian/weights_trace_hessian_calculator_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/keras_model_validation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/keras_node_prior_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/kpi_data_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/mixed_precision/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/mixed_precision/configurable_activation_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/mixed_precision/configurable_weights_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/quantizer/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/quantizer/base_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/quantizer/fake_quant_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/quantizer/lut_fake_quant.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/common.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/connectivity_handler.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/nested_model/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/nested_model/edges_merger.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/nested_model/nested_model_handler.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/nested_model/nodes_merger.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/nested_model/outputs_merger.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/node_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/reader/reader.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/statistics_correction/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/statistics_correction/apply_second_moment_correction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/tf_tensor_numpy.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/keras/visualization/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/factory_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/float_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/instance_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/mixed_precision_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/pytorch_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/quantization_wrapper/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/quantization_wrapper/quantized_layer_wrapper.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/quantization_wrapper/wrapper_quantize_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/back2framework/quantized_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/default_framework_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/batchnorm_folding.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/batchnorm_reconstruction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/batchnorm_refusing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/const_holder_conv.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/linear_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/multi_head_attention_decomposition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/permute_call_method.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/relu_bound_to_power_of_2.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/reshape_with_static_shapes.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/residual_collapsing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/scale_equalization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/shift_negative_activation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/softmax_shift.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/virtual_activation_weights_composition.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/graph_substitutions/substitutions/weights_activation_split.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/hessian/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/hessian/activation_trace_hessian_calculator_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/hessian/pytorch_model_gradients.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/hessian/trace_hessian_calculator_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/hessian/weights_trace_hessian_calculator_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/kpi_data_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/mixed_precision/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/mixed_precision/configurable_activation_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/mixed_precision/configurable_weights_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/pytorch_node_prior_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/quantizer/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/quantizer/fake_quant_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/quantizer/lut_fake_quant.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/reader/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/reader/graph_builders.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/reader/node_holders.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/reader/reader.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/statistics_correction/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/statistics_correction/apply_second_moment_correction.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/pytorch/utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/core/runner.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/data_generation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/data_generation_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/enums.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/image_pipeline.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/model_info_exctractors.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/common/optimization_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/image_pipeline.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/keras_data_generation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/model_info_exctractors.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/batchnorm_alignment_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/bn_layer_weighting_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/image_initilization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/output_loss_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_functions/scheduler_step_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/keras/optimization_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/image_pipeline.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/model_info_exctractors.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/batchnorm_alignment_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/bn_layer_weighting_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/image_initilization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/output_loss_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_functions/scheduler_step_functions.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/optimization_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/fw_agonstic/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/fw_agonstic/exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/base_keras_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/export_serialization_format.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/fakely_quant_keras_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/fakely_quant_tflite_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/int8_tflite_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/keras/keras_export_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/base_pytorch_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/export_serialization_format.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_onnx_pytorch_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/fakely_quant_torchscript_pytorch_exporter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_exporter/pytorch/pytorch_export_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/builder/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/builder/fully_quantized_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/builder/node_to_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/builder/node_to_quantizers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/keras/validate_layer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/builder/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/builder/fully_quantized_model_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/builder/node_to_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/builder/node_to_quantizers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/exporter/model_wrapper/pytorch/validate_layer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/gptq_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/gptq_constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/gptq_framework_implementation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/gptq_graph.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/common/gptq_training.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/gptq_keras_implementation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/gptq_loss.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/gptq_training.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/graph_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/base_keras_gptq_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/quant_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/quantization_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/regularization_factory.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/soft_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/soft_rounding/soft_quantizer_reg.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/soft_rounding/symmetric_soft_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/soft_rounding/uniform_soft_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/ste_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/keras/quantizer/ste_rounding/symmetric_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/gptq_loss.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/gptq_pytorch_implementation.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/gptq_training.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/graph_info.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/base_pytorch_gptq_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/quant_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/quantization_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/regularization_factory.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/soft_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/soft_rounding/soft_quantizer_reg.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/soft_rounding/symmetric_soft_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/soft_rounding/uniform_soft_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/ste_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/pytorch/quantizer/ste_rounding/symmetric_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/gptq/runner.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/legacy/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/legacy/keras_quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/legacy/pytorch_quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/logger.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/keras/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/pytorch/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/ptq/runner.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/common/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/base_keras_qat_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc → mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/keras/quantizer/lsq}/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/quantization_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/ste_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/ste_rounding/symmetric_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/keras/quantizer/ste_rounding/uniform_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantization_facade.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/base_pytorch_qat_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414/model_compression_toolkit/trainable_infrastructure/common → mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/qat/pytorch/quantizer/lsq}/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/quantization_builder.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/symmetric_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/uniform_ste.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/immutable.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/current_tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/fusing.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/op_quantization_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/operators.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/quantization_format.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/target_platform_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/target_platform_model_component.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/attribute_filter.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/current_tpc.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/layer_filter_params.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/operations_to_layers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/target_platform_capabilities.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/target_platform/targetplatform2framework/target_platform_capabilities_component.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/get_target_platform_capabilities.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/latest/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/target_platform_capabilities.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_lut/tpc_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1_pot/tpc_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/latest/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/target_platform_capabilities.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tpc_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/qnnpack_tpc/v1/tpc_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/latest/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/target_platform_capabilities.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/tp_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/tpc_keras.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/target_platform_capabilities/tpc_models/tflite_tpc/v1/tpc_pytorch.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414/model_compression_toolkit/trainable_infrastructure/keras → mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/trainable_infrastructure/common}/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/base_trainable_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/constants.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/get_quantizer_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/get_quantizers.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/quant_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/common/trainable_quantizer_config.py +0 -0
- {mct-nightly-1.10.0.20231017.post414/model_compression_toolkit/trainable_infrastructure/pytorch → mct-nightly-1.10.0.20231019.post424/model_compression_toolkit/trainable_infrastructure/keras}/__init__.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/keras/base_keras_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/keras/config_serialization.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/keras/load_model.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/keras/quantizer_utils.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py +0 -0
- {mct-nightly-1.10.0.20231017.post414 → mct-nightly-1.10.0.20231019.post424}/setup.py +0 -0
|
@@ -163,6 +163,7 @@ model_compression_toolkit/core/keras/graph_substitutions/substitutions/activatio
|
|
|
163
163
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_folding.py
|
|
164
164
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_reconstruction.py
|
|
165
165
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/batchnorm_refusing.py
|
|
166
|
+
model_compression_toolkit/core/keras/graph_substitutions/substitutions/dwconv_to_conv.py
|
|
166
167
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/input_scaling.py
|
|
167
168
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/linear_collapsing.py
|
|
168
169
|
model_compression_toolkit/core/keras/graph_substitutions/substitutions/multi_head_attention_decomposition.py
|
|
@@ -373,6 +374,9 @@ model_compression_toolkit/qat/keras/quantizer/__init__.py
|
|
|
373
374
|
model_compression_toolkit/qat/keras/quantizer/base_keras_qat_quantizer.py
|
|
374
375
|
model_compression_toolkit/qat/keras/quantizer/quant_utils.py
|
|
375
376
|
model_compression_toolkit/qat/keras/quantizer/quantization_builder.py
|
|
377
|
+
model_compression_toolkit/qat/keras/quantizer/lsq/__init__.py
|
|
378
|
+
model_compression_toolkit/qat/keras/quantizer/lsq/symmetric_lsq.py
|
|
379
|
+
model_compression_toolkit/qat/keras/quantizer/lsq/uniform_lsq.py
|
|
376
380
|
model_compression_toolkit/qat/keras/quantizer/ste_rounding/__init__.py
|
|
377
381
|
model_compression_toolkit/qat/keras/quantizer/ste_rounding/symmetric_ste.py
|
|
378
382
|
model_compression_toolkit/qat/keras/quantizer/ste_rounding/uniform_ste.py
|
|
@@ -382,6 +386,9 @@ model_compression_toolkit/qat/pytorch/quantizer/__init__.py
|
|
|
382
386
|
model_compression_toolkit/qat/pytorch/quantizer/base_pytorch_qat_quantizer.py
|
|
383
387
|
model_compression_toolkit/qat/pytorch/quantizer/quantization_builder.py
|
|
384
388
|
model_compression_toolkit/qat/pytorch/quantizer/quantizer_utils.py
|
|
389
|
+
model_compression_toolkit/qat/pytorch/quantizer/lsq/__init__.py
|
|
390
|
+
model_compression_toolkit/qat/pytorch/quantizer/lsq/symmetric_lsq.py
|
|
391
|
+
model_compression_toolkit/qat/pytorch/quantizer/lsq/uniform_lsq.py
|
|
385
392
|
model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/__init__.py
|
|
386
393
|
model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/symmetric_ste.py
|
|
387
394
|
model_compression_toolkit/qat/pytorch/quantizer/ste_rounding/uniform_ste.py
|
|
@@ -67,18 +67,6 @@ class FrameworkImplementation(ABC):
|
|
|
67
67
|
raise NotImplemented(f'{self.__class__.__name__} have to implement the '
|
|
68
68
|
f'framework\'s get_trace_hessian_calculator method.') # pragma: no cover
|
|
69
69
|
|
|
70
|
-
@abstractmethod
|
|
71
|
-
def sample_single_representative_dataset(self, representative_dataset: Callable):
|
|
72
|
-
"""
|
|
73
|
-
Get a single sample (namely, batch size of 1) from a representative dataset.
|
|
74
|
-
|
|
75
|
-
Args:
|
|
76
|
-
representative_dataset: Callable which returns the representative dataset at any batch size.
|
|
77
|
-
|
|
78
|
-
Returns: List of inputs from representative_dataset where each sample has a batch size of 1.
|
|
79
|
-
"""
|
|
80
|
-
raise NotImplemented(f'{self.__class__.__name__} have to implement the '
|
|
81
|
-
f'framework\'s sample_single_representative_dataset method.') # pragma: no cover
|
|
82
70
|
|
|
83
71
|
@abstractmethod
|
|
84
72
|
def to_numpy(self, tensor: Any) -> np.ndarray:
|
|
@@ -54,7 +54,7 @@ class HessianInfoService:
|
|
|
54
54
|
self.graph = graph
|
|
55
55
|
|
|
56
56
|
# Create a representative_data_gen with batch size of 1
|
|
57
|
-
self.representative_dataset = partial(
|
|
57
|
+
self.representative_dataset = partial(self._sample_single_representative_dataset,
|
|
58
58
|
representative_dataset=representative_dataset)
|
|
59
59
|
|
|
60
60
|
self.fw_impl = fw_impl
|
|
@@ -62,6 +62,22 @@ class HessianInfoService:
|
|
|
62
62
|
|
|
63
63
|
self.trace_hessian_request_to_score_list = {}
|
|
64
64
|
|
|
65
|
+
def _sample_single_representative_dataset(self, representative_dataset: Callable):
|
|
66
|
+
"""
|
|
67
|
+
Get a single sample (namely, batch size of 1) from a representative dataset.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
representative_dataset: Callable which returns the representative dataset at any batch size.
|
|
71
|
+
|
|
72
|
+
Returns: List of inputs from representative_dataset where each sample has a batch size of 1.
|
|
73
|
+
"""
|
|
74
|
+
images = next(representative_dataset())
|
|
75
|
+
if not isinstance(images, list):
|
|
76
|
+
Logger.error(f'Images expected to be a list but is of type {type(images)}')
|
|
77
|
+
|
|
78
|
+
# Ensure each image is a single sample, if not, take the first sample
|
|
79
|
+
return [image[0:1, ...] if image.shape[0] != 1 else image for image in images]
|
|
80
|
+
|
|
65
81
|
def _clear_saved_hessian_info(self):
|
|
66
82
|
"""Clears the saved info approximations."""
|
|
67
83
|
self.trace_hessian_request_to_score_list={}
|
|
@@ -53,6 +53,13 @@ DIMS = 'dims'
|
|
|
53
53
|
TARGET_SHAPE = 'target_shape'
|
|
54
54
|
TRANSPOSE_A = 'transpose_a'
|
|
55
55
|
TRANSPOSE_B = 'transpose_b'
|
|
56
|
+
DEPTH_MULTIPLIER = 'depth_multiplier'
|
|
57
|
+
DEPTHWISE_INITIALIZER = 'depthwise_initializer'
|
|
58
|
+
DEPTHWISE_REGULARIZER = 'depthwise_regularizer'
|
|
59
|
+
DEPTHWISE_CONSTRAINT = 'depthwise_constraint'
|
|
60
|
+
KERNEL_INITIALIZER = 'kernel_initializer'
|
|
61
|
+
KERNEL_REGULARIZER = 'kernel_regularizer'
|
|
62
|
+
KERNEL_CONSTRAINT = 'kernel_constraint'
|
|
56
63
|
|
|
57
64
|
# functional nodes attributes
|
|
58
65
|
FUNCTION = 'function'
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Copyright 2023 Sony Semiconductors 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 numpy as np
|
|
17
|
+
import tensorflow as tf
|
|
18
|
+
from packaging import version
|
|
19
|
+
if version.parse(tf.__version__) >= version.parse("2.13"):
|
|
20
|
+
from keras.src.layers.core import TFOpLambda
|
|
21
|
+
from keras.src.layers import Dense, Conv2D, Softmax, Concatenate, Reshape, Permute, DepthwiseConv2D
|
|
22
|
+
else:
|
|
23
|
+
from keras.layers.core import TFOpLambda
|
|
24
|
+
from keras.layers import Dense, Conv2D, Softmax, Concatenate, Reshape, Permute, DepthwiseConv2D
|
|
25
|
+
from model_compression_toolkit.core import common
|
|
26
|
+
from model_compression_toolkit.core.common.graph.base_graph import Graph, BaseNode, OutTensor
|
|
27
|
+
from model_compression_toolkit.core.common.graph.functional_node import FunctionalNode
|
|
28
|
+
from model_compression_toolkit.core.common.graph.graph_matchers import NodeOperationMatcher
|
|
29
|
+
from model_compression_toolkit.constants import REUSE, REUSE_GROUP
|
|
30
|
+
from model_compression_toolkit.core.keras.reader.node_builder import REUSED_IDENTIFIER
|
|
31
|
+
from model_compression_toolkit.core.keras.constants import KERNEL, BIAS, USE_BIAS, NUM_HEADS, KEY_DIM, VALUE_DIM, \
|
|
32
|
+
QUERY_SHAPE, KEY_SHAPE, VALUE_SHAPE, OUTPUT_SHAPE, ATTENTION_AXES, ACTIVATION, GROUPS, LINEAR, FILTERS, PADDING, \
|
|
33
|
+
FUNCTION, DIMS, TARGET_SHAPE, F_STRIDED_SLICE, F_STACK, Q_KERNEL, Q_BIAS, K_KERNEL, K_BIAS, V_KERNEL, V_BIAS, \
|
|
34
|
+
OUTPUT_KERNEL, OUTPUT_BIAS, F_MATMUL, TRANSPOSE_B, KERNEL_SIZE, AXIS, F_STRIDED_SLICE_BEGIN, F_STRIDED_SLICE_END, \
|
|
35
|
+
DEPTH_MULTIPLIER, DEPTHWISE_INITIALIZER, DEPTHWISE_REGULARIZER, DEPTHWISE_CONSTRAINT, KERNEL_INITIALIZER, \
|
|
36
|
+
KERNEL_REGULARIZER, KERNEL_CONSTRAINT
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DwconvToConv(common.BaseSubstitution):
|
|
40
|
+
"""
|
|
41
|
+
A substitution class for replacing DepthwiseConv2D layers with Conv2D layers having 'groups' equal to the number of
|
|
42
|
+
input channels.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self):
|
|
46
|
+
"""
|
|
47
|
+
Initializes the DwconvToConv substitution
|
|
48
|
+
"""
|
|
49
|
+
super().__init__(matcher_instance=NodeOperationMatcher(DepthwiseConv2D))
|
|
50
|
+
|
|
51
|
+
@staticmethod
|
|
52
|
+
def _get_weight_by_name(node, w_str):
|
|
53
|
+
"""
|
|
54
|
+
Retrieve the weight with a given name from the node.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
node: The node containing weights.
|
|
58
|
+
w_str: The name of the weight to retrieve.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
The weight with the specified name or None if not found.
|
|
62
|
+
"""
|
|
63
|
+
w = [k for k in node.weights.keys() if w_str in k]
|
|
64
|
+
return node.weights[w[0]]
|
|
65
|
+
|
|
66
|
+
def substitute(self,
|
|
67
|
+
graph: Graph,
|
|
68
|
+
dwconv_node: BaseNode) -> Graph:
|
|
69
|
+
"""
|
|
70
|
+
Replace a DepthwiseConv2D layer with a Conv2D layer, setting 'groups' parameter to the number of input channels.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
graph: The graph on which the substitution is applied.
|
|
74
|
+
dwconv_node: The DepthwiseConv2D node to be replaced.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
The modified graph after applying the substitution.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
# Skip in case mult depth_multiplier=1
|
|
81
|
+
if dwconv_node.framework_attr[DEPTH_MULTIPLIER] == 1:
|
|
82
|
+
return graph
|
|
83
|
+
|
|
84
|
+
# Build the new node
|
|
85
|
+
k = self._get_weight_by_name(dwconv_node, KERNEL).copy()
|
|
86
|
+
k_shape = k.shape
|
|
87
|
+
filters = k_shape[2] * k_shape[3] # k_shape[2] * k_shape[3] = number of output channels
|
|
88
|
+
|
|
89
|
+
# Transform the DepthwiseConv2D kernel to match the Conv2D kernel, where each input channel is convolved with
|
|
90
|
+
# 'depth_multiplier' filters.
|
|
91
|
+
k = np.reshape(k,[k_shape[0], k_shape[1], 1, filters])
|
|
92
|
+
_reuse_params = {REUSE: dwconv_node.reuse, REUSE_GROUP: dwconv_node.reuse_group}
|
|
93
|
+
|
|
94
|
+
conv_fw_attr = dwconv_node.framework_attr
|
|
95
|
+
conv_fw_attr.update({FILTERS: filters,
|
|
96
|
+
GROUPS: k_shape[2],
|
|
97
|
+
KERNEL_INITIALIZER: dwconv_node.framework_attr[DEPTHWISE_INITIALIZER],
|
|
98
|
+
KERNEL_REGULARIZER: dwconv_node.framework_attr[DEPTHWISE_REGULARIZER],
|
|
99
|
+
KERNEL_CONSTRAINT: dwconv_node.framework_attr[DEPTHWISE_CONSTRAINT]})
|
|
100
|
+
|
|
101
|
+
conv_fw_attr.pop(DEPTH_MULTIPLIER)
|
|
102
|
+
conv_fw_attr.pop(DEPTHWISE_INITIALIZER)
|
|
103
|
+
conv_fw_attr.pop(DEPTHWISE_REGULARIZER)
|
|
104
|
+
conv_fw_attr.pop(DEPTHWISE_CONSTRAINT)
|
|
105
|
+
|
|
106
|
+
conv_weights = {KERNEL: k}
|
|
107
|
+
if conv_fw_attr[USE_BIAS]:
|
|
108
|
+
b = self._get_weight_by_name(dwconv_node, BIAS).copy()
|
|
109
|
+
conv_weights.update({BIAS: b})
|
|
110
|
+
|
|
111
|
+
conv_node = BaseNode(dwconv_node.name, conv_fw_attr, dwconv_node.input_shape, dwconv_node.output_shape,
|
|
112
|
+
conv_weights, Conv2D,
|
|
113
|
+
**_reuse_params)
|
|
114
|
+
|
|
115
|
+
graph.add_node(conv_node)
|
|
116
|
+
|
|
117
|
+
# Replace DWconv node with Conv node
|
|
118
|
+
_in_edge = list(graph.in_edges(dwconv_node))[0]
|
|
119
|
+
_out_edges = graph.out_edges(dwconv_node)
|
|
120
|
+
graph.add_edge(_in_edge[0], conv_node, **graph.get_edge_data(*_in_edge, 0))
|
|
121
|
+
graph.remove_edge(_in_edge[0], dwconv_node)
|
|
122
|
+
graph.reconnect_out_edges(current_node=dwconv_node, new_node=conv_node)
|
|
123
|
+
|
|
124
|
+
# Finally, remove the DWconv node
|
|
125
|
+
graph.remove_node(dwconv_node, new_graph_outputs=[OutTensor(conv_node, 0)])
|
|
126
|
+
|
|
127
|
+
return graph
|
|
@@ -91,6 +91,7 @@ from model_compression_toolkit.core.keras.graph_substitutions.substitutions.sepa
|
|
|
91
91
|
SeparableConvDecomposition, DEPTH_MULTIPLIER
|
|
92
92
|
from model_compression_toolkit.core.keras.graph_substitutions.substitutions.shift_negative_activation import \
|
|
93
93
|
keras_apply_shift_negative_correction
|
|
94
|
+
from model_compression_toolkit.core.keras.graph_substitutions.substitutions.dwconv_to_conv import DwconvToConv
|
|
94
95
|
from model_compression_toolkit.core.keras.keras_node_prior_info import create_node_prior_info
|
|
95
96
|
from model_compression_toolkit.core.keras.reader.reader import model_reader
|
|
96
97
|
from model_compression_toolkit.core.common.collectors.statistics_collector_generator import \
|
|
@@ -259,7 +260,8 @@ class KerasImplementation(FrameworkImplementation):
|
|
|
259
260
|
"""
|
|
260
261
|
return [SeparableConvDecomposition(),
|
|
261
262
|
MultiHeadAttentionDecomposition(),
|
|
262
|
-
ActivationDecomposition()
|
|
263
|
+
ActivationDecomposition(),
|
|
264
|
+
DwconvToConv()]
|
|
263
265
|
|
|
264
266
|
def get_substitutions_pre_statistics_collection(self, quant_config: QuantizationConfig) -> \
|
|
265
267
|
List[common.BaseSubstitution]:
|
|
@@ -591,19 +593,3 @@ class KerasImplementation(FrameworkImplementation):
|
|
|
591
593
|
"""
|
|
592
594
|
|
|
593
595
|
return model(inputs)
|
|
594
|
-
|
|
595
|
-
def sample_single_representative_dataset(self, representative_dataset: Callable):
|
|
596
|
-
"""
|
|
597
|
-
Get a single sample (namely, batch size of 1) from a representative dataset.
|
|
598
|
-
|
|
599
|
-
Args:
|
|
600
|
-
representative_dataset: Callable which returns the representative dataset at any batch size.
|
|
601
|
-
|
|
602
|
-
Returns: List of inputs from representative_dataset where each sample has a batch size of 1.
|
|
603
|
-
"""
|
|
604
|
-
images = next(representative_dataset())
|
|
605
|
-
if not isinstance(images, list):
|
|
606
|
-
Logger.error(f'Images expected to be a list but is of type {type(images)}')
|
|
607
|
-
|
|
608
|
-
# Ensure each image is a single sample, if not, take the first sample
|
|
609
|
-
return [tf.expand_dims(image[0], 0) if image.shape[0] != 1 else image for image in images]
|
|
@@ -540,18 +540,3 @@ class PytorchImplementation(FrameworkImplementation):
|
|
|
540
540
|
fw_impl=self,
|
|
541
541
|
num_iterations_for_approximation=num_iterations_for_approximation)
|
|
542
542
|
|
|
543
|
-
def sample_single_representative_dataset(self, representative_dataset: Callable):
|
|
544
|
-
"""
|
|
545
|
-
Get a single sample (namely, batch size of 1) from a representative dataset.
|
|
546
|
-
|
|
547
|
-
Args:
|
|
548
|
-
representative_dataset: Callable which returns the representative dataset at any batch size.
|
|
549
|
-
|
|
550
|
-
Returns: List of inputs from representative_dataset where each sample has a batch size of 1.
|
|
551
|
-
"""
|
|
552
|
-
images = next(representative_dataset())
|
|
553
|
-
if not isinstance(images, list):
|
|
554
|
-
Logger.error(f'Images expected to be a list but is of type {type(images)}')
|
|
555
|
-
|
|
556
|
-
# Ensure each image is a single sample, if not, take the first sample
|
|
557
|
-
return [torch.unsqueeze(image[0], 0) if image.shape[0] != 1 else image for image in images]
|
|
@@ -45,9 +45,12 @@ class TrainingMethod(Enum):
|
|
|
45
45
|
|
|
46
46
|
DQA - DNN Quantization with Attention. Includes a smooth quantization introduces by DQA method
|
|
47
47
|
|
|
48
|
+
LSQ - Learned Step size Quantization. Includes PowerOfTwo, symmetric & uniform quantizers: https://arxiv.org/pdf/1902.08153.pdf
|
|
49
|
+
|
|
48
50
|
"""
|
|
49
51
|
STE = "STE",
|
|
50
|
-
DQA = "DQA"
|
|
52
|
+
DQA = "DQA",
|
|
53
|
+
LSQ = "LSQ"
|
|
51
54
|
|
|
52
55
|
|
|
53
56
|
class QATConfig:
|
|
@@ -15,3 +15,5 @@
|
|
|
15
15
|
|
|
16
16
|
import model_compression_toolkit.qat.keras.quantizer.ste_rounding.symmetric_ste
|
|
17
17
|
import model_compression_toolkit.qat.keras.quantizer.ste_rounding.uniform_ste
|
|
18
|
+
import model_compression_toolkit.qat.keras.quantizer.lsq.symmetric_lsq
|
|
19
|
+
import model_compression_toolkit.qat.keras.quantizer.lsq.uniform_lsq
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Copyright 2023 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
|
+
from typing import Union
|
|
17
|
+
|
|
18
|
+
import numpy as np
|
|
19
|
+
import tensorflow as tf
|
|
20
|
+
from tensorflow.python.framework.tensor_shape import TensorShape
|
|
21
|
+
from model_compression_toolkit.constants import SIGNED
|
|
22
|
+
|
|
23
|
+
from model_compression_toolkit.qat import TrainingMethod
|
|
24
|
+
|
|
25
|
+
from model_compression_toolkit.target_platform_capabilities.target_platform import QuantizationMethod
|
|
26
|
+
from model_compression_toolkit.trainable_infrastructure import KerasTrainableQuantizationWrapper
|
|
27
|
+
from mct_quantizers import QuantizationTarget, mark_quantizer
|
|
28
|
+
from model_compression_toolkit.qat.common import THRESHOLD_TENSOR
|
|
29
|
+
from model_compression_toolkit import constants as C
|
|
30
|
+
|
|
31
|
+
from model_compression_toolkit.qat.keras.quantizer.base_keras_qat_quantizer import BaseKerasQATTrainableQuantizer
|
|
32
|
+
from model_compression_toolkit.trainable_infrastructure import TrainableQuantizerWeightsConfig, \
|
|
33
|
+
TrainableQuantizerActivationConfig
|
|
34
|
+
from mct_quantizers.keras.quantizers import WeightsPOTInferableQuantizer, WeightsSymmetricInferableQuantizer, \
|
|
35
|
+
ActivationPOTInferableQuantizer, ActivationSymmetricInferableQuantizer
|
|
36
|
+
from model_compression_toolkit.trainable_infrastructure.common.base_trainable_quantizer import VariableGroup
|
|
37
|
+
from model_compression_toolkit.qat.keras.quantizer.quant_utils import ste_round, grad_scale
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def symmetric_lsq_quantizer(x: tf.Tensor,
|
|
41
|
+
thresholds: tf.Tensor,
|
|
42
|
+
num_bits: int,
|
|
43
|
+
sign: bool,
|
|
44
|
+
min_int: int,
|
|
45
|
+
max_int:int,
|
|
46
|
+
scale_factor: float) -> tf.Tensor:
|
|
47
|
+
"""
|
|
48
|
+
Symmetric quantizer according to LSQ algorithm: https://arxiv.org/pdf/1902.08153.pdf
|
|
49
|
+
Args:
|
|
50
|
+
x: input to quantize
|
|
51
|
+
thresholds: thresholds of quantization levels
|
|
52
|
+
num_bits: number of bits for quantization
|
|
53
|
+
sign: whether x is signed or not
|
|
54
|
+
min_int: min clipping integer value
|
|
55
|
+
max_int: max clipping integer value
|
|
56
|
+
scale_factor: grad scale of LSQ algorithm
|
|
57
|
+
Returns:
|
|
58
|
+
A quantized tensor
|
|
59
|
+
"""
|
|
60
|
+
delta = thresholds / (2 ** (num_bits - int(sign)))
|
|
61
|
+
delta_scaled = grad_scale(delta, scale_factor)
|
|
62
|
+
rounded = ste_round(x / delta_scaled)
|
|
63
|
+
clipped = tf.math.minimum(tf.math.maximum(rounded, min_int), max_int)
|
|
64
|
+
quantized = delta_scaled * clipped
|
|
65
|
+
return quantized
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@mark_quantizer(quantization_target=QuantizationTarget.Weights,
|
|
69
|
+
quantization_method=[QuantizationMethod.POWER_OF_TWO, QuantizationMethod.SYMMETRIC],
|
|
70
|
+
identifier=TrainingMethod.LSQ)
|
|
71
|
+
class LSQWeightQATQuantizer(BaseKerasQATTrainableQuantizer):
|
|
72
|
+
"""
|
|
73
|
+
Trainable constrained quantizer to quantize layer's weights.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
def __init__(self, quantization_config: TrainableQuantizerWeightsConfig):
|
|
77
|
+
"""
|
|
78
|
+
Initialize a LSQWeightQATQuantizer object with parameters to use
|
|
79
|
+
for the quantization.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
quantization_config: trainable quantizer config class
|
|
83
|
+
"""
|
|
84
|
+
super().__init__(quantization_config)
|
|
85
|
+
self.power_of_two = quantization_config.weights_quantization_method == QuantizationMethod.POWER_OF_TWO
|
|
86
|
+
self.threshold_values = np.array(quantization_config.weights_quantization_params[C.THRESHOLD])
|
|
87
|
+
self.threshold_shape = self.threshold_values.shape
|
|
88
|
+
self.per_channel = self.quantization_config.weights_per_channel_threshold
|
|
89
|
+
self.channel_axis = self.quantization_config.weights_channels_axis
|
|
90
|
+
self.threshold_values = np.reshape(np.asarray(self.threshold_values), [-1]) if self.per_channel else float(self.threshold_values)
|
|
91
|
+
self.num_bits = self.quantization_config.weights_n_bits
|
|
92
|
+
n_pos_bits = self.num_bits - int(C.WEIGHTS_SIGNED)
|
|
93
|
+
self.min_int = -int(C.WEIGHTS_SIGNED) * (2 ** n_pos_bits)
|
|
94
|
+
self.max_int = 2 **n_pos_bits - 1
|
|
95
|
+
self.scale_factor = 1.0 / np.sqrt(self.max_int * self.threshold_values.size)
|
|
96
|
+
if self.power_of_two:
|
|
97
|
+
self.threshold_values = np.power(2.0, np.ceil(np.log2(np.maximum(self.threshold_values, C.MIN_THRESHOLD))))
|
|
98
|
+
|
|
99
|
+
def initialize_quantization(self,
|
|
100
|
+
tensor_shape: TensorShape,
|
|
101
|
+
name: str,
|
|
102
|
+
layer: KerasTrainableQuantizationWrapper):
|
|
103
|
+
"""
|
|
104
|
+
Add quantizer parameters to the quantizer parameters dictionary
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
tensor_shape: tensor shape of the quantized tensor.
|
|
108
|
+
name: Tensor name.
|
|
109
|
+
layer: Layer to quantize.
|
|
110
|
+
"""
|
|
111
|
+
ptq_threshold_tensor = layer.add_weight(
|
|
112
|
+
name + THRESHOLD_TENSOR,
|
|
113
|
+
shape=len(self.threshold_values) if self.per_channel else (),
|
|
114
|
+
initializer=tf.keras.initializers.Constant(1.0),
|
|
115
|
+
trainable=True)
|
|
116
|
+
ptq_threshold_tensor.assign(self.threshold_values)
|
|
117
|
+
|
|
118
|
+
# save the quantizer added parameters for later calculations
|
|
119
|
+
self.add_quantizer_variable(THRESHOLD_TENSOR, ptq_threshold_tensor, VariableGroup.QPARAMS)
|
|
120
|
+
|
|
121
|
+
def __call__(self,
|
|
122
|
+
inputs: tf.Tensor,
|
|
123
|
+
training: bool):
|
|
124
|
+
"""
|
|
125
|
+
Quantize a tensor.
|
|
126
|
+
Args:
|
|
127
|
+
inputs: Input tensor to quantize.
|
|
128
|
+
training: Whether the graph is in training mode.
|
|
129
|
+
weights: Dictionary of weights the quantizer can use to quantize the tensor.
|
|
130
|
+
**kwargs: Additional variables the quantizer may receive.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
The quantized tensor.
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
thresholds = self.get_quantizer_variable(THRESHOLD_TENSOR)
|
|
137
|
+
q_tensor = symmetric_lsq_quantizer(inputs, thresholds, self.num_bits, C.WEIGHTS_SIGNED, self.min_int, self.max_int, self.scale_factor)
|
|
138
|
+
return q_tensor
|
|
139
|
+
|
|
140
|
+
def convert2inferable(self) -> Union[WeightsPOTInferableQuantizer, WeightsSymmetricInferableQuantizer]:
|
|
141
|
+
"""
|
|
142
|
+
Convert quantizer to inferable quantizer.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
BaseKerasInferableQuantizer object.
|
|
146
|
+
"""
|
|
147
|
+
if self.power_of_two:
|
|
148
|
+
thresholds = 2 ** np.ceil(np.log2(self.get_quantizer_variable(THRESHOLD_TENSOR).numpy()))
|
|
149
|
+
return WeightsPOTInferableQuantizer(num_bits=self.num_bits,
|
|
150
|
+
threshold=list(thresholds.flatten()),
|
|
151
|
+
per_channel=self.per_channel,
|
|
152
|
+
channel_axis=self.channel_axis,
|
|
153
|
+
input_rank=len(self.threshold_shape))
|
|
154
|
+
else:
|
|
155
|
+
thresholds = self.get_quantizer_variable(THRESHOLD_TENSOR).numpy()
|
|
156
|
+
return WeightsSymmetricInferableQuantizer(num_bits=self.num_bits,
|
|
157
|
+
threshold=list(thresholds.flatten()),
|
|
158
|
+
per_channel=self.per_channel,
|
|
159
|
+
channel_axis=self.channel_axis,
|
|
160
|
+
input_rank=len(self.threshold_shape))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
@mark_quantizer(quantization_target=QuantizationTarget.Activation,
|
|
164
|
+
quantization_method=[QuantizationMethod.POWER_OF_TWO, QuantizationMethod.SYMMETRIC],
|
|
165
|
+
identifier=TrainingMethod.LSQ)
|
|
166
|
+
class LSQActivationQATQuantizer(BaseKerasQATTrainableQuantizer):
|
|
167
|
+
"""
|
|
168
|
+
Trainable constrained quantizer to quantize layer activations.
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
def __init__(self, quantization_config: TrainableQuantizerActivationConfig):
|
|
172
|
+
"""
|
|
173
|
+
Initialize a LSQActivationQATQuantizer object with parameters to use
|
|
174
|
+
for the quantization.
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
quantization_config: trainable quantizer config class
|
|
178
|
+
"""
|
|
179
|
+
super().__init__(quantization_config)
|
|
180
|
+
self.power_of_two = quantization_config.activation_quantization_method == QuantizationMethod.POWER_OF_TWO
|
|
181
|
+
self.threshold_values = float(quantization_config.activation_quantization_params[C.THRESHOLD])
|
|
182
|
+
self.threshold_shape = np.asarray(self.threshold_values).shape
|
|
183
|
+
self.sign = quantization_config.activation_quantization_params[SIGNED]
|
|
184
|
+
self.num_bits = quantization_config.activation_n_bits
|
|
185
|
+
n_pos_bits = self.num_bits - int(self.sign)
|
|
186
|
+
self.min_int = -int(self.sign) * (2 ** n_pos_bits)
|
|
187
|
+
self.max_int = (2 ** n_pos_bits) - 1
|
|
188
|
+
if self.power_of_two:
|
|
189
|
+
self.threshold_values = np.power(2.0, np.ceil(np.log2(np.maximum(self.threshold_values, C.MIN_THRESHOLD))))
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def initialize_quantization(self,
|
|
193
|
+
tensor_shape: TensorShape,
|
|
194
|
+
name: str,
|
|
195
|
+
layer: KerasTrainableQuantizationWrapper):
|
|
196
|
+
"""
|
|
197
|
+
Add quantizer parameters to the quantizer parameters dictionary
|
|
198
|
+
|
|
199
|
+
Args:
|
|
200
|
+
tensor_shape: tensor shape of the quantized tensor.
|
|
201
|
+
name: Tensor name.
|
|
202
|
+
layer: Layer to quantize.
|
|
203
|
+
"""
|
|
204
|
+
ptq_threshold_tensor = layer.add_weight(
|
|
205
|
+
name + THRESHOLD_TENSOR,
|
|
206
|
+
shape=(),
|
|
207
|
+
initializer=tf.keras.initializers.Constant(1.0),
|
|
208
|
+
trainable=True)
|
|
209
|
+
ptq_threshold_tensor.assign(self.threshold_values)
|
|
210
|
+
|
|
211
|
+
# save the quantizer added parameters for later calculations
|
|
212
|
+
self.add_quantizer_variable(THRESHOLD_TENSOR, ptq_threshold_tensor, VariableGroup.QPARAMS)
|
|
213
|
+
|
|
214
|
+
def __call__(self,
|
|
215
|
+
inputs: tf.Tensor,
|
|
216
|
+
training: bool):
|
|
217
|
+
"""
|
|
218
|
+
Quantize a tensor.
|
|
219
|
+
Args:
|
|
220
|
+
inputs: Input tensor to quantize.
|
|
221
|
+
training: Whether the graph is in training mode.
|
|
222
|
+
|
|
223
|
+
Returns:
|
|
224
|
+
The quantized tensor.
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
thresholds = self.get_quantizer_variable(THRESHOLD_TENSOR)
|
|
228
|
+
n_channels = inputs.shape[-1]
|
|
229
|
+
scale_factor = 1.0 / np.sqrt(self.max_int * n_channels)
|
|
230
|
+
q_tensor = symmetric_lsq_quantizer(inputs, thresholds, self.num_bits, self.sign, self.min_int, self.max_int, scale_factor)
|
|
231
|
+
return q_tensor
|
|
232
|
+
|
|
233
|
+
def convert2inferable(self) -> Union[ActivationPOTInferableQuantizer, ActivationSymmetricInferableQuantizer]:
|
|
234
|
+
"""
|
|
235
|
+
Convert quantizer to inferable quantizer.
|
|
236
|
+
|
|
237
|
+
Returns:
|
|
238
|
+
BaseKerasInferableQuantizer object.
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
if self.power_of_two:
|
|
242
|
+
thresholds = 2 ** np.ceil(np.log2(self.get_quantizer_variable(THRESHOLD_TENSOR).numpy()))
|
|
243
|
+
return ActivationPOTInferableQuantizer(num_bits=self.num_bits,
|
|
244
|
+
# In activation quantization is per-tensor only - thus we pass
|
|
245
|
+
# the threshold as a list with a len of 1
|
|
246
|
+
threshold=[thresholds],
|
|
247
|
+
signed=self.sign)
|
|
248
|
+
else:
|
|
249
|
+
thresholds = self.get_quantizer_variable(THRESHOLD_TENSOR).numpy()
|
|
250
|
+
return ActivationSymmetricInferableQuantizer(num_bits=self.num_bits,
|
|
251
|
+
# In activation quantization is per-tensor only - thus we
|
|
252
|
+
# pass the threshold as a list with a len of 1
|
|
253
|
+
threshold=[thresholds],
|
|
254
|
+
signed=self.sign)
|