note: ignore the implementation details of class DataLoaders; you only need to know that it has a .train and a .valid, each of which are DataLoaders that turn filenames into batches of (image, label) pairs.
If you want to replicate the code, use duckduckgo (as the Unit 1 video does) instead of trying to get a Bing API key.
Vision (p.9)
We envision a kingdom community in which cultural diversity is seen as normal; a Christian "family" that transcends ethnic, cultural, racial, and class boundaries: a communion of saints in which "each member should consider it his duty to use his gifts readily and cheerfully for the service and enrichment of the other members" (Lord's Day 21 of the Heidelberg Catechism); a community in which Reformed Christians from all of these groups see Calvin as their college. It is the biblical vision of Pentecost rather than the vision of Babel.
Each code block feeds input to a hidden Python repl (“Shell” in Thonny)
Possible to run code out of order
Changing something doesn’t make dependent code re-run!
Outputs: anything explicitly display()ed or print()ed or plot()ted—and the result of the last expression
Model training
Outline of notebooks
Load the data
Download the dataset.
Get a list of filenames.
Get a list of ground-truth labels.
Set up the dataloaders (which handles train-test split, batching, and resizing)
Train a model
Get a foundation model (resnet18 in our case)
Fine-tune it.
Get the model’s predictions on an image.
Evaluating a model
Accuracy: correct or incorrect?
Loss:
partial credit
when it’s right, should be confident
when it’s wrong, shouldn’t be confident
Wednesday class
Guest lecture by Colin Davison.
The basic process he walked through is the same in essence as the image classification we started working on last week and are continuing with over the next few weeks.
Here are some questions that you should ask yourself to check your understanding of the lecture (nothing formal to turn in yet, but these might show up on a future quiz, so think and discuss…):
What about his task made it supervised learning?
Why did he need to split the data? (What happened when he didn’t split it?)
What did he need to do to the text to make it usable by his classifier? (bonus: in what sense was the input a “bag of words”)
Can you give an example of a bigram? A unigram?
How did he put a number on how well the classifier did? (bonus: what additional numbers did he show at the seminar? What insight did they provide?)