TensorFlow 基本用法示例(3)

0 [ 0.31494665  0.33602586] [ 0.84270978]
10 [ 0.19601417  0.17301694] [ 0.47917289]
20 [ 0.23550016  0.18053198] [ 0.44838765]
30 [ 0.26029009  0.18700737] [ 0.43032286]
40 [ 0.27547371  0.19152154] [ 0.41897511]
50 [ 0.28481475  0.19454622] [ 0.41185945]
60 [ 0.29058149  0.19652548] [ 0.40740564]
70 [ 0.2941508  0.19780098] [ 0.40462157]
80 [ 0.29636407  0.1986146 ] [ 0.40288284]
90 [ 0.29773837  0.19913  ] [ 0.40179768]
100 [ 0.29859257  0.19945487] [ 0.40112072]
110 [ 0.29912385  0.199659  ] [ 0.40069857]
120 [ 0.29945445  0.19978693] [ 0.40043539]
130 [ 0.29966027  0.19986697] [ 0.40027133]
140 [ 0.29978839  0.19991697] [ 0.40016907]
150 [ 0.29986817  0.19994824] [ 0.40010536]
160 [ 0.29991791  0.1999677 ] [ 0.40006563]
170 [ 0.29994887  0.19997987] [ 0.40004089]
180 [ 0.29996812  0.19998746] [ 0.40002549]
190 [ 0.29998016  0.19999218] [ 0.40001586]
200 [ 0.29998764  0.19999513] [ 0.40000987]

可以看到,随着训练的进行,w 和 b 也慢慢接近真实的值,拟合越来越精确,接近正确的值。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/c6229851e810f033d2aaa3381d56f096.html