From 5d3915318ac28238fc000d1f1d23e4ed2abd81d6 Mon Sep 17 00:00:00 2001 From: Reuven <44209964+reuvenperetz@users.noreply.github.com> Date: Sun, 17 Mar 2024 10:48:55 +0200 Subject: [PATCH] Update example_keras_network_editor.ipynb Add attribute name to the action of editing an attribute configuration of Conv2D (kernel). --- .../keras/debug_tools/example_keras_network_editor.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/notebooks/keras/debug_tools/example_keras_network_editor.ipynb b/tutorials/notebooks/keras/debug_tools/example_keras_network_editor.ipynb index 37b0b5f12..ad82dbe17 100644 --- a/tutorials/notebooks/keras/debug_tools/example_keras_network_editor.ipynb +++ b/tutorials/notebooks/keras/debug_tools/example_keras_network_editor.ipynb @@ -168,7 +168,7 @@ "\n", " Now let's see how to customize the quantization process for specific layers using MCT's network editor. An `EditRule` is created with a `NodeTypeFilter` targeting the Conv2D layer type.\n", "\n", - " The action associated with this rule changes the quantization configuration of the weights to 4 bits instead of the default 8 bits. This rule is then included in a list (`edit_rules_list`) which is passed to the `DebugConfig`.\n", + " The action associated with this rule changes the quantization configuration of the 'kernel' attribute to 4 bits instead of the default 8 bits. This rule is then included in a list (`edit_rules_list`) which is passed to the `DebugConfig`.\n", " \n", " The `DebugConfig`, with our custom rule, is then used to create a `CoreConfig`. This configuration will be applied when quantizing the model, resulting in the Conv2D layers being quantized using 4 bits while other layers follow the default setting." ], @@ -182,7 +182,7 @@ "edit_rules_list = [\n", " mct.core.network_editor.EditRule(\n", " filter=mct.core.network_editor.NodeTypeFilter(Conv2D),\n", - " action=mct.core.network_editor.ChangeCandidatesWeightsQuantConfigAttr(weights_n_bits=4)\n", + " action=mct.core.network_editor.ChangeCandidatesWeightsQuantConfigAttr(attr_name='kernel', weights_n_bits=4)\n", " )\n", "]\n", "\n",