---
# System prepended metadata

title: Homework 3
tags: [homework, NTHU]

---

# Homework 3

> National Tsing Hua University
> Fall 2022 11110IPT 5530
> Deep Learning in Biomedical Optical Imaging

###### tags: `homework` `NTHU`

:::info
- **Deadline:** ⚠️2022.10.18 00:00
- **Name:** 石子豪 
- **Student ID:** 110066851
:::

[ToC]

## 1. Initialization

### Exercise 1 - initialize_parameters_zeros
![](https://i.imgur.com/ldUVtNC.png)
![](https://i.imgur.com/9gP4R6l.png)


### Exercise 2 - initialize_parameters_random
![](https://i.imgur.com/wpOMTNp.png)
![](https://i.imgur.com/7ukVa4o.png)

### Exercise 3 - initialize_parameters_he
![](https://i.imgur.com/t5V3SHo.png)
![](https://i.imgur.com/oSR3rGW.png)
![](https://i.imgur.com/omoI5iJ.png)


---

## 2. Regularization

### Exercise 1 - compute_cost_with_regularization
![](https://i.imgur.com/ChASBtb.png)
![](https://i.imgur.com/y98G8wY.png)

### Exercise 2 - backward_propagation_with_regularization
![](https://i.imgur.com/1cuQSh5.png)
![](https://i.imgur.com/539AEzI.png)
![](https://i.imgur.com/p6FEaVo.png)

### Exercise 3 - forward_propagation_with_dropout
![](https://i.imgur.com/MjnjE81.png)
![](https://i.imgur.com/lSyvQwd.png)
![](https://i.imgur.com/6oGdysF.png)
![](https://i.imgur.com/OWqD21Z.png)

### Exercise 4 - backward_propagation_with_dropout
![](https://i.imgur.com/up8NjdZ.png)
![](https://i.imgur.com/9Av9su6.png)
![](https://i.imgur.com/bmy3kSE.png)


---

## 3. Gradient Checking

### Exercise 1 - forward_propagation
![](https://i.imgur.com/lBkFaoL.png)
![](https://i.imgur.com/GxgeyfY.png)

### Exercise 2 - backward_propagation
![](https://i.imgur.com/iCRYZHq.png)
![](https://i.imgur.com/OI77D7H.png)

### Exercise 3 - gradient_check
![](https://i.imgur.com/ZntMgyS.png)
![](https://i.imgur.com/HMRugUC.png)
![](https://i.imgur.com/oVVKzcu.png)

### Exercise 4 - gradient_check_n
![](https://i.imgur.com/lemVc2L.png)
![](https://i.imgur.com/ysMvXrJ.png)
![](https://i.imgur.com/psq4wr1.png)
![](https://i.imgur.com/kNbZ6QW.png)


### Exercise 5 (bonus w/o pt) - find/correct the errors
I go back to check the backward_propagation_n() function, and find out the errors in dW2 & db1, and then correct them.

![](https://i.imgur.com/wpAjXqn.png)

![](https://i.imgur.com/IYvONc3.png)

