20.03.2021 Views

Deep-Learning-with-PyTorch

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

426 CHAPTER 14 End-to-end nodule analysis, and where to go next

losses stagnating is qualitatively similar. Back then, case A indicated that we did not have

enough capacity, so we should consider the following three possible causes:

• Features (the output of the last convolution) obtained by training the network

on nodule versus non-nodule classification are not useful for malignancy detection.

• The capacity of the head—the only part we are training—is not large enough.

• The network might have too little capacity overall.

depth 1 training

depth 1 validation

depth 1 validation

depth 1 training

Figure 14.10

AUC (left) and loss (right) for the fine-tuning of the last linear layer

If training only the fully connected part in fine-tuning is not enough, the next thing to

try is to include the last convolutional block in the fine-tuning training. Happily, we

introduced a parameter for that, so we can include the block4 part into our training:

python3 -m p2ch14.training \

--malignant \

--dataset MalignantLunaDataset \

--finetune data/part2/models/cls_2020-02-06_14.16.55_final-nodule-

➥ nonnodule.best.state \

--finetune-depth 2 \

--epochs 10 \

malben-finetune-twolayer

This CLI

parameter is new.

Once done, we can check our new best model against the baseline. Figure 14.11 looks

more reasonable! We flag about 75% of the malignant nodules with almost no false

positives. This is clearly better than the 65% the diameter baseline can give us. Trying

to push beyond 75%, our model’s performance falls back to the baseline. When we go

back to the classification problem, we will want to pick a point on the ROC curve to

balance true positives versus false positives.

We are roughly on par with the baseline, and we will be content with that. In section

14.7, we hint at the many things that you can explore to improve these results,

but that didn’t fit in this book.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!