> ## Content Index
> Fetch the complete content index at: https://yinguobing.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Udacity: 你的第一个神经网络（review）
- URL: https://yinguobing.com/blog/udacity-your-first-neural-network-review/
- Published: 2017-11-01T07:20:42.000Z
- Updated: 2019-12-28T02:26:16.000Z
- Description: Udacity给出了上次作业代码的review。根据该review要求更新了作业代码，主要是超参数的调整。
- Author: 尹国冰
- Tags: 深度学习

# Review内容

Review之前的作业结果在这里：/udacity-your-first-neural-network/

经过Udacity的review，需要改进的地方有两点：

- 隐藏层单元个数
- 学习速率

# 更新前参数与结果

## 参数

```
iterations = 5000
learning_rate = 0.1
hidden_nodes = 128

```

## 结果

Training loss: 0.230 ... Validation loss: 0.408  
![result_orig-1](https://yinguobing.com/blog/content/images/2017/11/result_orig-1.jpg)  
更新前的隐藏层单元个数选了128，这个节点数太多了。另外learning\_rate选了0.1，比较小。这两个因素综合在一起导致需优化参数太多。即使迭代数为5000，loss的值依旧在0.4左右。

# 更新后的参数与结果

## 参数

```
iterations = 3000
learning_rate = 0.8
hidden_nodes = 14

```

## 结果

Progress: 100.0% ... Training loss: 0.064 ... Validation loss: 0.155  
![result_review](https://yinguobing.com/blog/content/images/2017/11/result_review.jpg)

更新后的参数极大的减小了隐藏层的节点数，增大了学习率，并且获得0.155的loss，比之前的小了很多。迭代次数也减小到了3000。迭代后期error基本上处于极小幅度的跳动，因此迭代次数理论上可以更少。

更新后的参数参考了reviewer的建议。

# 附加思考

测试数据采用了11日到31日的数据，仔细观察你会发现21日后的单车租用数量整体比之前低了好多。虽然新的参数获得了更低的loss，但是从结果的图像来看，隐藏层节点数更多的网络在21日后的预测更加准确。看起来对于复杂的数据规律，复杂的模型还是有一定应用的潜力。