# 训练神经网络时，如果cost越来越大...

2018年12月7日 / 72次阅读

``````>>> import test
>>> from f3cl_nn import *
>>> from neuron import *
>>> from costfunc import *
>>> tr_d = test.dd1()
>>> nn = f3cl_nn((1,1))
>>> nn.b
[array([[-0.56699084]])]
>>> nn.w
[array([[0.90312502]])]
>>> nn.bgd_learn(tr_d, 0.5)
333333,wb= ([array([[-47.31239568]])], [array([[-8.50292825]])])
>>> nn.b
[array([[3.68447328]])]
>>> nn.w
[array([[24.55932286]])]
>>> nn.bgd_learn(tr_d, 0.5)
333333,wb= ([array([[646.02083133]])], [array([[102.20142616]])])
>>> nn.b
[array([[-47.4162398]])]
>>> nn.w
[array([[-298.4510928]])]
>>>
>>> nn.bgd_learn(tr_d, 0.05)
333333,wb= ([array([[-8789.72922396]])], [array([[-1402.44615741]])])
>>> nn.b
[array([[22.70606807]])]
>>> nn.w
[array([[141.0353684]])]
>>> nn.bgd_learn(tr_d, 0.05)
333333,wb= ([array([[4051.1853056]])], [array([[645.36522585]])])
>>> nn.b
[array([[-9.56219322]])]
>>> nn.w
[array([[-61.52389688]])]
>>> nn.bgd_learn(tr_d, 0.05)
333333,wb= ([array([[-1866.9609307]])], [array([[-298.4197292]])])
>>> nn.b
[array([[5.35879324]])]
>>> nn.w
[array([[31.82414965]])]
>>>
``````

2018-12-08：

2018-12-23：

overshooting

Ctrl+D 收藏本页