Skip to content

Commit

Permalink
Added some context that the next executed call will throw an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarSavolainenDR committed Feb 19, 2024
1 parent 2d76aa3 commit c537e94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebooks/02_quant_activation_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"source": [
"import torch\n",
"from brevitas.nn import QuantConv2d, QuantIdentity\n",
"from brevitas.quant.scaled_int import Int8ActPerTensorFloat \n",
"from brevitas.quant.scaled_int import Int8ActPerTensorFloat\n",
"\n",
"torch.manual_seed(0)\n",
"output_quant_conv = QuantConv2d(\n",
Expand Down Expand Up @@ -83,7 +83,7 @@
"source": [
"torch.manual_seed(0)\n",
"input_output_quant_conv = QuantConv2d(\n",
" in_channels=2, out_channels=3, kernel_size=(3,3), \n",
" in_channels=2, out_channels=3, kernel_size=(3,3),\n",
" input_quant=Int8ActPerTensorFloat, output_quant=Int8ActPerTensorFloat)\n",
"\n",
"torch.manual_seed(0)\n",
Expand Down Expand Up @@ -600,7 +600,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By default, the only layer that is an exception to this is `QuantHardTanh`. That is because the interface to `torch.nn.HardTanh` already requires users to manually specify `min_val` and `max_val`, so Brevitas preserves that both when quantization is enabled or disabled. With quantization enabled, by default those values are used for initialization, but then the range is learned. Let's look at an example:"
"By default, the only layer that is an exception to this is `QuantHardTanh`. That is because the interface to `torch.nn.HardTanh` already requires users to manually specify `min_val` and `max_val`, so Brevitas preserves that both when quantization is enabled or disabled. With quantization enabled, by default those values are used for initialization, but then the range is learned. Let's look at an example. Run the cell below, and we expect it to throw an error because of missing attributes:"
]
},
{
Expand Down

0 comments on commit c537e94

Please sign in to comment.