Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added first version of episode 4 #58

Merged
merged 15 commits into from Jun 25, 2021
Merged

Added first version of episode 4 #58

merged 15 commits into from Jun 25, 2021

Conversation

dafnevk
Copy link
Collaborator

@dafnevk dafnevk commented Feb 4, 2021

First version of episode 4, using the CIFAR 10 dataset6. See #45 .

@dafnevk dafnevk marked this pull request as ready for review June 11, 2021 15:07
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
_episodes/04-networks-are-like-onions.md Outdated Show resolved Hide resolved
> {: .solution}
{: .challenge}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would cut the lesson here. We should try to focus on the exercises at this point and perhaps "train" an entire network with convolutions for the fun of it. I also end my review here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda agree that training a NN with convolutions here would be nice.
Introduce a concept and use it, then move on to the next concept.

I do feel that the drop out is very useful to have in this lesson as it helps a lot against overfitting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But would you suggest then to not introduce the pooling layers? Or only introduce them after we first train a CNN without pooling layers?
I think CNNs almost always include some sort of pooling and they are easier to understand than convolutional layers, so I prefer to keep them in the same episode.

But I will try to add an exercise in between, before we introduce the pooling layer.

@psteinb
Copy link
Collaborator

psteinb commented Jun 17, 2021

@dafnevk this is quite some material. I stopped my review after the convolution part. Reading through the remaining material with MaxPooling and Dropout, cutting the lesson after the convolutions appears quite natural to me.

A subsequent lesson could then add more types of layers for our onion and motivate them. I suggest to work towards merging this in for now and then start a separate PR on a split.

@psteinb psteinb assigned dafnevk and unassigned psteinb Jun 17, 2021
@dafnevk dafnevk requested review from psteinb and bpmweel June 18, 2021 12:38
Copy link
Collaborator

@bpmweel bpmweel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is very nice episode, but I have added a few small comments.

I see you're using the active voice a lot, which on the one had is good, but sometimes the sentence does not flow very well with it. For instance: 'We have a look at the CIFAR10 dataset', and 'We take a small sample of the data...'.

plt.title(class_names[train_labels[i,0]])
plt.show()
~~~
{: .language-python}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code is not correct, from the 2nd row onwards the labels do not match the pictures

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm that is strange! This requires some further investigations.
For me, the output pictures match the labels, but depending on the matplotlib version (I think, could also be a different package that causes this) the images are shown upside down.

> > We have 100 matrices with 3 * 3 * 3 = 27 values each so that gives 27 * 100 = 2700 weights. This is a magnitude of 100 less than the fully connected layer with 100 units!
> {: .solution}
{: .challenge}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would mention/reitterate something about the performance or expressiveness of convolutional layers or allude to it for later. Because now I had the though: "Ok it's a lot smaller, but that doesn't mean much"

> {: .solution}
{: .challenge}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda agree that training a NN with convolutions here would be nice.
Introduce a concept and use it, then move on to the next concept.

I do feel that the drop out is very useful to have in this lesson as it helps a lot against overfitting.

_episodes/04-networks-are-like-onions.md Show resolved Hide resolved
@dafnevk dafnevk requested a review from bpmweel June 24, 2021 08:09
Copy link
Collaborator

@bpmweel bpmweel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is good as it is. We can work out other issues later.

@bpmweel bpmweel merged commit 9353673 into gh-pages Jun 25, 2021
@dsmits dsmits deleted the episode4 branch January 17, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants