---
# System prepended metadata

title: Homework 2
tags: [homework, NTHU]

---

# Homework 2

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

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

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

[ToC]

## 1. Planar data classification with one hidden layer

### Exercise 1
![](https://i.imgur.com/LC7LrMK.png)

### Exercise 2 - layer_sizes
![](https://i.imgur.com/fXy1cxB.png)
![](https://i.imgur.com/B7tY6PH.png)

### Exercise 3 - initialize_parameters
![](https://i.imgur.com/omGXSjW.png)
![](https://i.imgur.com/MLYYRN3.png)
![](https://i.imgur.com/3Fl7rKR.png)

### Exercise 4 - forward_propagation
![](https://i.imgur.com/oSDbbEW.png)
![](https://i.imgur.com/pBm6wpz.png)
![](https://i.imgur.com/VYLH0pF.png)


### Exercise 5 - compute_cost
![](https://i.imgur.com/UZI7FF6.png)
![](https://i.imgur.com/5VHLCzP.png)


### Exercise 6 - backward_propagation
![](https://i.imgur.com/a5pAkog.png)
![](https://i.imgur.com/ZKTVCVT.png)
![](https://i.imgur.com/jzEPnu3.png)

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


### Exercise 7 - update_parameters
![](https://i.imgur.com/bhQU2b4.png)
![](https://i.imgur.com/CyzuqiL.png)
![](https://i.imgur.com/Aij6U0B.png)

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


### Exercise 8 - nn_model
![](https://i.imgur.com/LMaq9qa.png)
![](https://i.imgur.com/2TBgdco.png)
![](https://i.imgur.com/KlXoOIy.png)

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


### Exercise 9 - predict 
![](https://i.imgur.com/CUaJU8Z.png)
![](https://i.imgur.com/fRoxkEM.png)


---

## 2. Building your Deep Neural Network: Step by Step

### Exercise 1 - initialize_parameters
![](https://i.imgur.com/TAZcldV.png)
![](https://i.imgur.com/dhNstkB.png)

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

### Exercise 2 - initialize_parameters_deep
![](https://i.imgur.com/oOeXGbE.png)
![](https://i.imgur.com/WGt6p9Q.png)

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


### Exercise 3 - linear_forward
![](https://i.imgur.com/EW3hB8W.png)
![](https://i.imgur.com/My2DW91.png)

### Exercise 4 - linear_activation_forward
![](https://i.imgur.com/OfgyH2y.png)
![](https://i.imgur.com/gnbpdcf.png)

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

### Exercise 5 - L_model_forward
![](https://i.imgur.com/Kj5khoB.png)
![](https://i.imgur.com/GF2vJTy.png)

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


### Exercise 6 - compute_cost
![](https://i.imgur.com/fwV5OZd.png)
![](https://i.imgur.com/umnfqUC.png)


### Exercise 7 - linear_backward
![](https://i.imgur.com/EBPgGHs.png)
![](https://i.imgur.com/VeUapCJ.png)

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


### Exercise 8 - linear_activation_backward
![](https://i.imgur.com/GG8xdAp.png)
![](https://i.imgur.com/wXAJKDe.png)
![](https://i.imgur.com/evQrfOF.png)

### Exercise 9 - L_model_backward
![](https://i.imgur.com/NweHJ5p.png)
![](https://i.imgur.com/Yi9OhWU.png)
![](https://i.imgur.com/4LoLdmz.png)
![](https://i.imgur.com/9FOILI6.png)

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

### Exercise 10 - update_parameters
![](https://i.imgur.com/2ScRihi.png)
![](https://i.imgur.com/gjJeZp4.png)







