currItemLabel = "Mobius "Unstable**/**Stable" Ingot"
Lua检测到字符/不是文本,我该如何解决这个问题?
提前致谢!
currItemLabel = "Mobius "Unstable**/**Stable" Ingot"
Lua检测到字符/不是文本,我该如何解决这个问题?
提前致谢!
using System;
namespace NeuralNetwork
{
class Program
{
public class Neuron
{
public decimal weight = 0.5m;
public decimal lastError;
public decimal smoothing = 0.00001m;
public decimal ProcessInputData(decimal input)
{
return input * weight;
}
public decimal RestoreInputData(decimal output)
{
return output / weight;
}
public void Train(decimal input, decimal expectedRsult)
{
var actualResult = input * weight;
lastError = expectedRsult - actualResult;
var correction = (lastError / actualResult) * smoothing;
weight += correction;
}
}
static void Main(string[] args)
{
decimal km = 100m;
decimal miles = 62.1371;
Neuron neuron = new Neuron();
int i = 0;
do
{
i++;
neuron.Train(km, miles);
if (i%1000 == 0)
{
Console.Clear();
Console.WriteLine($"Вес: {neuron.weight}\t Ошибка:\t{neuron.lastError}");
}
} while (neuron.lastError > neuron.smoothing || neuron.lastError < -neuron.smoothing);
Console.WriteLine($"{neuron.ProcessInputData(100)} миль в {100} км");
}
}
}
我开始研究神经网络,遇到了一个神经元的代码,我不明白为什么我需要通过 Smoothing 相乘
var correction = (lastError / actualResult) * smoothing;
毕竟,如果Smoothing = 0.01,那么输出是62.127346 013186325993867045670 (正确的是62.1371)
如果平滑 = 0.0001,则输出为62.137000 019305511022149689300(正确62.1371)
如果平滑 = 0.000001,则输出为62.137099 000002893257049892940(正确62.1371)
var correction = (lastError / actualResult) * smoothing;
如果你只是不乘以smoothing,那么输出是62.137099 404290247741450941250 (正确的是62.1371)
而且小数点后面的0越多,训练的时间越长,如果不立即相乘,准确率更高,请解释一下为什么需要这个?