@exynos7 discovered two corrections that are needed to make 08_data_block.ipynb
execute without error.
Here are the steps involved
- Define the function
cos_1cycle_anneal
:
Copy the following lines of code :
@annealer
def cos_1cycle_anneal(start, high, end): return [sched_cos(start, high), sched_cos(high, end)]
and paste them into the 05_anneal.ipynb
notebook under the other schedule functions.
Note: The copied code is from the file nb_05.py
(in the /exp
folder). Do not edit the nb_05.py
file.
Then execute the last cell in the notebook 05_anneal.ipynb
:
!python notebook2script.py 05_anneal.ipynb
,
which will regenerate a corrected nb_05.py
file
- Add an
in_train
property to theRunner
class:
Copy the this line of code:
self.in_train = False
and paste it into the 05b_early_stopping.ipynb
notebook as the first line in the __init__
method of the Runner
class, just before the line
callbacks = listify(callbacks)
Note: The copied line of code is from the file nb_05b.py
(in the /exp
folder). Do not edit the nb_05b.py
file.
Then execute the last cell in the 05b_early_stopping.ipynb
notebook:
!python notebook2script.py
05b_early_stopping.ipynb`.
This regenerates a corrected nb_05b.py
file
After you have completed these two steps, the notebook 08_data_block.ipynb
should run successfully.