Detailed schedule and resources
Class 24
Exam review.
- value learning algorithm: value-learn-review.pdf
- SGD and gradient descent in PyTorch: https://colab.research.google.com/drive/1hyP41xtM5kKkhaRmGkPit77_Cr4B8b7K?usp=sharing
Class 23
Quiz 5+6.
Final project selection and discussions.
Class 22
Discussion D4.
Class 21
- finish quiz 6 explanations
- transformers in pytorch:
- Residual connections inside the attention layer and how to implement them in the
forwardmethod - Reminder that
model(X)actually doesmodel.forward(X)under the covers, and returns the result offorward(X) - Shape of the return from
logits, loss = model(X), forTinyTransformerLMi.e. shape of return fromforward(X) - look at
TinyTransformerLM.generate() train_transformer.py,get_batch()– understandx = torch.stack(...)- understand
_, loss = model(xb, yb)intrain_transformer.py
- Residual connections inside the attention layer and how to implement them in the
Class 20
- Quiz 6 whiteboard
- (optional) Colab embeddings demo
Class 19
Quiz 4
Value learning algorithm. Code: value_learn.py
Class 18
Discussion D3: Thinking AI, chapters 8-10.
Class 17
optional lab day
Class 16
Discussion of mid-semester feedback.
Finish quiz 4 explanations: questions 3 and 4
- Example code for quiz 4, question 4: mse.py
Coding suggestions for HW4
- Example code for HW4: simple_cnn.py
- Note especially the method of computing the output size of a model via a dummy input.
Class 15
Please fill out the mid-semester feedback form
Questions about exam 1.
Questions on Matrix Algebra, Sec 6 and Sec 7.
Lecture: Computing convolutions and their output sizes.
- whiteboard for quiz 4, question 1: quiz4-question1.png
- whiteboard for quiz 4, question 2: quiz4-question2.png
- we also cover question 3 if time allows.
Class 14
Discussion D2
Class 13
- Announcement: Talk on Cybersecurity 5:00 PM today October 13 in Tome 115
Today: Exam 1 in class
Class 12
Exam review session. Bring any questions about exam material to class.
Additional exam info is available on the exams page.
Class 11
Sustainability poster session and grading.
Class 10
In class work on sustainability posters.
Class 9
- Before class: show handwritten notes on “The AI Deluge.”
- Announcements:
- Required event tonight – 7pm ATS
- Quiz 3 on Friday – questions 1-4 will not be tested
- Exam 1: Topics 1-3. All questions are similar to questions in Q1, Q2, Q3.
- Questions on video lecture (class 7A below).
- device-free from this point please
- Discuss the reading from Elizabeth Ayanna Johnson, which is the interview of Mustafa Suleyman, “The AI Deluge”.
- What is sustainability?
- our own ideas
- UN Sustainable Development Goals (SDGs)
- In teams: Each team discuss which SDGs are relevant to AI.
- Name the top 1-3 SDGs that are degraded by AI
- Name the top 1-3 SDGs that could be improved with AI.
- Report back.
- Data center sustainability. powerpoint
- Devices may be used for the rest of the session
- Go over the sustainability poster (SP) assignment .
- example of presentation style: jmac poster
- any topic linking AI and sustainability
- Remaining time: individual/team work on SP assignment
Class 8
D1 discussion: Thinking AI Ch1-4, Turing (1950).
- Class is in the Science Library (Tome 228).
- Remember to bring handwritten notes.
Class 7a: Video lecture
- Part 1
- Part 2, with whiteboard
Class 7
- Quiz 2 (15 minutes)
- D1 discussion class will be this Friday 9/25 in Tome 228 (the science library). Same requirements as before – bring handwritten notes etc.
- In the remaining time today we will run through as much of Quiz 3 as possible. Anything that isn’t covered will be covered in a video lecture to be released later this week.
Key definitions that are not in the quiz solutions:
- softmax function is defined as: \( \text{softmax}(x_i) = \frac{e^{x_i}}{\sum_{j} e^{x_j}} \)
- cross-entropy loss is defined as: \( \text{cross-entropy}(y, \hat{y}) = -\sum_{i} y_i \log(\hat{y}_i) \)
- compare with binary cross-entropy loss, which is defined as: \( \text{binary-cross-entropy}(y, \hat{y}) = -[y \log(\hat{y}) + (1-y) \log(1-\hat{y})] \)
- Softmax is a generalization of the logistic function in the following sense: \( \text{softmax}(x, 0) = (\sigma(x), \sigma(-x)) \). So when there are only two classes, the logistic function plays the role of softmax.
Class 6
Visiting speaker: Justin Ross, COO & Chief Engineer at Pennsylvania Data Center Partners.
Class 5
Announcement:
- Note new website content:
- quiz retakes
- discussion grading
- reading for next time: skip Turing sections 4 and 5.
- Friday’s D1 discussion class will be in Tome 228 (the science library).
Lecture:
- Matrix Algebra section 2 and 3, especially broadcasting + quiz 2 question 10
- Quiz Two questions 6, 7, 8, 9. If we run out of time, please go over the rest for homework.
Class 4
- Quiz 1.
- nearest neighbor classifier
- Quiz 2 questions 1-2
- expectation, entropy (Quiz 2 questions 3-5)
- example of a decision tree
we skipped:
- Quick review of Matrix Algebra, Sec 2 and Sec 3
- Quiz 2 q10.
we did:
- Remaining time: Q&A for HW1
Also: are you keeping up with the readings? i.e. Thinking AI Ch1-2.
Class 3
PAX-1 and Appalachian Trail field trip.
Class 2
- arrangements for next week’s field trip on Tuesday 9/8:
- Meet in Kaufman parking lot near the entrance to Public Safety no later than 1:30 PM.
- optional: Wear shoes that can get muddy if you want to stroll on the Appalachian Trail for a few minutes.
- our route: Kaufman parking lot to PAX1 site then Appalachian Trail
- We will be back on campus before the end of class at 2:45 PM.
- any questions on the syllabus?
- Discussion of AI use policy
- review search node with fields state, parent, action, depth, cost
- show Java file
SearchNode.javafrom HW1
- show Java file
- Show BFS via quiz1 qu1, skip DFS
- Show UCS via quiz1 qu3
- Show A* via quiz1 qu4
- Reference implementation available: search.zip
- define admissible heuristic, consistent heuristic:
- admissible: never overestimates the cost to reach the goal, so \(h(n) \leq h^*(n)\)
- consistent: the estimated cost of reaching the goal from a node is less than or equal to the cost of reaching a neighbor plus the estimated cost of reaching the goal from the neighbor, so \(h(n) \leq c(n, n’) + h(n’)\)
- define 8-puzzle heuristics:
- h1: number-of-misplaced-tiles
- h1(state) = number of tiles in the wrong position
- h2: manhattan-distance
- h2(state) = sum of horizontal and vertical distances of the tiles from their goal positions
- h1: number-of-misplaced-tiles
- if time, review Matrix Algebra section 1
Class 1
- Submit info on the Github username form
- Transportation arrangements for next week’s field trip
- sidetrack: check out stoppax1.com
- Syllabus: Read carefully for homework and bring questions next time
- Make sure to check out the 8-puzzle game.
- “marshalls and crocodiles” – group activity
- search node – essential concept – see
SearchNode.javafrom HW1 - BFS (quiz1 question 1) – skipped
- DFS (quiz1 question 2) – skipped
- Matrix Algebra section 1 – see Readings page