▤ 목차
Neural Networks Basics
Python and Vectorization
Vectorization

Vectorization is how to apply a function in parallel across all examples simultaneously.
In Python, vectorization avoids using the for-loop and reduces the computation and time.
True or false. Vectorization cannot be done without a GPU.
False
More Vectorization Examples



We can apply any function to matrices or vectors.
In our example, we are applying an exponential function to the values.
Vectorizing Logistic Regression

We are performing matrix multiplication using the transposed weight matrix (W) with the input data (X) and adding a bias vector (b) which speeds up the computation.
Then we apply a sigmoid function to our column output vector (Z) to get our predicted probability vector (A).
What are the dimensions of matrix X in this video?
(nx,m)
Vectorizing Logistic Regression’s Gradient Output


How do you compute the derivative of b in one line of code in Python numpy?
1 / m * (np.sum(dZ))
Broadcasting in Python



Broadcasting aids computation without the need to use the explicit for-loops.
Broadcasting acts like an extended element-wise matrix multiplication.
What numpy lines of code would sum the values in a matrix A vertically?
A.sum(axis=0)
A Note on Python/Numpy Vectors

One rule of thumb is to avoid using the rank 1 array as it can cause bugs later when performing matrix multiplication.
What kind of array has dimensions in this format: (10, )?
A rank 1 array
Explanation of Logistic Regression Cost Function


True or False: Minimizing the loss corresponds with maximizing log p(y|x).
True
All the information provided is based on the Deep Learning Specialization | Coursera from DeepLearning.AI
'Coursera > Deep Learning Specialization' 카테고리의 다른 글
Neural Networks and Deep Learning (6) (0) | 2024.11.23 |
---|---|
Neural Networks and Deep Learning (5) (1) | 2024.11.18 |
Neural Networks and Deep Learning (3) (0) | 2024.11.14 |
Neural Networks and Deep Learning (2) (0) | 2024.11.13 |
Neural Networks and Deep Learning (1) (1) | 2024.11.12 |