diff --git a/exercise.ipynb b/exercise.ipynb index e29307a..064639f 100644 --- a/exercise.ipynb +++ b/exercise.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fd37c210", + "id": "93f0f7f9", "metadata": { "editable": true, "lines_to_next_cell": 0, @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "ac735c94", + "id": "9a25e710", "metadata": {}, "source": [ "
\n", @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "d356c176", + "id": "f9b96c13", "metadata": {}, "source": [ "

Start here (AKA checkpoint 0)

\n", @@ -45,7 +45,7 @@ }, { "cell_type": "markdown", - "id": "8c9a7145", + "id": "0c339e3d", "metadata": { "editable": true, "slideshow": { @@ -62,7 +62,7 @@ }, { "cell_type": "markdown", - "id": "fc084b21", + "id": "7f524106", "metadata": {}, "source": [ "\n", @@ -76,7 +76,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1fd9f15a", + "id": "dca1c9b7", "metadata": { "lines_to_next_cell": 2, "tags": [] @@ -124,7 +124,7 @@ }, { "cell_type": "markdown", - "id": "6c752cc9", + "id": "2f4f148f", "metadata": { "lines_to_next_cell": 2 }, @@ -143,7 +143,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d29189ad", + "id": "faa2b411", "metadata": { "tags": [] }, @@ -180,20 +180,17 @@ }, { "cell_type": "markdown", - "id": "6ba6f8a6", + "id": "ceb0525e", "metadata": {}, "source": [ "We make a `torch` `DataLoader` that takes our `sampler` to create batches of eight images and their corresponding labels.\n", - "Each image should be randomly and equally selected from the six available classes (i.e., for each image sample pick a random class, then pick a random image from this class).\n", - "\n", - "We additionally create a validation data loader and a test data loader.\n", - "These do not need to be sampled in a special way, and can load more images at once because the evaluation pass is less memory intensive than the training pass." + "Each image should be randomly and equally selected from the six available classes (i.e., for each image sample pick a random class, then pick a random image from this class)." ] }, { "cell_type": "code", "execution_count": null, - "id": "0a77c6ca", + "id": "a15b4bac", "metadata": { "tags": [] }, @@ -205,7 +202,7 @@ }, { "cell_type": "markdown", - "id": "eb486468", + "id": "5892ab7f", "metadata": {}, "source": [ "The cell below visualizes a single, randomly chosen batch from the training data loader. Feel free to execute this cell multiple times to get a feeling for the dataset and that your sampler gives batches of evenly distributed synapse types." @@ -214,7 +211,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f47a6bbc", + "id": "5aab255a", "metadata": { "lines_to_next_cell": 2, "tags": [] @@ -243,7 +240,7 @@ }, { "cell_type": "markdown", - "id": "14e5abc1", + "id": "025648fb", "metadata": { "lines_to_next_cell": 2 }, @@ -259,7 +256,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5763a1e5", + "id": "e7e2b968", "metadata": { "tags": [] }, @@ -333,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "ef4c6388", + "id": "c544bd0d", "metadata": {}, "source": [ "We'll start by creating the VGG with the default parameters and push it to a GPU if there is one available. Then we'll define the training loss and optimizer.\n", @@ -343,7 +340,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c07c442", + "id": "4c6fca99", "metadata": { "tags": [] }, @@ -361,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ceef84d", + "id": "4929dd7f", "metadata": { "tags": [] }, @@ -375,7 +372,7 @@ }, { "cell_type": "markdown", - "id": "3c4c86bc", + "id": "73e2d8ad", "metadata": {}, "source": [ "

Task 1.1: Train the VGG Network

\n", @@ -388,7 +385,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1bff816", + "id": "4c29af1d", "metadata": { "tags": [] }, @@ -400,7 +397,7 @@ }, { "cell_type": "markdown", - "id": "984ef0c8", + "id": "6fb96afe", "metadata": { "editable": true, "slideshow": { @@ -415,7 +412,7 @@ { "cell_type": "code", "execution_count": null, - "id": "206b60ee", + "id": "c1f21c05", "metadata": { "editable": true, "slideshow": { @@ -455,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "1af3b9ca", + "id": "9c473df0", "metadata": { "editable": true, "slideshow": { @@ -464,15 +461,13 @@ "tags": [] }, "source": [ - "

Task 1.2: Create a prediction loop

\n", - "\n", - "We now have a classifier that can discriminate between images of different types. If you used the images we provided, the classifier is not perfect (you should get an accuracy of around 80%), but pretty good considering that there are six different types of images.\n", + "

Task 1.2: Create a prediction function

\n", "\n", - "To understand the performance of the classifier, we need to run predictions on the validation dataset so that we can get accuracy and eventually a confusiom natrix.\n", + "To understand the performance of the classifier, we need to run predictions on the validation dataset so that we can get accuracy during training, and eventually a confusiom natrix. In practice, this will allow us to stop before we overfit, although in this exercise we will probably not be training that long. Then, later, we can use the same prediction function on test data.\n", "\n", "\n", "TODO\n", - "Modify the `evaluation` so that it returns a paired list of predicted class vs ground truth to produce a confusion matrix. You'll need to do the following steps.\n", + "Modify `predict` so that it returns a paired list of predicted class vs ground truth to produce a confusion matrix. You'll need to do the following steps.\n", "- Get the model output for the batch of data `(x, y)`\n", "- Turn the model output into a probability\n", "- Get the class predictions from the probabilities\n", @@ -485,7 +480,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5009f251", + "id": "cae63f62", "metadata": { "editable": true, "slideshow": { @@ -524,7 +519,7 @@ }, { "cell_type": "markdown", - "id": "fb19b44c", + "id": "bfee4910", "metadata": { "editable": true, "slideshow": { @@ -539,7 +534,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57e2cc5c", + "id": "41bc31bd", "metadata": { "editable": true, "slideshow": { @@ -560,7 +555,7 @@ }, { "cell_type": "markdown", - "id": "d720752f", + "id": "cc91973f", "metadata": { "editable": true, "slideshow": { @@ -576,7 +571,7 @@ }, { "cell_type": "markdown", - "id": "b2ece455", + "id": "7324a440", "metadata": {}, "source": [ "And now, let's test it!" @@ -585,7 +580,7 @@ { "cell_type": "code", "execution_count": null, - "id": "52033d75", + "id": "ef0770ee", "metadata": { "editable": true, "slideshow": { @@ -602,7 +597,7 @@ }, { "cell_type": "markdown", - "id": "090d6639", + "id": "57241755", "metadata": { "editable": true, "slideshow": { @@ -617,7 +612,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8103b2e9", + "id": "953cad3a", "metadata": { "editable": true, "slideshow": { @@ -634,12 +629,18 @@ " checkpoint = torch.load(\n", " \"checkpoints/synapses/classifier/vgg_checkpoint\", map_location=device\n", " )\n", - " model.load_state_dict(checkpoint[\"model_state_dict\"])" + " model.load_state_dict(checkpoint[\"model_state_dict\"])\n", + "\n", + "\n", + "# And check the (hopefully much better) accuracy\n", + "predictions, ground_truths = predict(test_dataset, \"Test\")\n", + "accuracy = accuracy_score(ground_truths, predictions)\n", + "print(f\"Final_final_v2_last_one test accuracy: {accuracy}\")" ] }, { "cell_type": "markdown", - "id": "497a5bdc", + "id": "45d26644", "metadata": { "editable": true, "slideshow": { @@ -658,7 +659,7 @@ }, { "cell_type": "markdown", - "id": "95f553df", + "id": "39ae027f", "metadata": {}, "source": [ "Let's plot the confusion matrix." @@ -667,7 +668,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7f01a41e", + "id": "bc315793", "metadata": { "editable": true, "slideshow": { @@ -737,7 +738,7 @@ }, { "cell_type": "markdown", - "id": "b9d3f860", + "id": "3c8cf7bb", "metadata": { "editable": true, "slideshow": { @@ -759,7 +760,7 @@ }, { "cell_type": "markdown", - "id": "7f924ab4", + "id": "ce4ccb36", "metadata": {}, "source": [ "

Checkpoint 1

\n", @@ -777,7 +778,7 @@ }, { "cell_type": "markdown", - "id": "965f2187", + "id": "be1f14b2", "metadata": {}, "source": [ "# Part 2: Masking the relevant part of the image\n", @@ -787,7 +788,7 @@ }, { "cell_type": "markdown", - "id": "c7247e66", + "id": "41464574", "metadata": {}, "source": [ "## Attributions through integrated gradients\n", @@ -800,7 +801,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55aee79b", + "id": "af08ae72", "metadata": { "editable": true, "slideshow": { @@ -817,7 +818,7 @@ }, { "cell_type": "markdown", - "id": "e8ab8c90", + "id": "9fbf1572", "metadata": { "editable": true, "slideshow": { @@ -837,7 +838,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84c50e1c", + "id": "897dd327", "metadata": { "editable": true, "slideshow": { @@ -860,7 +861,7 @@ { "cell_type": "code", "execution_count": null, - "id": "220bacb7", + "id": "31fa10dc", "metadata": { "editable": true, "slideshow": { @@ -877,7 +878,7 @@ }, { "cell_type": "markdown", - "id": "702e550e", + "id": "657bf893", "metadata": { "editable": true, "slideshow": { @@ -892,7 +893,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6598e9ea", + "id": "7c4faa92", "metadata": { "editable": true, "slideshow": { @@ -927,7 +928,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a821e631", + "id": "4d050712", "metadata": { "editable": true, "slideshow": { @@ -943,7 +944,7 @@ }, { "cell_type": "markdown", - "id": "18d22e7a", + "id": "2bd418b1", "metadata": { "editable": true, "slideshow": { @@ -960,7 +961,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbeb5212", + "id": "55715f0e", "metadata": { "editable": true, "slideshow": { @@ -998,7 +999,7 @@ }, { "cell_type": "markdown", - "id": "1db9151d", + "id": "33598839", "metadata": { "editable": true, "slideshow": { @@ -1009,16 +1010,14 @@ "source": [ "

Task 2.2 Visualizing the results

\n", "\n", - "The code above creates a small widget to interact with the results of this analysis. You'll see in the masking code that there is a free parameter called \"threshold\". This threshold affects the size of the mask. If you modify the threshold below, you will see that different objects appear and disappear.\n", - "You can also look at different images by sliding over the index.\n", - "\n", + "The code above creates a small widget to interact with the results of this analysis. Look through the samples for a while before answering the questions below.\n", "
" ] }, { "cell_type": "code", "execution_count": null, - "id": "f2289980", + "id": "490db899", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1039,7 +1038,7 @@ }, { "cell_type": "markdown", - "id": "7e70aea0", + "id": "18dce2c2", "metadata": { "editable": true, "slideshow": { @@ -1056,7 +1055,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2aa66745", + "id": "eda303d1", "metadata": { "editable": true, "slideshow": { @@ -1073,7 +1072,7 @@ }, { "cell_type": "markdown", - "id": "e7b4b0c4", + "id": "09cc4c08", "metadata": { "editable": true, "slideshow": { @@ -1094,7 +1093,7 @@ }, { "cell_type": "markdown", - "id": "aa6737eb", + "id": "bd34722b", "metadata": {}, "source": [ "\n", @@ -1120,7 +1119,7 @@ }, { "cell_type": "markdown", - "id": "881532dc", + "id": "53feb16f", "metadata": {}, "source": [ "

Task 2.3: Use random noise as a baseline

\n", @@ -1132,7 +1131,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f74d13f9", + "id": "9d6c65e1", "metadata": { "editable": true, "slideshow": { @@ -1154,7 +1153,7 @@ }, { "cell_type": "markdown", - "id": "26a3a9ae", + "id": "e97700bc", "metadata": { "editable": true, "slideshow": { @@ -1172,7 +1171,7 @@ { "cell_type": "code", "execution_count": null, - "id": "146141b0", + "id": "b9e5b23e", "metadata": { "editable": true, "slideshow": { @@ -1196,7 +1195,7 @@ }, { "cell_type": "markdown", - "id": "4b5ab7d6", + "id": "5cdde305", "metadata": { "editable": true, "slideshow": { @@ -1215,7 +1214,7 @@ }, { "cell_type": "markdown", - "id": "00835b8e", + "id": "1a15cf83", "metadata": {}, "source": [ "

BONUS Task: Using different attributions.

\n", @@ -1230,7 +1229,7 @@ }, { "cell_type": "markdown", - "id": "b77119bd", + "id": "9bb8d816", "metadata": {}, "source": [ "

Checkpoint 2

\n", @@ -1247,7 +1246,7 @@ }, { "cell_type": "markdown", - "id": "d3144040", + "id": "a31ef8d6", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1280,7 +1279,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17740816", + "id": "9089850c", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1300,7 +1299,7 @@ }, { "cell_type": "markdown", - "id": "70d7868b", + "id": "36b89586", "metadata": { "editable": true, "slideshow": { @@ -1316,7 +1315,7 @@ }, { "cell_type": "markdown", - "id": "6831b495", + "id": "aff1b90b", "metadata": { "lines_to_next_cell": 2 }, @@ -1344,7 +1343,7 @@ { "cell_type": "code", "execution_count": null, - "id": "675d4413", + "id": "a8981d1e", "metadata": { "editable": true, "slideshow": { @@ -1402,7 +1401,7 @@ }, { "cell_type": "markdown", - "id": "aef941da", + "id": "479b5de4", "metadata": { "editable": true, "slideshow": { @@ -1434,7 +1433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ede744ae", + "id": "d308b66b", "metadata": { "editable": true, "slideshow": { @@ -1555,7 +1554,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f254de0f", + "id": "09c3fa55", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1573,7 +1572,7 @@ }, { "cell_type": "markdown", - "id": "b47336e2", + "id": "f91db612", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1589,7 +1588,7 @@ { "cell_type": "code", "execution_count": null, - "id": "264eb803", + "id": "b6d5d5ee", "metadata": { "editable": true, "slideshow": { @@ -1624,7 +1623,7 @@ }, { "cell_type": "markdown", - "id": "23eab143", + "id": "8d48e4af", "metadata": { "editable": true, "slideshow": { @@ -1648,7 +1647,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1688748", + "id": "8482184f", "metadata": { "editable": true, "slideshow": { @@ -1664,7 +1663,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e1083abd", + "id": "53c14194", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1692,7 +1691,7 @@ }, { "cell_type": "markdown", - "id": "ca38e44b", + "id": "706a5f18", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1714,7 +1713,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f03260fa", + "id": "9d36c59f", "metadata": { "editable": true, "slideshow": { @@ -1814,7 +1813,7 @@ }, { "cell_type": "markdown", - "id": "a2ff18d1", + "id": "30b90f36", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1830,7 +1829,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc25feef", + "id": "a6e2d5a8", "metadata": { "editable": true, "slideshow": { @@ -1872,7 +1871,7 @@ }, { "cell_type": "markdown", - "id": "4c368b6e", + "id": "519aba30", "metadata": { "editable": true, "slideshow": { @@ -1891,7 +1890,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30f3460b", + "id": "597f44ce", "metadata": { "editable": true, "slideshow": { @@ -1911,7 +1910,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f91fc894", + "id": "7370994c", "metadata": { "editable": true, "slideshow": { @@ -1931,7 +1930,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5aaa565", + "id": "861dedd4", "metadata": { "editable": true, "slideshow": { @@ -1956,7 +1955,7 @@ }, { "cell_type": "markdown", - "id": "b53579fb", + "id": "09c3f362", "metadata": { "editable": true, "slideshow": { @@ -1972,7 +1971,7 @@ }, { "cell_type": "markdown", - "id": "b1d0f170", + "id": "6ee205dd", "metadata": { "editable": true, "slideshow": { @@ -1992,7 +1991,7 @@ }, { "cell_type": "markdown", - "id": "4d362a99", + "id": "765089a1", "metadata": { "editable": true, "slideshow": { @@ -2006,7 +2005,7 @@ }, { "cell_type": "markdown", - "id": "6f21ef10", + "id": "8959c219", "metadata": { "editable": true, "slideshow": { @@ -2026,7 +2025,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04db57f7", + "id": "0fd97600", "metadata": { "editable": true, "slideshow": { @@ -2064,7 +2063,7 @@ }, { "cell_type": "markdown", - "id": "49e97fe6", + "id": "ee456f57", "metadata": { "editable": true, "slideshow": { @@ -2079,7 +2078,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c06945c", + "id": "20adc855", "metadata": { "editable": true, "slideshow": { @@ -2095,7 +2094,7 @@ }, { "cell_type": "markdown", - "id": "e7b1955e", + "id": "dfa1b783", "metadata": { "editable": true, "slideshow": { @@ -2110,7 +2109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5575a3ea", + "id": "0887b0da", "metadata": { "editable": true, "slideshow": { @@ -2126,7 +2125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "680ae239", + "id": "67b7c1e8", "metadata": { "editable": true, "slideshow": { @@ -2185,7 +2184,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf8c4d19", + "id": "0b4bfcf0", "metadata": { "editable": true, "slideshow": { @@ -2201,7 +2200,7 @@ { "cell_type": "code", "execution_count": null, - "id": "964bfe5f", + "id": "2eb0e50e", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2219,7 +2218,7 @@ }, { "cell_type": "markdown", - "id": "28af99fa", + "id": "483af604", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2240,7 +2239,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e6a1d4f4", + "id": "c59702f9", "metadata": { "editable": true, "slideshow": { @@ -2275,7 +2274,7 @@ }, { "cell_type": "markdown", - "id": "07382835", + "id": "c6bffc67", "metadata": { "editable": true, "slideshow": { @@ -2301,7 +2300,7 @@ { "cell_type": "code", "execution_count": null, - "id": "929852b6", + "id": "42906ce7", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2322,7 +2321,7 @@ }, { "cell_type": "markdown", - "id": "c4f22741", + "id": "c4500183", "metadata": { "editable": true, "slideshow": { @@ -2350,7 +2349,7 @@ { "cell_type": "code", "execution_count": null, - "id": "916757af", + "id": "17b2af0c", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2377,7 +2376,7 @@ }, { "cell_type": "markdown", - "id": "8a3551ec", + "id": "615c9449", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2393,7 +2392,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f216cf3b", + "id": "4c0e1278", "metadata": { "editable": true, "slideshow": { @@ -2411,7 +2410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3dd9b3a", + "id": "92401b45", "metadata": { "editable": true, "slideshow": { @@ -2427,7 +2426,7 @@ }, { "cell_type": "markdown", - "id": "e19c3763", + "id": "57f8cca6", "metadata": { "editable": true, "slideshow": { @@ -2448,7 +2447,7 @@ }, { "cell_type": "markdown", - "id": "8e2815ae", + "id": "d81bbc95", "metadata": { "editable": true, "slideshow": { @@ -2467,7 +2466,7 @@ }, { "cell_type": "markdown", - "id": "e8cafe4d", + "id": "406e8777", "metadata": { "editable": true, "slideshow": { @@ -2481,7 +2480,7 @@ }, { "cell_type": "markdown", - "id": "07ee4695", + "id": "69ee980b", "metadata": {}, "source": [ "At this point we have:\n", @@ -2496,7 +2495,7 @@ }, { "cell_type": "markdown", - "id": "4a88ed1f", + "id": "f7dbe347", "metadata": {}, "source": [ "

Task 5.1 Get sucessfully converted samples

\n", @@ -2517,7 +2516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f355add3", + "id": "28ec78be", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2549,7 +2548,7 @@ }, { "cell_type": "markdown", - "id": "e7453b0b", + "id": "5518deea", "metadata": { "editable": true, "slideshow": { @@ -2564,7 +2563,7 @@ { "cell_type": "code", "execution_count": null, - "id": "793d2386", + "id": "c813f006", "metadata": { "editable": true, "slideshow": { @@ -2580,7 +2579,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0dfca96d", + "id": "d599f126", "metadata": { "editable": true, "slideshow": { @@ -2605,7 +2604,7 @@ }, { "cell_type": "markdown", - "id": "bfc2938b", + "id": "877db1dc", "metadata": { "editable": true, "slideshow": { @@ -2625,7 +2624,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ce2d770", + "id": "dcb7288f", "metadata": { "editable": true, "slideshow": { @@ -2642,7 +2641,7 @@ { "cell_type": "code", "execution_count": null, - "id": "96eb3924", + "id": "95239b4b", "metadata": { "editable": true, "slideshow": { @@ -2677,7 +2676,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b219aeea", + "id": "8b968d7c", "metadata": {}, "outputs": [], "source": [] @@ -2685,7 +2684,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0c89209", + "id": "84835390", "metadata": { "editable": true, "slideshow": { @@ -2770,7 +2769,7 @@ }, { "cell_type": "markdown", - "id": "9d542c9c", + "id": "c732d7a7", "metadata": { "editable": true, "slideshow": { @@ -2790,7 +2789,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e506402a", + "id": "23225866", "metadata": { "editable": true, "slideshow": { @@ -2805,7 +2804,7 @@ }, { "cell_type": "markdown", - "id": "89c3e1b9", + "id": "1ca835c5", "metadata": {}, "source": [ "HELP!!! Interactive (still!) doesn't work. No worries... uncomment the following cell and choose your index and threshold by typing them out." @@ -2814,7 +2813,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb660067", + "id": "771fb28f", "metadata": { "editable": true, "slideshow": { @@ -2834,7 +2833,7 @@ }, { "cell_type": "markdown", - "id": "1a5cfcbb", + "id": "3905e9a7", "metadata": { "editable": true, "slideshow": { @@ -2856,7 +2855,7 @@ }, { "cell_type": "markdown", - "id": "1584192f", + "id": "578e5831", "metadata": { "editable": true, "slideshow": { @@ -2873,7 +2872,7 @@ }, { "cell_type": "markdown", - "id": "9f6d101e", + "id": "2f8cb30e", "metadata": { "editable": true, "slideshow": { diff --git a/solution.ipynb b/solution.ipynb index ce40e13..f3f9237 100644 --- a/solution.ipynb +++ b/solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fd37c210", + "id": "93f0f7f9", "metadata": { "editable": true, "lines_to_next_cell": 0, @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "ac735c94", + "id": "9a25e710", "metadata": {}, "source": [ "
\n", @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "d356c176", + "id": "f9b96c13", "metadata": {}, "source": [ "

Start here (AKA checkpoint 0)

\n", @@ -45,7 +45,7 @@ }, { "cell_type": "markdown", - "id": "8c9a7145", + "id": "0c339e3d", "metadata": { "editable": true, "slideshow": { @@ -62,7 +62,7 @@ }, { "cell_type": "markdown", - "id": "fc084b21", + "id": "7f524106", "metadata": {}, "source": [ "\n", @@ -76,7 +76,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1fd9f15a", + "id": "dca1c9b7", "metadata": { "lines_to_next_cell": 2, "tags": [] @@ -124,7 +124,7 @@ }, { "cell_type": "markdown", - "id": "6c752cc9", + "id": "2f4f148f", "metadata": { "lines_to_next_cell": 2 }, @@ -143,7 +143,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d29189ad", + "id": "faa2b411", "metadata": { "tags": [] }, @@ -180,7 +180,7 @@ }, { "cell_type": "markdown", - "id": "6ba6f8a6", + "id": "ceb0525e", "metadata": {}, "source": [ "We make a `torch` `DataLoader` that takes our `sampler` to create batches of eight images and their corresponding labels.\n", @@ -190,7 +190,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a77c6ca", + "id": "a15b4bac", "metadata": { "tags": [] }, @@ -202,7 +202,7 @@ }, { "cell_type": "markdown", - "id": "eb486468", + "id": "5892ab7f", "metadata": {}, "source": [ "The cell below visualizes a single, randomly chosen batch from the training data loader. Feel free to execute this cell multiple times to get a feeling for the dataset and that your sampler gives batches of evenly distributed synapse types." @@ -211,7 +211,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f47a6bbc", + "id": "5aab255a", "metadata": { "lines_to_next_cell": 2, "tags": [] @@ -240,7 +240,7 @@ }, { "cell_type": "markdown", - "id": "14e5abc1", + "id": "025648fb", "metadata": { "lines_to_next_cell": 2 }, @@ -256,7 +256,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5763a1e5", + "id": "e7e2b968", "metadata": { "tags": [] }, @@ -330,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "ef4c6388", + "id": "c544bd0d", "metadata": {}, "source": [ "We'll start by creating the VGG with the default parameters and push it to a GPU if there is one available. Then we'll define the training loss and optimizer.\n", @@ -340,7 +340,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c07c442", + "id": "4c6fca99", "metadata": { "tags": [] }, @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ceef84d", + "id": "4929dd7f", "metadata": { "tags": [] }, @@ -372,7 +372,7 @@ }, { "cell_type": "markdown", - "id": "3c4c86bc", + "id": "73e2d8ad", "metadata": {}, "source": [ "

Task 1.1: Train the VGG Network

\n", @@ -385,7 +385,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1bff816", + "id": "4c29af1d", "metadata": { "tags": [] }, @@ -398,7 +398,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a7529b8", + "id": "a3fe5b41", "metadata": { "editable": true, "slideshow": { @@ -419,7 +419,7 @@ }, { "cell_type": "markdown", - "id": "984ef0c8", + "id": "6fb96afe", "metadata": { "editable": true, "slideshow": { @@ -434,7 +434,7 @@ { "cell_type": "code", "execution_count": null, - "id": "206b60ee", + "id": "c1f21c05", "metadata": { "editable": true, "slideshow": { @@ -474,7 +474,7 @@ }, { "cell_type": "markdown", - "id": "1af3b9ca", + "id": "9c473df0", "metadata": { "editable": true, "slideshow": { @@ -502,7 +502,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5009f251", + "id": "cae63f62", "metadata": { "editable": true, "slideshow": { @@ -542,7 +542,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ddf1e435", + "id": "3f9d4714", "metadata": { "editable": true, "slideshow": { @@ -592,7 +592,7 @@ }, { "cell_type": "markdown", - "id": "fb19b44c", + "id": "bfee4910", "metadata": { "editable": true, "slideshow": { @@ -607,7 +607,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57e2cc5c", + "id": "41bc31bd", "metadata": { "editable": true, "slideshow": { @@ -628,7 +628,7 @@ }, { "cell_type": "markdown", - "id": "d720752f", + "id": "cc91973f", "metadata": { "editable": true, "slideshow": { @@ -644,7 +644,7 @@ }, { "cell_type": "markdown", - "id": "b2ece455", + "id": "7324a440", "metadata": {}, "source": [ "And now, let's test it!" @@ -653,7 +653,7 @@ { "cell_type": "code", "execution_count": null, - "id": "52033d75", + "id": "ef0770ee", "metadata": { "editable": true, "slideshow": { @@ -670,7 +670,7 @@ }, { "cell_type": "markdown", - "id": "090d6639", + "id": "57241755", "metadata": { "editable": true, "slideshow": { @@ -685,7 +685,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8103b2e9", + "id": "953cad3a", "metadata": { "editable": true, "slideshow": { @@ -704,7 +704,7 @@ " )\n", " model.load_state_dict(checkpoint[\"model_state_dict\"])\n", "\n", - " \n", + "\n", "# And check the (hopefully much better) accuracy\n", "predictions, ground_truths = predict(test_dataset, \"Test\")\n", "accuracy = accuracy_score(ground_truths, predictions)\n", @@ -713,7 +713,7 @@ }, { "cell_type": "markdown", - "id": "497a5bdc", + "id": "45d26644", "metadata": { "editable": true, "slideshow": { @@ -732,7 +732,7 @@ }, { "cell_type": "markdown", - "id": "95f553df", + "id": "39ae027f", "metadata": {}, "source": [ "Let's plot the confusion matrix." @@ -741,7 +741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7f01a41e", + "id": "bc315793", "metadata": { "editable": true, "slideshow": { @@ -811,7 +811,7 @@ }, { "cell_type": "markdown", - "id": "b9d3f860", + "id": "3c8cf7bb", "metadata": { "editable": true, "slideshow": { @@ -833,7 +833,7 @@ }, { "cell_type": "markdown", - "id": "7f924ab4", + "id": "ce4ccb36", "metadata": {}, "source": [ "

Checkpoint 1

\n", @@ -851,7 +851,7 @@ }, { "cell_type": "markdown", - "id": "965f2187", + "id": "be1f14b2", "metadata": {}, "source": [ "# Part 2: Masking the relevant part of the image\n", @@ -861,7 +861,7 @@ }, { "cell_type": "markdown", - "id": "c7247e66", + "id": "41464574", "metadata": {}, "source": [ "## Attributions through integrated gradients\n", @@ -874,7 +874,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55aee79b", + "id": "af08ae72", "metadata": { "editable": true, "slideshow": { @@ -891,7 +891,7 @@ }, { "cell_type": "markdown", - "id": "e8ab8c90", + "id": "9fbf1572", "metadata": { "editable": true, "slideshow": { @@ -911,7 +911,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84c50e1c", + "id": "897dd327", "metadata": { "editable": true, "slideshow": { @@ -934,7 +934,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8909410", + "id": "27a769fd", "metadata": { "editable": true, "slideshow": { @@ -962,7 +962,7 @@ { "cell_type": "code", "execution_count": null, - "id": "220bacb7", + "id": "31fa10dc", "metadata": { "editable": true, "slideshow": { @@ -979,7 +979,7 @@ }, { "cell_type": "markdown", - "id": "702e550e", + "id": "657bf893", "metadata": { "editable": true, "slideshow": { @@ -994,7 +994,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6598e9ea", + "id": "7c4faa92", "metadata": { "editable": true, "slideshow": { @@ -1029,7 +1029,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a821e631", + "id": "4d050712", "metadata": { "editable": true, "slideshow": { @@ -1045,7 +1045,7 @@ }, { "cell_type": "markdown", - "id": "18d22e7a", + "id": "2bd418b1", "metadata": { "editable": true, "slideshow": { @@ -1062,7 +1062,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbeb5212", + "id": "55715f0e", "metadata": { "editable": true, "slideshow": { @@ -1100,7 +1100,7 @@ }, { "cell_type": "markdown", - "id": "1db9151d", + "id": "33598839", "metadata": { "editable": true, "slideshow": { @@ -1111,16 +1111,14 @@ "source": [ "

Task 2.2 Visualizing the results

\n", "\n", - "The code above creates a small widget to interact with the results of this analysis. You'll see in the masking code that there is a free parameter called \"threshold\". This threshold affects the size of the mask. If you modify the threshold below, you will see that different objects appear and disappear.\n", - "You can also look at different images by sliding over the index.\n", - "\n", + "The code above creates a small widget to interact with the results of this analysis. Look through the samples for a while before answering the questions below.\n", "
" ] }, { "cell_type": "code", "execution_count": null, - "id": "f2289980", + "id": "490db899", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1141,7 +1139,7 @@ }, { "cell_type": "markdown", - "id": "7e70aea0", + "id": "18dce2c2", "metadata": { "editable": true, "slideshow": { @@ -1158,7 +1156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2aa66745", + "id": "eda303d1", "metadata": { "editable": true, "slideshow": { @@ -1175,7 +1173,7 @@ }, { "cell_type": "markdown", - "id": "e7b4b0c4", + "id": "09cc4c08", "metadata": { "editable": true, "slideshow": { @@ -1196,7 +1194,7 @@ }, { "cell_type": "markdown", - "id": "aa6737eb", + "id": "bd34722b", "metadata": {}, "source": [ "\n", @@ -1222,7 +1220,7 @@ }, { "cell_type": "markdown", - "id": "881532dc", + "id": "53feb16f", "metadata": {}, "source": [ "

Task 2.3: Use random noise as a baseline

\n", @@ -1234,7 +1232,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f74d13f9", + "id": "9d6c65e1", "metadata": { "editable": true, "slideshow": { @@ -1257,7 +1255,7 @@ { "cell_type": "code", "execution_count": null, - "id": "927257fe", + "id": "f3f07eb8", "metadata": { "editable": true, "slideshow": { @@ -1286,7 +1284,7 @@ }, { "cell_type": "markdown", - "id": "26a3a9ae", + "id": "e97700bc", "metadata": { "editable": true, "slideshow": { @@ -1304,7 +1302,7 @@ { "cell_type": "code", "execution_count": null, - "id": "146141b0", + "id": "b9e5b23e", "metadata": { "editable": true, "slideshow": { @@ -1329,7 +1327,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20267a83", + "id": "0ba5b4ff", "metadata": { "editable": true, "slideshow": { @@ -1360,7 +1358,7 @@ }, { "cell_type": "markdown", - "id": "4b5ab7d6", + "id": "5cdde305", "metadata": { "editable": true, "slideshow": { @@ -1379,7 +1377,7 @@ }, { "cell_type": "markdown", - "id": "00835b8e", + "id": "1a15cf83", "metadata": {}, "source": [ "

BONUS Task: Using different attributions.

\n", @@ -1394,7 +1392,7 @@ }, { "cell_type": "markdown", - "id": "b77119bd", + "id": "9bb8d816", "metadata": {}, "source": [ "

Checkpoint 2

\n", @@ -1411,7 +1409,7 @@ }, { "cell_type": "markdown", - "id": "d3144040", + "id": "a31ef8d6", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1444,7 +1442,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17740816", + "id": "9089850c", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1464,7 +1462,7 @@ }, { "cell_type": "markdown", - "id": "70d7868b", + "id": "36b89586", "metadata": { "editable": true, "slideshow": { @@ -1480,7 +1478,7 @@ }, { "cell_type": "markdown", - "id": "6831b495", + "id": "aff1b90b", "metadata": { "lines_to_next_cell": 2 }, @@ -1508,7 +1506,7 @@ { "cell_type": "code", "execution_count": null, - "id": "675d4413", + "id": "a8981d1e", "metadata": { "editable": true, "slideshow": { @@ -1566,7 +1564,7 @@ }, { "cell_type": "markdown", - "id": "aef941da", + "id": "479b5de4", "metadata": { "editable": true, "slideshow": { @@ -1598,7 +1596,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ede744ae", + "id": "d308b66b", "metadata": { "editable": true, "slideshow": { @@ -1719,7 +1717,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f254de0f", + "id": "09c3fa55", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1737,7 +1735,7 @@ }, { "cell_type": "markdown", - "id": "b47336e2", + "id": "f91db612", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1753,7 +1751,7 @@ { "cell_type": "code", "execution_count": null, - "id": "264eb803", + "id": "b6d5d5ee", "metadata": { "editable": true, "slideshow": { @@ -1788,7 +1786,7 @@ }, { "cell_type": "markdown", - "id": "23eab143", + "id": "8d48e4af", "metadata": { "editable": true, "slideshow": { @@ -1812,7 +1810,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1688748", + "id": "8482184f", "metadata": { "editable": true, "slideshow": { @@ -1828,7 +1826,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e1083abd", + "id": "53c14194", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1856,7 +1854,7 @@ }, { "cell_type": "markdown", - "id": "ca38e44b", + "id": "706a5f18", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -1878,7 +1876,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f03260fa", + "id": "9d36c59f", "metadata": { "editable": true, "slideshow": { @@ -1979,7 +1977,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b777eed9", + "id": "b43ee77c", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2083,7 +2081,7 @@ }, { "cell_type": "markdown", - "id": "a2ff18d1", + "id": "30b90f36", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2099,7 +2097,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc25feef", + "id": "a6e2d5a8", "metadata": { "editable": true, "slideshow": { @@ -2141,7 +2139,7 @@ }, { "cell_type": "markdown", - "id": "4c368b6e", + "id": "519aba30", "metadata": { "editable": true, "slideshow": { @@ -2160,7 +2158,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30f3460b", + "id": "597f44ce", "metadata": { "editable": true, "slideshow": { @@ -2180,7 +2178,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f91fc894", + "id": "7370994c", "metadata": { "editable": true, "slideshow": { @@ -2200,7 +2198,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5aaa565", + "id": "861dedd4", "metadata": { "editable": true, "slideshow": { @@ -2225,7 +2223,7 @@ }, { "cell_type": "markdown", - "id": "b53579fb", + "id": "09c3f362", "metadata": { "editable": true, "slideshow": { @@ -2241,7 +2239,7 @@ }, { "cell_type": "markdown", - "id": "b1d0f170", + "id": "6ee205dd", "metadata": { "editable": true, "slideshow": { @@ -2261,7 +2259,7 @@ }, { "cell_type": "markdown", - "id": "4d362a99", + "id": "765089a1", "metadata": { "editable": true, "slideshow": { @@ -2275,7 +2273,7 @@ }, { "cell_type": "markdown", - "id": "6f21ef10", + "id": "8959c219", "metadata": { "editable": true, "slideshow": { @@ -2295,7 +2293,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04db57f7", + "id": "0fd97600", "metadata": { "editable": true, "slideshow": { @@ -2333,7 +2331,7 @@ }, { "cell_type": "markdown", - "id": "49e97fe6", + "id": "ee456f57", "metadata": { "editable": true, "slideshow": { @@ -2348,7 +2346,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c06945c", + "id": "20adc855", "metadata": { "editable": true, "slideshow": { @@ -2364,7 +2362,7 @@ }, { "cell_type": "markdown", - "id": "e7b1955e", + "id": "dfa1b783", "metadata": { "editable": true, "slideshow": { @@ -2379,7 +2377,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5575a3ea", + "id": "0887b0da", "metadata": { "editable": true, "slideshow": { @@ -2395,7 +2393,7 @@ { "cell_type": "code", "execution_count": null, - "id": "680ae239", + "id": "67b7c1e8", "metadata": { "editable": true, "slideshow": { @@ -2454,7 +2452,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf8c4d19", + "id": "0b4bfcf0", "metadata": { "editable": true, "slideshow": { @@ -2470,7 +2468,7 @@ { "cell_type": "code", "execution_count": null, - "id": "964bfe5f", + "id": "2eb0e50e", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2488,7 +2486,7 @@ }, { "cell_type": "markdown", - "id": "28af99fa", + "id": "483af604", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2509,7 +2507,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e6a1d4f4", + "id": "c59702f9", "metadata": { "editable": true, "slideshow": { @@ -2544,7 +2542,7 @@ }, { "cell_type": "markdown", - "id": "07382835", + "id": "c6bffc67", "metadata": { "editable": true, "slideshow": { @@ -2570,7 +2568,7 @@ { "cell_type": "code", "execution_count": null, - "id": "929852b6", + "id": "42906ce7", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2592,7 +2590,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b57b5616", + "id": "98131f0f", "metadata": { "editable": true, "slideshow": { @@ -2618,7 +2616,7 @@ }, { "cell_type": "markdown", - "id": "c4f22741", + "id": "c4500183", "metadata": { "editable": true, "slideshow": { @@ -2646,7 +2644,7 @@ { "cell_type": "code", "execution_count": null, - "id": "916757af", + "id": "17b2af0c", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2673,7 +2671,7 @@ }, { "cell_type": "markdown", - "id": "8a3551ec", + "id": "615c9449", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2689,7 +2687,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f216cf3b", + "id": "4c0e1278", "metadata": { "editable": true, "slideshow": { @@ -2707,7 +2705,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3dd9b3a", + "id": "92401b45", "metadata": { "editable": true, "slideshow": { @@ -2723,7 +2721,7 @@ }, { "cell_type": "markdown", - "id": "e19c3763", + "id": "57f8cca6", "metadata": { "editable": true, "slideshow": { @@ -2744,7 +2742,7 @@ }, { "cell_type": "markdown", - "id": "8e2815ae", + "id": "d81bbc95", "metadata": { "editable": true, "slideshow": { @@ -2763,7 +2761,7 @@ }, { "cell_type": "markdown", - "id": "e8cafe4d", + "id": "406e8777", "metadata": { "editable": true, "slideshow": { @@ -2777,7 +2775,7 @@ }, { "cell_type": "markdown", - "id": "07ee4695", + "id": "69ee980b", "metadata": {}, "source": [ "At this point we have:\n", @@ -2792,7 +2790,7 @@ }, { "cell_type": "markdown", - "id": "4a88ed1f", + "id": "f7dbe347", "metadata": {}, "source": [ "

Task 5.1 Get sucessfully converted samples

\n", @@ -2813,7 +2811,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f355add3", + "id": "28ec78be", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2846,7 +2844,7 @@ { "cell_type": "code", "execution_count": null, - "id": "de605670", + "id": "3f1391ba", "metadata": { "editable": true, "lines_to_next_cell": 2, @@ -2882,7 +2880,7 @@ }, { "cell_type": "markdown", - "id": "e7453b0b", + "id": "5518deea", "metadata": { "editable": true, "slideshow": { @@ -2897,7 +2895,7 @@ { "cell_type": "code", "execution_count": null, - "id": "793d2386", + "id": "c813f006", "metadata": { "editable": true, "slideshow": { @@ -2913,7 +2911,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0dfca96d", + "id": "d599f126", "metadata": { "editable": true, "slideshow": { @@ -2938,7 +2936,7 @@ }, { "cell_type": "markdown", - "id": "bfc2938b", + "id": "877db1dc", "metadata": { "editable": true, "slideshow": { @@ -2958,7 +2956,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ce2d770", + "id": "dcb7288f", "metadata": { "editable": true, "slideshow": { @@ -2975,7 +2973,7 @@ { "cell_type": "code", "execution_count": null, - "id": "96eb3924", + "id": "95239b4b", "metadata": { "editable": true, "slideshow": { @@ -3010,7 +3008,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b219aeea", + "id": "8b968d7c", "metadata": {}, "outputs": [], "source": [] @@ -3018,7 +3016,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0c89209", + "id": "84835390", "metadata": { "editable": true, "slideshow": { @@ -3103,7 +3101,7 @@ }, { "cell_type": "markdown", - "id": "9d542c9c", + "id": "c732d7a7", "metadata": { "editable": true, "slideshow": { @@ -3123,7 +3121,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e506402a", + "id": "23225866", "metadata": { "editable": true, "slideshow": { @@ -3138,7 +3136,7 @@ }, { "cell_type": "markdown", - "id": "89c3e1b9", + "id": "1ca835c5", "metadata": {}, "source": [ "HELP!!! Interactive (still!) doesn't work. No worries... uncomment the following cell and choose your index and threshold by typing them out." @@ -3147,7 +3145,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb660067", + "id": "771fb28f", "metadata": { "editable": true, "slideshow": { @@ -3167,7 +3165,7 @@ }, { "cell_type": "markdown", - "id": "1a5cfcbb", + "id": "3905e9a7", "metadata": { "editable": true, "slideshow": { @@ -3189,7 +3187,7 @@ }, { "cell_type": "markdown", - "id": "1584192f", + "id": "578e5831", "metadata": { "editable": true, "slideshow": { @@ -3206,7 +3204,7 @@ }, { "cell_type": "markdown", - "id": "9f6d101e", + "id": "2f8cb30e", "metadata": { "editable": true, "slideshow": { @@ -3241,10 +3239,6 @@ "display_name": "09_knowledge_extraction", "language": "python", "name": "python3" - }, - "language_info": { - "name": "python", - "version": "3.10.4" } }, "nbformat": 4,