Skip to content

Commit

Permalink
Fixed ofirgo-san's review comment.[3]
Browse files Browse the repository at this point in the history
  • Loading branch information
gouda-youichi committed Jan 31, 2025
1 parent 8128264 commit 67b78b5
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,14 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"ls_table = ['--', ':']\n",
"lc_table = ['blue', 'red']\n",
"\n",
"# Plotting\n",
"plt.figure(figsize=(10, 6))\n",
"plt.hist(all_activations_relu, bins=100, alpha=0.5, label='Original')\n",
"for method, threshold in optimal_thresholds_relu.items():\n",
" plt.axvline(threshold, linestyle='--', linewidth=2, label=f'{method}: {threshold:.2f}')\n",
"for index, (method, threshold) in enumerate(optimal_thresholds_relu.items()):\n",
" plt.axvline(threshold, linestyle=ls_table[index], color=lc_table[index], linewidth=2, label=f'{method}: {threshold:.2f}')\n",
"\n",
"plt.title('Activation Distribution with Optimal Quantization Thresholds First Relu Layer')\n",
"plt.xlabel('Activation Value')\n",
Expand All @@ -530,11 +533,14 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"ls_table = ['--', ':']\n",
"lc_table = ['blue', 'red']\n",
"\n",
"# Plotting\n",
"plt.figure(figsize=(10, 6))\n",
"plt.hist(all_activations_project, bins=100, alpha=0.5, label='Original')\n",
"for method, threshold in optimal_thresholds_project.items():\n",
" plt.axvline(threshold, linestyle='--', linewidth=2, label=f'{method}: {threshold:.2f}')\n",
"for index, (method, threshold) in enumerate(optimal_thresholds_project.items()):\n",
" plt.axvline(threshold, linestyle=ls_table[index], color=lc_table[index], linewidth=2, label=f'{method}: {threshold:.2f}')\n",
"\n",
"plt.title('Activation Distribution with Optimal Quantization Thresholds Project BN layer')\n",
"plt.xlabel('Activation Value')\n",
Expand Down Expand Up @@ -756,7 +762,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 67b78b5

Please sign in to comment.