diff --git a/notebooks/brevitas-network-import.ipynb b/notebooks/brevitas-network-import.ipynb index 9099cb97ffbc6dfad5077ac02888fc9e5eb13af4..404242908bca1c34ea600cc9616817975e35deca 100644 --- a/notebooks/brevitas-network-import.ipynb +++ b/notebooks/brevitas-network-import.ipynb @@ -506,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -518,7 +518,7 @@ "op_type: \"MatMul\"" ] }, - "execution_count": 12, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -538,7 +538,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -553,7 +553,7 @@ " [-1., 1., 1., ..., -1., -1., 1.]], dtype=float32)" ] }, - "execution_count": 13, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -562,6 +562,53 @@ "model.get_initializer(model.graph.node[9].input[1])" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can also examine the quantization annotations and shapes of various tensors using the convenience functions provided by ModelWrapper." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "<DataType.BIPOLAR: 8>" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.get_tensor_datatype(model.graph.node[9].input[1])" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[784, 1024]" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.get_tensor_shape(model.graph.node[9].input[1])" + ] + }, { "cell_type": "markdown", "metadata": {},