---
# System prepended metadata

title: Homework 4
tags: [homework, NTHU]

---

# Homework 4

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

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

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

[ToC]

## 1. Optimization Methods

### Exercise 1 - update_parameters_with_gd
![](https://i.imgur.com/25rYsC5.png)
![](https://i.imgur.com/V2f86E6.png)

### Exercise 2 - random_mini_batches
![](https://i.imgur.com/WSjzuER.png)
![](https://i.imgur.com/DuZo5S6.png)
![](https://i.imgur.com/s1aJsT2.png)
![](https://i.imgur.com/AfVVBzd.png)

### Exercise 3 - initialize_velocity
![](https://i.imgur.com/maCnuAe.png)
![](https://i.imgur.com/6acWSOR.png)
![](https://i.imgur.com/Z1mwSmZ.png)

### Exercise 4 - update_parameters_with_momentum
![](https://i.imgur.com/oxkpq5E.png)
![](https://i.imgur.com/RG5PJ1c.png)
![](https://i.imgur.com/So0HfQR.png)
![](https://i.imgur.com/ZKk6nL7.png)

### Exercise 5 - initialize_adam
![](https://i.imgur.com/gayb5QA.png)
![](https://i.imgur.com/snJWwCj.png)
![](https://i.imgur.com/5pVNArJ.png)

### Exercise 6 - update_parameters_with_adam
![](https://i.imgur.com/tjfb44u.png)
![](https://i.imgur.com/6ajrWxv.png)
![](https://i.imgur.com/dgT1FP0.png)
![](https://i.imgur.com/vtpDOKY.png)
![](https://i.imgur.com/t82f8M9.png)

### Exercise 7 - update_lr
![](https://i.imgur.com/8nyCjbE.png)
![](https://i.imgur.com/dWtO0Dw.png)

### Exercise 8 - schedule_lr_decay
![](https://i.imgur.com/oWN08vU.png)
![](https://i.imgur.com/W5mvh5k.png)


---

## 2. Introduction to TensorFlow

### Exercise 1 - linear_function
![](https://i.imgur.com/oVMI2Pj.png)
![](https://i.imgur.com/ntBfIty.png)
![](https://i.imgur.com/ph8jKoz.png)

### Exercise 2 - sigmoid
![](https://i.imgur.com/OA2IEYu.png)
![](https://i.imgur.com/loXbNh5.png)
![](https://i.imgur.com/X3s9Hxt.png)

### Exercise 3 - one_hot_matrix
![](https://i.imgur.com/EzVPT8m.png)
![](https://i.imgur.com/ZofbmQx.png)
![](https://i.imgur.com/Dsja9HZ.png)

### Exercise 4 - initialize_parameters
![](https://i.imgur.com/G5XdSST.png)
![](https://i.imgur.com/aI6PoqA.png)
![](https://i.imgur.com/DODu3oB.png)
![](https://i.imgur.com/YrgEDK3.png)

### Exercise 5 - forward_propagation
![](https://i.imgur.com/OV8BA9v.png)
![](https://i.imgur.com/zwt4Wdk.png)
![](https://i.imgur.com/HbX5tnR.png)
![](https://i.imgur.com/VgGfR9V.png)
![](https://i.imgur.com/m8MudUq.png)

### Exercise 6 - compute_cost
![](https://i.imgur.com/3bJIfBj.png)
![](https://i.imgur.com/yuhqByw.png)


