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

Add section on hyperparameter tuning #437

Merged
merged 10 commits into from
May 20, 2024
Merged

Conversation

svenvanderburg
Copy link
Collaborator

@svenvanderburg svenvanderburg commented Jan 24, 2024

Fixes #351

@Reviewer: This is now in episode 4, I was thinking to maybe put it together with transfer learning in the new episode 5 (See #349). Episode 5 could then be called 'advanced deep learning concepts'.

Copy link

github-actions bot commented Jan 24, 2024

❌ DANGER ❌

This pull request has modified workflows that created output. Close this now.

github-actions bot pushed a commit that referenced this pull request Jan 24, 2024
github-actions bot pushed a commit that referenced this pull request Jan 24, 2024
Copy link
Collaborator

@carschno carschno left a comment

Choose a reason for hiding this comment

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

Looks good to me. I added a few minor remarks.
This PR is unrelated to the changes here, but perhaps a good occasion to merge in: #451

episodes/4-advanced-layer-types.Rmd Outdated Show resolved Hide resolved
The goal is to show that hyperparameter tuning can be done easily with `keras_tuner`, not to memorize all the exact syntax of how to do it. This will probably save you half an hour of participants typing over code that they already know from before. In addition, on really slow machines running the grid search could possibly take more than 10 minutes.
:::

In general if you are varying hyperparameters (such as the dropout rate) to find the combination of hyperparameters with the best model performance this is called hyperparameter tuning. A naive way to do this is to write a for-loop and train a slightly different model in every cycle.
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 a sentence with a general reminder to define what hyperparameters are would be useful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in c38b110

episodes/4-advanced-layer-types.Rmd Show resolved Hide resolved
episodes/4-advanced-layer-types.Rmd Outdated Show resolved Hide resolved
episodes/4-advanced-layer-types.Rmd Outdated Show resolved Hide resolved
episodes/4-advanced-layer-types.Rmd Outdated Show resolved Hide resolved
@svenvanderburg
Copy link
Collaborator Author

Thanks for reviewing @carschno. We discussed that this will conflict with #448, in the sense that the output and solutions of the exercises will not match the new dataset. To be updated!

carschno and others added 2 commits April 29, 2024 14:05
Fix path to image: remove leading slash.
…-intro into hyperparameter-tuning

 Conflicts:
	episodes/4-advanced-layer-types.Rmd
github-actions bot pushed a commit that referenced this pull request May 20, 2024
@svenvanderburg
Copy link
Collaborator Author

I made the results reflect the new dollarstreet dataset, since I didn't change any content since @carschno' review, I will merge this now.

@svenvanderburg svenvanderburg merged commit 9da1b65 into main May 20, 2024
3 checks passed
@svenvanderburg svenvanderburg deleted the hyperparameter-tuning branch May 20, 2024 11:47
github-actions bot pushed a commit that referenced this pull request May 20, 2024
Auto-generated via {sandpaper}
Source  : 9da1b65
Branch  : main
Author  : Sven van der Burg <[email protected]>
Time    : 2024-05-20 11:47:51 +0000
Message : Add section on hyperparameter tuning (#437)

* Add section on hyperparameter tuning

* Fix path to image: remove leading slash.

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Improve explanations of hyperparameter tuning

* Update hyperparamter tuning section for dollar street dataset

---------

Co-authored-by: Carsten Schnober <[email protected]>
Co-authored-by: Carsten Schnober <[email protected]>
github-actions bot pushed a commit that referenced this pull request May 20, 2024
Auto-generated via {sandpaper}
Source  : 176e0c8
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-05-20 11:48:40 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 9da1b65
Branch  : main
Author  : Sven van der Burg <[email protected]>
Time    : 2024-05-20 11:47:51 +0000
Message : Add section on hyperparameter tuning (#437)

* Add section on hyperparameter tuning

* Fix path to image: remove leading slash.

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Improve explanations of hyperparameter tuning

* Update hyperparamter tuning section for dollar street dataset

---------

Co-authored-by: Carsten Schnober <[email protected]>
Co-authored-by: Carsten Schnober <[email protected]>
github-actions bot pushed a commit that referenced this pull request May 21, 2024
Auto-generated via {sandpaper}
Source  : 9da1b65
Branch  : main
Author  : Sven van der Burg <[email protected]>
Time    : 2024-05-20 11:47:51 +0000
Message : Add section on hyperparameter tuning (#437)

* Add section on hyperparameter tuning

* Fix path to image: remove leading slash.

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Improve explanations of hyperparameter tuning

* Update hyperparamter tuning section for dollar street dataset

---------

Co-authored-by: Carsten Schnober <[email protected]>
Co-authored-by: Carsten Schnober <[email protected]>
github-actions bot pushed a commit that referenced this pull request May 21, 2024
Auto-generated via {sandpaper}
Source  : 1535d4b
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-05-21 00:53:10 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : 9da1b65
Branch  : main
Author  : Sven van der Burg <[email protected]>
Time    : 2024-05-20 11:47:51 +0000
Message : Add section on hyperparameter tuning (#437)

* Add section on hyperparameter tuning

* Fix path to image: remove leading slash.

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Update episodes/4-advanced-layer-types.Rmd

Co-authored-by: Carsten Schnober <[email protected]>

* Improve explanations of hyperparameter tuning

* Update hyperparamter tuning section for dollar street dataset

---------

Co-authored-by: Carsten Schnober <[email protected]>
Co-authored-by: Carsten Schnober <[email protected]>
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.

Add hyperparameter tuning to episode 3
2 participants