"p2ch14_malben_baseline.ipynb" references saved models not in the repo
STRZGR opened this issue · comments
The notebook "p2ch14_malben_baseline.ipynb" uses two saved models that are not
included in this repository:
- 'data/part2/models/cls_2020-02-08_01.19.40_finetune-head.best.state'
- 'data/part2/models/cls_2020-02-08_00.19.45_finetune-depth2.best.state'
Hello, may I know how you solve this problem? Because I am facing the same situation now.
Someone else e-mailed me last month with the exact same question, so I'm just going to post the response I gave them.
From the best of my recollection, these files are not available because you will be creating new models when you run
run('p2ch14.prepcache.LunaPrepCacheApp')
and
run('p2ch14.training.ClassificationTrainingApp', f'--epochs=100', 'nodule-nonnodule')
on your local machine/cloud instance, and you should use the files created when you run this function. (The code is from https://github.com/deep-learning-with-pytorch/dlwpt-code/blob/master/p2_run_everything.ipynb, under the heading for Chapter 14.)
After you run the code you should be able to find the files ls_<TIMESTAMP>_final-nodule-nonnodule.best.state
and cls_<TIMESTAMP>_final-nodule-nonnodule.best.state
in your local directory ../data-unversioned/part2/models/p2ch14
.
I closed the issue when I realized that we should just be using our local files, since this wasn't a problem with the code - rather just a misunderstanding on my part (although the book could have been clearer). I really shouldn't have raised it as an issue.
Hope this helps,
- MC
Yep, you are right. I have successfully run the code using my own trained model. I have the problem because I thought authors will have given the trained fine-tuned model for us to validate the result, as the trained nodule-nonnodule classification model can be found in the repo. Anyway, thanks for your help.