Skip to content

Instantly share code, notes, and snippets.

@craine

craine/fastai-mnist.ipynb Secret

Created May 3, 2020
Embed
What would you like to do?
Fastai MNIST.ipynb
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Fastai MNIST.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyPHxTPGIUUhiCdmqHDLhSgO",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/craine/5e917fe1144d2e163a71280ebfa07550/fastai-mnist.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "lLF_cEbjff-F",
"colab_type": "code",
"colab": {}
},
"source": [
"!pip install fastai2"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "0uWR7L4sgHrc",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 105
},
"outputId": "d519fc3c-ccf0-47c0-ed6a-244626b7afed"
},
"source": [
"!pip install utils"
],
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"text": [
"Collecting utils\n",
" Downloading https://files.pythonhosted.org/packages/55/e6/c2d2b2703e7debc8b501caae0e6f7ead148fd0faa3c8131292a599930029/utils-1.0.1-py2.py3-none-any.whl\n",
"Installing collected packages: utils\n",
"Successfully installed utils-1.0.1\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "waeM99OnfXBk",
"colab_type": "code",
"colab": {}
},
"source": [
"from fastai2.vision.all import *\n",
"from utils import *\n",
"#from fastai2 import *\n",
"\n",
"matplotlib.rc('image', cmap='Greys')"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "5y_ynUzlgLCG",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 17
},
"outputId": "c300a67f-0fee-478b-b6d2-7e8dfcffabd5"
},
"source": [
"path = untar_data(URLs.MNIST_SAMPLE)"
],
"execution_count": 4,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
""
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "8pHhP-bRhrYL",
"colab_type": "code",
"colab": {}
},
"source": [
"Path.BASE_PATH = path"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "li5lzUPihthd",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "9cae0b2c-d72e-4e93-9bc8-e0a3385c6523"
},
"source": [
"path.ls()"
],
"execution_count": 6,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(#3) [Path('valid'),Path('labels.csv'),Path('train')]"
]
},
"metadata": {
"tags": []
},
"execution_count": 6
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "NvX9c30ch4pj",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "2866845c-7410-42d3-a948-f456837540a4"
},
"source": [
"(path/'train').ls()"
],
"execution_count": 7,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(#2) [Path('train/3'),Path('train/7')]"
]
},
"metadata": {
"tags": []
},
"execution_count": 7
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "5RY7Kle-iNEx",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 54
},
"outputId": "607f2611-c179-4041-f7df-a2e29b1d30a8"
},
"source": [
"# sorted sorts them in order\n",
"threes = (path/'train'/'3').ls().sorted()\n",
"sevens = (path/'train'/'7').ls().sorted()\n",
"threes"
],
"execution_count": 8,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(#6131) [Path('train/3/10.png'),Path('train/3/10000.png'),Path('train/3/10011.png'),Path('train/3/10031.png'),Path('train/3/10034.png'),Path('train/3/10042.png'),Path('train/3/10052.png'),Path('train/3/1007.png'),Path('train/3/10074.png'),Path('train/3/10091.png')...]"
]
},
"metadata": {
"tags": []
},
"execution_count": 8
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "zg46DiJGjU9b",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 45
},
"outputId": "49812633-9661-4f9e-b90e-acc111730043"
},
"source": [
"#first in the threes array\n",
"im3_path = threes[1]\n",
"im3 = Image.open(im3_path)\n",
"im3"
],
"execution_count": 9,
"outputs": [
{
"output_type": "execute_result",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAAAAABXZoBIAAAA9ElEQVR4nM3Or0sDcRjH8c/pgrfBVBjCgibThiKIyTWbWF1bORhGwxARxH/AbtW0JoIGwzXRYhJhtuFY2q1ocLgbe3sGReTuuWbwkx6+r+/zQ/pncX6q+YOldSe6nG3dn8U/rTQ70L8FCGJUewvxl7NTmezNb8xIkvKugr1HSeMP6SrWOVkoTEuSyh0Gm2n3hQyObMnXnxkempRrvgD+gokzwxFAr7U7YXHZ8x4A/Dl7rbu6D2yl3etcw/F3nZgfRVI7rXM7hMUUqzzBec427x26rkmlkzEEa4nnRqnSOH2F0UUx0ePzlbuqMXAHgN6GY9if5xP8dmtHFfwjuQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<PIL.PngImagePlugin.PngImageFile image mode=L size=28x28 at 0x7F70DB19D9E8>"
]
},
"metadata": {
"tags": []
},
"execution_count": 9
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "KOOD54sgkA-d",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 153
},
"outputId": "261b99d4-bd22-4636-fbfe-ece65b4409d0"
},
"source": [
"# numpy array view of the image\n",
"array(im3)[2:10,3:10]"
],
"execution_count": 10,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"array([[ 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 29],\n",
" [ 0, 0, 0, 0, 48, 166, 224],\n",
" [ 0, 0, 93, 244, 249, 253, 187],\n",
" [ 0, 0, 107, 253, 253, 230, 48],\n",
" [ 0, 0, 3, 20, 20, 15, 0]], dtype=uint8)"
]
},
"metadata": {
"tags": []
},
"execution_count": 10
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "UeSyrdfRk8P-",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 969
},
"outputId": "4e708e70-3d88-45a0-c2e5-61e68c16d84b"
},
"source": [
"#hello image nice to see you\n",
"print(array(im3))"
],
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"text": [
"[[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 29 150 195 254 255 254 176 193 150\n",
" 96 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 48 166 224 253 253 234 196 253 253 253 253\n",
" 233 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 93 244 249 253 187 46 10 8 4 10 194 253 253\n",
" 233 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 107 253 253 230 48 0 0 0 0 0 192 253 253\n",
" 156 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 3 20 20 15 0 0 0 0 0 43 224 253 245\n",
" 74 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 249 253 245 126\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 14 101 223 253 248 124 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 11 166 239 253 253 253 187 30 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 16 248 250 253 253 253 253 232 213\n",
" 111 2 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 43 98 98 208 253 253 253\n",
" 253 187 22 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 51 119 253\n",
" 253 253 76 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 183\n",
" 253 253 139 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 182\n",
" 253 253 104 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 249\n",
" 253 253 36 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 60 214 253\n",
" 253 173 11 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 98 247 253 253\n",
" 226 9 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 42 150 252 253 253 233\n",
" 53 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 42 115 42 60 115 159 240 253 253 250 175 25\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 187 253 253 253 253 253 253 253 197 86 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 103 253 253 253 253 253 232 67 1 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
" 0 0 0 0 0 0 0 0 0 0]]\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "4f6vV52tloRG",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 986
},
"outputId": "992020bc-1a30-4dd6-a767-9f2eaee2871d"
},
"source": [
"print(tensor(im3))"
],
"execution_count": 12,
"outputs": [
{
"output_type": "stream",
"text": [
"tensor([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 150, 195, 254, 255,\n",
" 254, 176, 193, 150, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 48, 166, 224, 253, 253, 234, 196,\n",
" 253, 253, 253, 253, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 93, 244, 249, 253, 187, 46, 10, 8, 4,\n",
" 10, 194, 253, 253, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 107, 253, 253, 230, 48, 0, 0, 0, 0,\n",
" 0, 192, 253, 253, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 3, 20, 20, 15, 0, 0, 0, 0, 0,\n",
" 43, 224, 253, 245, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 249, 253, 245, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 101, 223,\n",
" 253, 248, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 166, 239, 253, 253,\n",
" 253, 187, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 248, 250, 253, 253,\n",
" 253, 253, 232, 213, 111, 2, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 98, 98,\n",
" 208, 253, 253, 253, 253, 187, 22, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 9, 51, 119, 253, 253, 253, 76, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 1, 183, 253, 253, 139, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 182, 253, 253, 104, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 85, 249, 253, 253, 36, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 60, 214, 253, 253, 173, 11, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 98, 247, 253, 253, 226, 9, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 150,\n",
" 252, 253, 253, 233, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 42, 115, 42, 60, 115, 159, 240, 253,\n",
" 253, 250, 175, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 187, 253, 253, 253, 253, 253, 253, 253,\n",
" 197, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 103, 253, 253, 253, 253, 253, 232, 67,\n",
" 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],\n",
" dtype=torch.uint8)\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "DVB8Qzgklegt",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 119
},
"outputId": "1286ff96-3dfd-48f2-8521-d0c381c837b5"
},
"source": [
"tensor(im3)[4:10,4:10]"
],
"execution_count": 13,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"tensor([[ 0, 0, 0, 0, 0, 0],\n",
" [ 0, 0, 0, 0, 0, 29],\n",
" [ 0, 0, 0, 48, 166, 224],\n",
" [ 0, 93, 244, 249, 253, 187],\n",
" [ 0, 107, 253, 253, 230, 48],\n",
" [ 0, 3, 20, 20, 15, 0]], dtype=torch.uint8)"
]
},
"metadata": {
"tags": []
},
"execution_count": 13
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "b8KYHjEWl0Rm",
"colab_type": "code",
"colab": {}
},
"source": [
"im3_t = tensor(im3)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "wRYy_ahWmIlR",
"colab_type": "code",
"colab": {}
},
"source": [
"df = pd.DataFrame(im3_t[4:15,4:22])"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "lTPO3Lz-mWxz",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 204
},
"outputId": "935539c5-e784-4ace-d098-28dbdcd6d9be"
},
"source": [
"df.head()"
],
"execution_count": 16,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" <th>1</th>\n",
" <th>2</th>\n",
" <th>3</th>\n",
" <th>4</th>\n",
" <th>5</th>\n",
" <th>6</th>\n",
" <th>7</th>\n",
" <th>8</th>\n",
" <th>9</th>\n",
" <th>10</th>\n",
" <th>11</th>\n",
" <th>12</th>\n",
" <th>13</th>\n",
" <th>14</th>\n",
" <th>15</th>\n",
" <th>16</th>\n",
" <th>17</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>29</td>\n",
" <td>150</td>\n",
" <td>195</td>\n",
" <td>254</td>\n",
" <td>255</td>\n",
" <td>254</td>\n",
" <td>176</td>\n",
" <td>193</td>\n",
" <td>150</td>\n",
" <td>96</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>48</td>\n",
" <td>166</td>\n",
" <td>224</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>234</td>\n",
" <td>196</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>233</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0</td>\n",
" <td>93</td>\n",
" <td>244</td>\n",
" <td>249</td>\n",
" <td>253</td>\n",
" <td>187</td>\n",
" <td>46</td>\n",
" <td>10</td>\n",
" <td>8</td>\n",
" <td>4</td>\n",
" <td>10</td>\n",
" <td>194</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>233</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0</td>\n",
" <td>107</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>230</td>\n",
" <td>48</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>192</td>\n",
" <td>253</td>\n",
" <td>253</td>\n",
" <td>156</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0 1 2 3 4 5 6 7 ... 10 11 12 13 14 15 16 17\n",
"0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0\n",
"1 0 0 0 0 0 29 150 195 ... 254 176 193 150 96 0 0 0\n",
"2 0 0 0 48 166 224 253 253 ... 253 253 253 253 233 0 0 0\n",
"3 0 93 244 249 253 187 46 10 ... 10 194 253 253 233 0 0 0\n",
"4 0 107 253 253 230 48 0 0 ... 0 192 253 253 156 0 0 0\n",
"\n",
"[5 rows x 18 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 16
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "WeR1UmYBmPeD",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 271
},
"outputId": "5433a4bb-55b7-44d7-b29d-5b0b11e0b06b"
},
"source": [
"df.style.set_properties(**{'font-size':'6pt'}).background_gradient('Greys')"
],
"execution_count": 17,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"<style type=\"text/css\" >\n",
" #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col5 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col7 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col8 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col9 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col10 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col11 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col12 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col13 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col14 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col5 {\n",
" font-size: 6pt;\n",
" background-color: #efefef;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col6 {\n",
" font-size: 6pt;\n",
" background-color: #7c7c7c;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col7 {\n",
" font-size: 6pt;\n",
" background-color: #4a4a4a;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col8 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col9 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col10 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col11 {\n",
" font-size: 6pt;\n",
" background-color: #606060;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col12 {\n",
" font-size: 6pt;\n",
" background-color: #4d4d4d;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col13 {\n",
" font-size: 6pt;\n",
" background-color: #7c7c7c;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col14 {\n",
" font-size: 6pt;\n",
" background-color: #bbbbbb;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col3 {\n",
" font-size: 6pt;\n",
" background-color: #e4e4e4;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col4 {\n",
" font-size: 6pt;\n",
" background-color: #6b6b6b;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col5 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col6 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col7 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col8 {\n",
" font-size: 6pt;\n",
" background-color: #171717;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col9 {\n",
" font-size: 6pt;\n",
" background-color: #4b4b4b;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col10 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col11 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col12 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col13 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col14 {\n",
" font-size: 6pt;\n",
" background-color: #171717;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col1 {\n",
" font-size: 6pt;\n",
" background-color: #272727;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col2 {\n",
" font-size: 6pt;\n",
" background-color: #0a0a0a;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col3 {\n",
" font-size: 6pt;\n",
" background-color: #050505;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col4 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col5 {\n",
" font-size: 6pt;\n",
" background-color: #333333;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col6 {\n",
" font-size: 6pt;\n",
" background-color: #e6e6e6;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col7 {\n",
" font-size: 6pt;\n",
" background-color: #fafafa;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col8 {\n",
" font-size: 6pt;\n",
" background-color: #fbfbfb;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col9 {\n",
" font-size: 6pt;\n",
" background-color: #fdfdfd;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col10 {\n",
" font-size: 6pt;\n",
" background-color: #fafafa;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col11 {\n",
" font-size: 6pt;\n",
" background-color: #4b4b4b;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col12 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col13 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col14 {\n",
" font-size: 6pt;\n",
" background-color: #171717;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col1 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col2 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col3 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col4 {\n",
" font-size: 6pt;\n",
" background-color: #1b1b1b;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col5 {\n",
" font-size: 6pt;\n",
" background-color: #e0e0e0;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col7 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col8 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col9 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col10 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col11 {\n",
" font-size: 6pt;\n",
" background-color: #4e4e4e;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col12 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col13 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col14 {\n",
" font-size: 6pt;\n",
" background-color: #767676;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col1 {\n",
" font-size: 6pt;\n",
" background-color: #fcfcfc;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col2 {\n",
" font-size: 6pt;\n",
" background-color: #f6f6f6;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col3 {\n",
" font-size: 6pt;\n",
" background-color: #f6f6f6;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col4 {\n",
" font-size: 6pt;\n",
" background-color: #f8f8f8;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col5 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col7 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col8 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col9 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col10 {\n",
" font-size: 6pt;\n",
" background-color: #e8e8e8;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col11 {\n",
" font-size: 6pt;\n",
" background-color: #222222;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col12 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col13 {\n",
" font-size: 6pt;\n",
" background-color: #090909;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col14 {\n",
" font-size: 6pt;\n",
" background-color: #d0d0d0;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col5 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col7 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col8 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col9 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col10 {\n",
" font-size: 6pt;\n",
" background-color: #060606;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col11 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col12 {\n",
" font-size: 6pt;\n",
" background-color: #090909;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col13 {\n",
" font-size: 6pt;\n",
" background-color: #979797;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col14 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col5 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col7 {\n",
" font-size: 6pt;\n",
" background-color: #f8f8f8;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col8 {\n",
" font-size: 6pt;\n",
" background-color: #b6b6b6;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col9 {\n",
" font-size: 6pt;\n",
" background-color: #252525;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col10 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col11 {\n",
" font-size: 6pt;\n",
" background-color: #060606;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col12 {\n",
" font-size: 6pt;\n",
" background-color: #999999;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col13 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col14 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col5 {\n",
" font-size: 6pt;\n",
" background-color: #f9f9f9;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col6 {\n",
" font-size: 6pt;\n",
" background-color: #6b6b6b;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col7 {\n",
" font-size: 6pt;\n",
" background-color: #101010;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col8 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col9 {\n",
" font-size: 6pt;\n",
" background-color: #020202;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col10 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col11 {\n",
" font-size: 6pt;\n",
" background-color: #545454;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col12 {\n",
" font-size: 6pt;\n",
" background-color: #f1f1f1;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col13 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col14 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col15 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col5 {\n",
" font-size: 6pt;\n",
" background-color: #f7f7f7;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col6 {\n",
" font-size: 6pt;\n",
" background-color: #060606;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col7 {\n",
" font-size: 6pt;\n",
" background-color: #030303;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col8 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col9 {\n",
" font-size: 6pt;\n",
" background-color: #020202;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col10 {\n",
" font-size: 6pt;\n",
" background-color: #010101;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col11 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col12 {\n",
" font-size: 6pt;\n",
" background-color: #181818;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col13 {\n",
" font-size: 6pt;\n",
" background-color: #303030;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col14 {\n",
" font-size: 6pt;\n",
" background-color: #a9a9a9;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col15 {\n",
" font-size: 6pt;\n",
" background-color: #fefefe;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col16 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col0 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col1 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col2 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col3 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col4 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col5 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col6 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col7 {\n",
" font-size: 6pt;\n",
" background-color: #e8e8e8;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col8 {\n",
" font-size: 6pt;\n",
" background-color: #bababa;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col9 {\n",
" font-size: 6pt;\n",
" background-color: #bababa;\n",
" color: #000000;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col10 {\n",
" font-size: 6pt;\n",
" background-color: #393939;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col11 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col12 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col13 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col14 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col15 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col16 {\n",
" font-size: 6pt;\n",
" background-color: #000000;\n",
" color: #f1f1f1;\n",
" } #T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col17 {\n",
" font-size: 6pt;\n",
" background-color: #ffffff;\n",
" color: #000000;\n",
" }</style><table id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002\" ><thead> <tr> <th class=\"blank level0\" ></th> <th class=\"col_heading level0 col0\" >0</th> <th class=\"col_heading level0 col1\" >1</th> <th class=\"col_heading level0 col2\" >2</th> <th class=\"col_heading level0 col3\" >3</th> <th class=\"col_heading level0 col4\" >4</th> <th class=\"col_heading level0 col5\" >5</th> <th class=\"col_heading level0 col6\" >6</th> <th class=\"col_heading level0 col7\" >7</th> <th class=\"col_heading level0 col8\" >8</th> <th class=\"col_heading level0 col9\" >9</th> <th class=\"col_heading level0 col10\" >10</th> <th class=\"col_heading level0 col11\" >11</th> <th class=\"col_heading level0 col12\" >12</th> <th class=\"col_heading level0 col13\" >13</th> <th class=\"col_heading level0 col14\" >14</th> <th class=\"col_heading level0 col15\" >15</th> <th class=\"col_heading level0 col16\" >16</th> <th class=\"col_heading level0 col17\" >17</th> </tr></thead><tbody>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col0\" class=\"data row0 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col1\" class=\"data row0 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col2\" class=\"data row0 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col3\" class=\"data row0 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col4\" class=\"data row0 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col5\" class=\"data row0 col5\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col6\" class=\"data row0 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col7\" class=\"data row0 col7\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col8\" class=\"data row0 col8\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col9\" class=\"data row0 col9\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col10\" class=\"data row0 col10\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col11\" class=\"data row0 col11\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col12\" class=\"data row0 col12\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col13\" class=\"data row0 col13\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col14\" class=\"data row0 col14\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col15\" class=\"data row0 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col16\" class=\"data row0 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row0_col17\" class=\"data row0 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col0\" class=\"data row1 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col1\" class=\"data row1 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col2\" class=\"data row1 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col3\" class=\"data row1 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col4\" class=\"data row1 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col5\" class=\"data row1 col5\" >29</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col6\" class=\"data row1 col6\" >150</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col7\" class=\"data row1 col7\" >195</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col8\" class=\"data row1 col8\" >254</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col9\" class=\"data row1 col9\" >255</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col10\" class=\"data row1 col10\" >254</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col11\" class=\"data row1 col11\" >176</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col12\" class=\"data row1 col12\" >193</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col13\" class=\"data row1 col13\" >150</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col14\" class=\"data row1 col14\" >96</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col15\" class=\"data row1 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col16\" class=\"data row1 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row1_col17\" class=\"data row1 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col0\" class=\"data row2 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col1\" class=\"data row2 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col2\" class=\"data row2 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col3\" class=\"data row2 col3\" >48</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col4\" class=\"data row2 col4\" >166</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col5\" class=\"data row2 col5\" >224</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col6\" class=\"data row2 col6\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col7\" class=\"data row2 col7\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col8\" class=\"data row2 col8\" >234</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col9\" class=\"data row2 col9\" >196</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col10\" class=\"data row2 col10\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col11\" class=\"data row2 col11\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col12\" class=\"data row2 col12\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col13\" class=\"data row2 col13\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col14\" class=\"data row2 col14\" >233</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col15\" class=\"data row2 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col16\" class=\"data row2 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row2_col17\" class=\"data row2 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col0\" class=\"data row3 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col1\" class=\"data row3 col1\" >93</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col2\" class=\"data row3 col2\" >244</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col3\" class=\"data row3 col3\" >249</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col4\" class=\"data row3 col4\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col5\" class=\"data row3 col5\" >187</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col6\" class=\"data row3 col6\" >46</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col7\" class=\"data row3 col7\" >10</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col8\" class=\"data row3 col8\" >8</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col9\" class=\"data row3 col9\" >4</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col10\" class=\"data row3 col10\" >10</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col11\" class=\"data row3 col11\" >194</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col12\" class=\"data row3 col12\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col13\" class=\"data row3 col13\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col14\" class=\"data row3 col14\" >233</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col15\" class=\"data row3 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col16\" class=\"data row3 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row3_col17\" class=\"data row3 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col0\" class=\"data row4 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col1\" class=\"data row4 col1\" >107</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col2\" class=\"data row4 col2\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col3\" class=\"data row4 col3\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col4\" class=\"data row4 col4\" >230</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col5\" class=\"data row4 col5\" >48</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col6\" class=\"data row4 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col7\" class=\"data row4 col7\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col8\" class=\"data row4 col8\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col9\" class=\"data row4 col9\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col10\" class=\"data row4 col10\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col11\" class=\"data row4 col11\" >192</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col12\" class=\"data row4 col12\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col13\" class=\"data row4 col13\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col14\" class=\"data row4 col14\" >156</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col15\" class=\"data row4 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col16\" class=\"data row4 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row4_col17\" class=\"data row4 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col0\" class=\"data row5 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col1\" class=\"data row5 col1\" >3</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col2\" class=\"data row5 col2\" >20</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col3\" class=\"data row5 col3\" >20</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col4\" class=\"data row5 col4\" >15</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col5\" class=\"data row5 col5\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col6\" class=\"data row5 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col7\" class=\"data row5 col7\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col8\" class=\"data row5 col8\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col9\" class=\"data row5 col9\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col10\" class=\"data row5 col10\" >43</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col11\" class=\"data row5 col11\" >224</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col12\" class=\"data row5 col12\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col13\" class=\"data row5 col13\" >245</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col14\" class=\"data row5 col14\" >74</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col15\" class=\"data row5 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col16\" class=\"data row5 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row5_col17\" class=\"data row5 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col0\" class=\"data row6 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col1\" class=\"data row6 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col2\" class=\"data row6 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col3\" class=\"data row6 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col4\" class=\"data row6 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col5\" class=\"data row6 col5\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col6\" class=\"data row6 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col7\" class=\"data row6 col7\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col8\" class=\"data row6 col8\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col9\" class=\"data row6 col9\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col10\" class=\"data row6 col10\" >249</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col11\" class=\"data row6 col11\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col12\" class=\"data row6 col12\" >245</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col13\" class=\"data row6 col13\" >126</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col14\" class=\"data row6 col14\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col15\" class=\"data row6 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col16\" class=\"data row6 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row6_col17\" class=\"data row6 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col0\" class=\"data row7 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col1\" class=\"data row7 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col2\" class=\"data row7 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col3\" class=\"data row7 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col4\" class=\"data row7 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col5\" class=\"data row7 col5\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col6\" class=\"data row7 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col7\" class=\"data row7 col7\" >14</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col8\" class=\"data row7 col8\" >101</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col9\" class=\"data row7 col9\" >223</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col10\" class=\"data row7 col10\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col11\" class=\"data row7 col11\" >248</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col12\" class=\"data row7 col12\" >124</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col13\" class=\"data row7 col13\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col14\" class=\"data row7 col14\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col15\" class=\"data row7 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col16\" class=\"data row7 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row7_col17\" class=\"data row7 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col0\" class=\"data row8 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col1\" class=\"data row8 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col2\" class=\"data row8 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col3\" class=\"data row8 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col4\" class=\"data row8 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col5\" class=\"data row8 col5\" >11</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col6\" class=\"data row8 col6\" >166</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col7\" class=\"data row8 col7\" >239</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col8\" class=\"data row8 col8\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col9\" class=\"data row8 col9\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col10\" class=\"data row8 col10\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col11\" class=\"data row8 col11\" >187</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col12\" class=\"data row8 col12\" >30</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col13\" class=\"data row8 col13\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col14\" class=\"data row8 col14\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col15\" class=\"data row8 col15\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col16\" class=\"data row8 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row8_col17\" class=\"data row8 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col0\" class=\"data row9 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col1\" class=\"data row9 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col2\" class=\"data row9 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col3\" class=\"data row9 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col4\" class=\"data row9 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col5\" class=\"data row9 col5\" >16</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col6\" class=\"data row9 col6\" >248</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col7\" class=\"data row9 col7\" >250</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col8\" class=\"data row9 col8\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col9\" class=\"data row9 col9\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col10\" class=\"data row9 col10\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col11\" class=\"data row9 col11\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col12\" class=\"data row9 col12\" >232</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col13\" class=\"data row9 col13\" >213</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col14\" class=\"data row9 col14\" >111</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col15\" class=\"data row9 col15\" >2</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col16\" class=\"data row9 col16\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row9_col17\" class=\"data row9 col17\" >0</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col0\" class=\"data row10 col0\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col1\" class=\"data row10 col1\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col2\" class=\"data row10 col2\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col3\" class=\"data row10 col3\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col4\" class=\"data row10 col4\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col5\" class=\"data row10 col5\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col6\" class=\"data row10 col6\" >0</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col7\" class=\"data row10 col7\" >43</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col8\" class=\"data row10 col8\" >98</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col9\" class=\"data row10 col9\" >98</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col10\" class=\"data row10 col10\" >208</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col11\" class=\"data row10 col11\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col12\" class=\"data row10 col12\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col13\" class=\"data row10 col13\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col14\" class=\"data row10 col14\" >253</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col15\" class=\"data row10 col15\" >187</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col16\" class=\"data row10 col16\" >22</td>\n",
" <td id=\"T_d24cf12c_8d6c_11ea_bf8f_0242ac1c0002row10_col17\" class=\"data row10 col17\" >0</td>\n",
" </tr>\n",
" </tbody></table>"
],
"text/plain": [
"<pandas.io.formats.style.Styler at 0x7f70da94fe80>"
]
},
"metadata": {
"tags": []
},
"execution_count": 17
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "9j6MonYvnaIV",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "08ad8201-ae96-4243-becc-5fd07a05d0f7"
},
"source": [
"#this shows me how many are in the list of images\n",
"seven_tensors = [tensor(Image.open(o)) for o in sevens]\n",
"three_tensors = [tensor(Image.open(o)) for o in threes]\n",
"len(three_tensors), len(seven_tensors)"
],
"execution_count": 18,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(6131, 6265)"
]
},
"metadata": {
"tags": []
},
"execution_count": 18
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "KGW4Zzohq-LA",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 102
},
"outputId": "6e098f29-49ff-4a74-b55b-44c3577caf69"
},
"source": [
"show_image(three_tensors[1])"
],
"execution_count": 19,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f70da5ae198>"
]
},
"metadata": {
"tags": []
},
"execution_count": 19
},
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAJHElEQVR4nO2bXXMSZxuAL1jYXYQsiCYxIWIIjImJ0TaVTu2H41FnnGmPPOtMf0NP+i/6H9oDx+OOOtMjW6cdGz/Sk1ZqxkRDhCTQEAjfsLDsvgeWbbMmxgrEzDtcR5ln+bi5eJ5n7/t+iM0wDPr8g/1tB3DY6Aux0BdioS/EQl+IBcc+1/+fb0G23Qb7M8RCX4iFvhALfSEW+kIs9IVY6Aux0BdiYb/ErGMMw6DVatFsNqlUKmiaRrPZpNls0mg0Xnq8LMtIkoSu6+i6jtPpxOFw4HQ6EQQBWZZxOHoXds+FaJp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+fLLL/nkk08Ih8M9kwFdFvLvb9yaULXH2383Gg0KhQLxeJz5+XkWFha4d++e+fj2me/AwACKonD27FneeecdPB5Pz2RAF4Vomka1WqVcLrO2toaiKIyMjJiH3pVKha2tLUqlEpubmywvL7O4uGjWKfl8HvgnM41EIoTDYa5cuUI0GiUUCqEoSk9/PQRdFNJqtSiVSmxtbRGLxRgdHUWSJPMXRLlcjuXlZba2tsxl0u6tqqq645RPFEXGx8cJh8NEo1FmZmbMhlGv6ZqQfD7Pt99+SzKZ5P79++Zhd6vVotVqmecwqqqaM6ZSqZgb5/DwMGNjY7z//vtmk/nkyZMoioIkSV3PN/aia0IajQaJRIJnz56xuLj4Wj9ssdlsSJKEJEmMjY0RiUQ4c+YM0WiUiYkJ/H5/t8J7bbomxOPxcPnyZTweD7/++uu+QmRZ5siRI3z++ed89tlnhEIhRkZGcLlcB7Y8dqNrQhwOB8FgkHQ6TSAQMI8l98LlcuHz+ZicnGR2dpahoaEdHbS3RdeazK1WyzxvKRaL+7/x3w0ht9ttdsm6XcrvF8KugwfddT9E9P+j6nXoC7HQF2KhL8TCfrfd3lVRh5T+DLHQF2KhL8RCX4iFvhALfSEW/gcMlBno19ugeQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 72x72 with 1 Axes>"
]
},
"metadata": {
"tags": [],
"needs_background": "light"
}
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "X6iQVaxNrP7C",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "1fc5aa88-1c4d-42a7-c064-83dbcf0dc13e"
},
"source": [
"stacked_sevens = torch.stack(seven_tensors).float()/255\n",
"stacked_threes = torch.stack(three_tensors).float()/255\n",
"stacked_threes.shape"
],
"execution_count": 20,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"torch.Size([6131, 28, 28])"
]
},
"metadata": {
"tags": []
},
"execution_count": 20
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "yc5naxN0sa9v",
"colab_type": "text"
},
"source": [
"we have 6131 images, each of size 28 x 28 pixels"
]
},
{
"cell_type": "code",
"metadata": {
"id": "mdvSkXmtqp7a",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "dceffe3e-edd3-443c-f54d-dcff05c9e7a4"
},
"source": [
"len(stacked_threes.shape)"
],
"execution_count": 21,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3"
]
},
"metadata": {
"tags": []
},
"execution_count": 21
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "NcYvNpeGsovP",
"colab_type": "text"
},
"source": [
"The length of a tensor's shape is its rank.\n",
"\n",
"The number of dimensions used to represent the data is known as its Rank.\n",
"\n",
"rank is the number of axes or dimensions in a tensor; \n",
"\n",
"shape is the size of each axis of a tensor."
]
},
{
"cell_type": "code",
"metadata": {
"id": "cg8zzcysukCD",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "115756f9-bc62-4c8c-ef66-ec0b9251f863"
},
"source": [
"#get the tensor's rank with ndim\n",
"stacked_threes.ndim"
],
"execution_count": 22,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3"
]
},
"metadata": {
"tags": []
},
"execution_count": 22
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "RLi1tbesvPP6",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 85
},
"outputId": "22cb5984-0caa-4608-8935-dddca3c694ac"
},
"source": [
"mean_threes = stacked_threes.mean(0)\n",
"show_image(mean_threes);"
],
"execution_count": 23,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliL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ik9c/OU95MMzfuKd/Cy7/gORZFdAJPsoZP73fP5Mu3qIZFdAJLsCItkVEMmugEh2BUSyfwEZ2JfU/pD8AwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 72x72 with 1 Axes>"
]
},
"metadata": {
"tags": [],
"needs_background": "light"
}
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "BMOWMSU-vaHb",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 85
},
"outputId": "24d5ce19-6d8c-4a1b-a51f-c7fd06fb8c0d"
},
"source": [
"mean_sevens = stacked_sevens.mean(0)\n",
"show_image(mean_sevens);"
],
"execution_count": 24,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAI7UlEQVR4nO1baVPiTBc9ZF/IhoOWOjUf5v//KgelNEZICCErvB+eutemjaNC8N04VanG7H1y99uOdrsdzniF8u9+gf80nAmRcCZEwpkQCWdCJGgfHP9fdkGjvp1nCZFwJkTCmRAJZ0IknAmRcCZEwpkQCWdCJJwJkfBRpHoQPlNjkc8ZjXoDxzf47HmHYhBCxMnR74/Gz0IkYDQa8d/y2Hf+ITiKEHmS2+2Wx91uxxv9TcfFY+L1BHGy9FtRFIxGo96RjsvXH4KDCBEnIk6aJt51HbbbLbquQ9d1aNuWR9pP58n3kUET1zQNqqrCMAyoqgrTNKGqKjRNg6IoexvhEGK+TIj44kQCEdA0DZqmQVmWaJoGm80GdV1jvV6jrmvkeY66rlEUBZqmQV3XaNuWieqTJFVVoSgKXNeFaZq4uLiA67qIogiO48D3fZimCcuymKDRaARVVbHb7b5MypcIkSWDvjRJAE10vV6jLEtkWYaiKJAkCTabDbI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ats2wjCE7/uwLOvDmOMUGNyG9NkOMqo00nIHsTBMTScav8uIyhhsSdV7RpQWxtBGrQbTNN8siKEikOhqRYP6X6EyIvoW1IgrgyiUp8YUqYSqqiwdhmFwi2KIPstXMWhy99451AR3XZcnKa8CIBsitiffa1mI49A4SRwC7Lc7adLU6gReWw+apnGb0zAM3khy/lbzOAUpow++8KdWnvTZEHHJFdkSMqxt2+6pEEkRkUNumEj5qDJ2IDG9Fw1eMaNqmdinESdMC+xEQoDXxXWiIZXvcYp0/808hpAQPrknYhX391XPel+qJ4EbqiImPqZ355CE8EXvlADeO953ft/EB5aKgwj5v8P530MknAmRcCZEwpkQCWdCJJwJkfAv6PLhbRzVtQ8AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 72x72 with 1 Axes>"
]
},
"metadata": {
"tags": [],
"needs_background": "light"
}
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "F3s--LjlvogN",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 85
},
"outputId": "a5656d3d-cef3-4b2f-ab4b-fe1f809c7f4f"
},
"source": [
"a_3 = stacked_threes[1]\n",
"show_image(a_3);"
],
"execution_count": 25,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAJHElEQVR4nO2bXXMSZxuAL1jYXYQsiCYxIWIIjImJ0TaVTu2H41FnnGmPPOtMf0NP+i/6H9oDx+OOOtMjW6cdGz/Sk1ZqxkRDhCTQEAjfsLDsvgeWbbMmxgrEzDtcR5ln+bi5eJ5n7/t+iM0wDPr8g/1tB3DY6Aux0BdioS/EQl+IBcc+1/+fb0G23Qb7M8RCX4iFvhALfSEW+kIs9I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zDI5/M8ffqUhw8fcuPGDbO3Ci820SNHjjA4OMi5c+cIhUI9kQFvUYiqqqiqysbGBktLS9y9e5f5+XkSiQTNZtNcJi6XC1mW+fLLL/nkk08Ih8M9kwFdFvLvb9yaULXH2383Gg0KhQLxeJz5+XkWFha4d++e+fj2me/AwACKonD27FneeecdPB5Pz2RAF4Vomka1WqVcLrO2toaiKIyMjJiH3pVKha2tLUqlEpubmywvL7O4uGjWKfl8HvgnM41EIoTDYa5cuUI0GiUUCqEoSk9/PQRdFNJqtSiVSmxtbRGLxRgdHUWSJPMXRLlcjuXlZba2tsxl0u6tqqq645RPFEXGx8cJh8NEo1FmZmbMhlGv6ZqQfD7Pt99+SzKZ5P79++Zhd6vVotVqmecwqqqaM6ZSqZgb5/DwMGNjY7z//vtmk/nkyZMoioIkSV3PN/aia0IajQaJRIJnz56xuLj4Wj9ssdlsSJKEJEmMjY0RiUQ4c+YM0WiUiYkJ/H5/t8J7bbomxOPxcPnyZTweD7/++uu+QmRZ5siRI3z++ed89tlnhEIhRkZGcLlcB7Y8dqNrQhwOB8FgkHQ6TSAQMI8l98LlcuHz+ZicnGR2dpahoaEdHbS3RdeazK1WyzxvKRaL+7/x3w0ht9ttdsm6XcrvF8KugwfddT9E9P+j6nXoC7HQF2KhL8TCfrfd3lVRh5T+DLHQF2KhL8RCX4iFvhALfSEW/gcMlBno19ugeQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 72x72 with 1 Axes>"
]
},
"metadata": {
"tags": [],
"needs_background": "light"
}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cOvv62XRv2Pc",
"colab_type": "text"
},
"source": [
"Because some differences will be positive, some will be negative, and these differences cancel out, resulting in a situation where an image which is too dark in some places and too light in others might be shown as having zero total differences from the ideal. That would be misleading!\n",
"\n",
"To avoid this, there's two main ways data scientists **measure distance** in this context:\n",
"\n",
"1. Take the mean of the absolute value of differences (absolute value is the function that replaces negative values with positive values). This is called the mean absolute difference or L1 norm\n",
"\n",
"2. Take the mean of the square of differences (which makes everything positive) and then take the square root (which undoes the squaring). This is called the root mean squared error (RMSE) or L2 norm."
]
},
{
"cell_type": "code",
"metadata": {
"id": "ueU_Uwbw3wd6",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "faeb84c0-b563-4cf7-e842-b59a348e84ad"
},
"source": [
"dist_3_abs = (a_3 - mean_threes).abs().mean()\n",
"dist_3_sqr = ((a_3 - mean_threes)**2).mean().sqrt()\n",
"dist_3_abs,dist_3_sqr"
],
"execution_count": 26,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(tensor(0.1114), tensor(0.2021))"
]
},
"metadata": {
"tags": []
},
"execution_count": 26
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "D6YjWuM44w9_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "338d4d42-03b5-4823-898f-a93d8a16f7bc"
},
"source": [
"dist_7_abs = (a_3 - mean_sevens).abs().mean()\n",
"dist_7_sqr = ((a_3 - mean_sevens)**2).mean().sqrt()\n",
"dist_7_abs,dist_7_sqr"
],
"execution_count": 27,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(tensor(0.1586), tensor(0.3021))"
]
},
"metadata": {
"tags": []
},
"execution_count": 27
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "eRzLwNHX4_q-",
"colab_type": "text"
},
"source": [
"Why do we do the a_3 vs. the sevens? To show the differences.\n",
"\n",
"\"In both cases, the distance between our 3 and the \"ideal\" 3 is less than the distance to the ideal 7.\""
]
},
{
"cell_type": "code",
"metadata": {
"id": "A2CwVepg5ZHn",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "bffbfbf5-de63-46d3-be0e-3acf8b1f8b43"
},
"source": [
"F.l1_loss(a_3.float(),mean_sevens), F.mse_loss(a_3,mean_sevens).sqrt()"
],
"execution_count": 28,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(tensor(0.1586), tensor(0.3021))"
]
},
"metadata": {
"tags": []
},
"execution_count": 28
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "IwlKoBXi50XA",
"colab_type": "text"
},
"source": [
"What is going on ^ here?\n",
"\n",
"L1 loss is just equal to (a-b).abs().mean(), where a and b are tensors. "
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "PMD5sytM7UBb",
"colab_type": "text"
},
"source": [
""
]
},
{
"cell_type": "code",
"metadata": {
"id": "Ceyk0PPsdDBV",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "40409d42-d7ff-42c8-d7b2-6e56617bac22"
},
"source": [
"valid_3_tensor = torch.stack([tensor(Image.open(o))\n",
" for o in (path/'valid'/'3').ls()])\n",
"valid_3_tensor = valid_3_tensor.float()/255\n",
"valid_3_tensor.shape"
],
"execution_count": 29,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"torch.Size([1010, 28, 28])"
]
},
"metadata": {
"tags": []
},
"execution_count": 29
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "FrrhljFNfFsj",
"colab_type": "text"
},
"source": [
"The division by 255 is applied to convert RGB pixel values which are usually in the range [0, 255] to [0.0, 1.0] range. Please see torchvision.transforms.ToTensor for more information\n",
"\n",
"\n",
"The reason they are in [0, 255] is because true color images have 256 values (8-bit) for each channel. It's common to normalize this to [0, 1] as the input to a neural network.\n",
"\n",
"In our case, it is also necessary because we're using a pretrained ResNet from torchvision that has been trained on images with values in [0, 1] and therefore expects the same format."
]
},
{
"cell_type": "code",
"metadata": {
"id": "0aWUAYm5fTrD",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "bce2b3f4-603a-4143-a169-f6a1a54c370e"
},
"source": [
"valid_7_tensor = torch.stack([tensor(Image.open(o))\n",
" for o in (path/'valid'/'7').ls()])\n",
"valid_7_tensor = valid_7_tensor.float()/255\n",
"valid_7_tensor.shape"
],
"execution_count": 30,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"torch.Size([1028, 28, 28])"
]
},
"metadata": {
"tags": []
},
"execution_count": 30
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "FS5MS3XwftOt",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "b4aceee5-b23e-4083-bd7d-76fc9672d119"
},
"source": [
"def mnist_distance(a,b):\n",
" return (a-b).abs().mean((-1,-2))\n",
"mnist_distance(a_3, mean_threes)"
],
"execution_count": 31,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"tensor(0.1114)"
]
},
"metadata": {
"tags": []
},
"execution_count": 31
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "tg_B6PCjf_ic",
"colab_type": "text"
},
"source": [
"What is going on here?\n",
"\n",
"This is a function that calculates the mean absolute error. \n",
"\n",
"Tthe subtraction (a-b) is from PyTorch, when it tries to perform a simple operation subtraction between two tensors of different ranks, will use broadcasting. Broadcasting is a feature where PyTorch will automatically expand the tensor with the smaller rank to have the same size as the one with the larger rank. Broadcasting is an important capability that makes tensor code much easier to write."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Fw08ynrXn7UP",
"colab_type": "text"
},
"source": [
"Finally, our function calls mean((-1,-2)). The tuple (-1,-2) represents a range of axes. In Python, -1 refers to the last element, and -2 refers to the second last. So in this case, this tells PyTorch that we want to take the mean ranging over the values indexed by the last two axes of the tensor. The last two axes are the horizontal and vertical dimensions of an image. So after taking the mean over the last two axes, we are left with just the first tensor axis, which indexes over our images, which is why our final size was (1010). In other words, for every image, we averaged the intensity of all the pixels in that image."
]
},
{
"cell_type": "code",
"metadata": {
"id": "NzPpKRBggVvp",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
},
"outputId": "ee390f31-6b94-4293-f11e-2f32f5cff7b8"
},
"source": [
"valid_3_distance = mnist_distance(valid_3_tensor, mean_threes)\n",
"valid_3_distance, valid_3_distance.shape"
],
"execution_count": 32,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(tensor([0.1086, 0.1058, 0.1445, ..., 0.1125, 0.1133, 0.1137]),\n",
" torch.Size([1010]))"
]
},
"metadata": {
"tags": []
},
"execution_count": 32
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "9G_XX-a5hDyS",
"colab_type": "text"
},
"source": [
"So in this case, PyTorch treats mean3, a rank 2 tensor representing a single image, as if it was 1010 copies of the same image, and then subtracts each of those copies from each \"three\" in our validation set. "
]
},
{
"cell_type": "code",
"metadata": {
"id": "LtKZOTLMgvv2",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "b64e2d92-2a8c-4d99-8f93-7e032fdc1a6c"
},
"source": [
"tensor([1,2,3]) + tensor([1,1,1])"
],
"execution_count": 33,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"tensor([2, 3, 4])"
]
},
"metadata": {
"tags": []
},
"execution_count": 33
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "282IAMHjhePv",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "bd40b56d-a950-424c-bfc0-bcc318979535"
},
"source": [
"(valid_3_tensor-mean_threes).shape"
],
"execution_count": 34,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"torch.Size([1010, 28, 28])"
]
},
"metadata": {
"tags": []
},
"execution_count": 34
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "L96Je6e1iMrK",
"colab_type": "text"
},
"source": [
"This is the difference between the \"ideal 3\" and each of 1,010 threes in the validation set which contains 28x28 images, resulting in the shape 1010,28,28."
]
},
{
"cell_type": "code",
"metadata": {
"id": "RPVWo4VRoQkG",
"colab_type": "code",
"colab": {}
},
"source": [
"def is_3(x): return mnist_distance(x,mean_threes) < mnist_distance(x, mean_sevens)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ZtOGOByxpP-E",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "cef8fc99-38ad-4b06-c060-501d3311a097"
},
"source": [
"#Note also that when we convert the boolean response to a float, \n",
"#we get a 1.0 for true and 0.0 for false:\n",
"is_3(a_3), is_3(a_3).float()"
],
"execution_count": 36,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(tensor(True), tensor(1.))"
]
},
"metadata": {
"tags": []
},