Skip to content

Commit ee91e3d

Browse files
committed
Lecture 10: ImageInspector removed
1 parent f87b7cf commit ee91e3d

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
1010
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
1111
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
1212
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
13-
ImageInspector = "b0ce21f1-0238-464b-b95f-8a4068743199"
1413
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
1514
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
1615
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

docs/src/lecture_10/exercises.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Plot all images which are ``9`` but were classified as ``7``.
307307

308308
To plot all these misclassified images, we find their indices and use the function `imageplot`. Since `y` are stored in the 1:10 format, we need to specify `classes`.
309309

310-
```@example gpuu
310+
```julia
311311
using ImageInspector
312312

313313
classes = 0:9
@@ -328,7 +328,7 @@ savefig("miss.svg") # hide
328328

329329

330330

331-
![](miss.svg)
331+
# ![](miss.svg)
332332

333333
We see that some of the nines could be recognized as a seven even by humans.
334334

@@ -377,7 +377,7 @@ train_or_load!(file_name, m)
377377

378378
Before plotting, we perform a for loop over the digits. Then ```onecold(y_train, classes) .== i``` creates a ```BitArray``` with ones if the condition is satisfied, and zeros if the condition is not satisfied. Then ```findall(???)``` selects all ones, and ```???[1:5]``` finds the first five indices. Since we need to plot the original image, and the images after the second and fourth layer (there is always a convolutional layer before the pooling layer), we save these values into ```z1```, ```z2``` and ```z3```. Then we need to access to desired channels and plot then via the `ImageInspector` package.
379379

380-
```@example gpuu
380+
```julia
381381
using ImageInspector
382382

383383
classes = 0:9
@@ -412,15 +412,15 @@ We plot and comment on three selected digits below.
412412

413413
Digit 0
414414

415-
![](Layers_0.svg)
415+
# ![](Layers_0.svg)
416416

417417
Digit 1
418418

419-
![](Layers_1.svg)
419+
# ![](Layers_1.svg)
420420

421421
Digit 9
422422

423-
![](Layers_9.svg)
423+
# ![](Layers_9.svg)
424424

425425
We may observe several things:
426426
- The functions inside the neural network do the same operations on all samples. The second row is always a black digit on a grey background.

docs/src/lecture_10/nn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```@setup nn
22
using Plots
33
using MLDatasets
4-
using ImageInspector
4+
# using ImageInspector
55
66
Core.eval(Main, :(using Flux)) # hide
77
ENV["DATADEPS_ALWAYS_ACCEPT"] = true
@@ -85,7 +85,7 @@ nothing # hide
8585

8686
We use the `imageplot` function to plot the images. To invert the colours, we need to call it with `1 .- X_train` instead of `X_train`.
8787

88-
```@example nn
88+
```julia
8989
using Plots
9090
using ImageInspector
9191

@@ -98,7 +98,7 @@ savefig("mnist_intro2.svg") # hide
9898
</p></details>
9999
```
100100

101-
![](mnist_intro2.svg)
101+
# ![](mnist_intro2.svg)
102102

103103

104104

0 commit comments

Comments
 (0)