AI训练

By admin, 6 八月, 2021

这里有一个简单易懂的AI训练例子。例子是训练出一条线型函数,通过500个已知结果的训练数据,不断调整一条sum = x * weight[0] + y * weight[1] + bias的公式参数得出weight[0]、weight[1]和bias的接近结果。

其中,一个关键的调整参数的方法如下:

this.weights[i] += this.learnc * error * inputs[i]; 

总的来说,训练过程如下:

  1. 收集训练数据及结果。
  2. 建立公式模型(感知器Perceptron)。如果最终结果不是线型关系,但我们的公式是线性的,那么怎么训练也不会有结果。
  3. 构造反向传播算法(Backpropagation),以合适的速度修正权重参数值。

 

An ML model is Trained by Looping through data multiple times.

For each iteration, Weights and Bias values are adjusted.

Training is complete when the iterations fails to Reduce the Cost.

https://www.w3schools.com/ai/ai_training.asp

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"