1 of 12

Lecture 22: Neural Networks

Autumn 2026

1

Sli.do

#cse163

Questions?

Icebreaker

Favorite board or card game?

CSE 163

CSE 163: Neural Networks

​

​

2 of 12

Announcements

  • Programming Practice 7 due Sunday, November 22 at 11:59pm on Gradescope
  • Homework 5 due Wednesday, November 25 at 11:59pm on Gradescope
  • Project Part 3 (Report + Code) due Friday, December 11 at 11:59pm on Gradescope

2

Questions?

CSE 163: Neural Networks

​

​

3 of 12

ML on Images

Raw Image

“Unrolled”

Image

  • How do we do machine learning on images?
    • Simplest: Unroll image into a vector
    • Complex: Use other tools to extract features from the image

10

20

30

40

50

60

70

80

90

10

20

30

40

50

60

70

80

90

CSE 163: Neural Networks

​

​

4 of 12

ML on Images

  • Pros: Simple transformation (call the .reshape method!)
  • Cons: Loss of idea of “neighboring” pixels
    • Most machine learning models don’t take position of features into account
    • More complex models (e.g. convolution neural networks) come in to encode the local information as features

4

CSE 163: Neural Networks

​

​

5 of 12

Neural Networks - based on our brains

5

CSE 163: Neural Networks

​

​

6 of 12

6

CSE 163: Neural Networks

​

​

7 of 12

Image Classification

7

CSE 163: Neural Networks

​

​

8 of 12

Neural Network Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second input?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function.

8

3

-2

4

CSE 163: Neural Networks

​

​

9 of 12

Neural Network Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second input?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function.

9

3

-2

4

0 * 3 + 1 *(-2) - 4 = -6

0

1

CSE 163: Neural Networks

​

​

10 of 12

Neural Network Example

What is the output for this neuron if the inputs are 0 for the first input and 1 for the second input?

  • The activation function is the step function (0 if negative, 1 otherwise)
  • The bias should be subtracted from the weighted sum before applying the activation function.

10

3

-2

4

0 * 3 + 1 *(-2) - 4 = -6

squish(-6) = 0

0

1

CSE 163: Neural Networks

​

​

11 of 12

11

CSE 163: Neural Networks

​

​

12 of 12

Unsupervised Learning

  • So far we have seen examples of supervised machine learning. We explicitly show the algorithm the labels.

​

  • Unsupervised machine learning lets the algorithm try to learn the trends on its own without providing explicit labels
    • Clustering
    • Outlier detection
    • Dimensionality reduction

12

CSE 163: Neural Networks

​

​