```python
import numpy as np
from sympy import *
init_printing(use_latex='mathjax')
```


```python
z1, w1, a0, b1, a1, y, sigma = symbols('z1 w1 a0 b1 a1 y sigma')
a1f = sigma(z1)
z1f = w1 * a0 + b1
ck = (a1 - y) ** 2
```


```python
diff(ck, a1)
```




$$2 a_{1} - 2 y$$




```python
diff(z1f, w1)
```




$$a_{0}$$




```python
diff(z1f, b1)
```




$$1$$




```python
diff(a1f, z1)
```




$$\frac{d}{d z_{1}} \sigma{\left (z_{1} \right )}$$




```python

```

9e98fc89655a9fee12155641eeec74c267efd55c
ipynb
Jupyter Notebook
Certification 2/Week3.2 - Derivative for Neural Network.ipynb
The-Brains/MathForMachineLearning
5cbd9006f166059efaa2f312b741e64ce584aa1f
MIT
2018-04-16T02:53:59.000Z
2021-05-16T06:51:57.000Z
Certification 2/Week3.2 - Derivative for Neural Network.ipynb
The-Brains/MathForMachineLearning
5cbd9006f166059efaa2f312b741e64ce584aa1f
MIT
Certification 2/Week3.2 - Derivative for Neural Network.ipynb
The-Brains/MathForMachineLearning
5cbd9006f166059efaa2f312b741e64ce584aa1f
MIT
2019-05-20T02:06:55.000Z
2020-05-18T06:21:41.000Z
Qwen/Qwen-72B
1. YES
2. YES