我正试着做一个数字识别程序。我将输入一个数字的白色/黑色图像,我的输出层将触发相应的数字(输出层中的0 -> 9神经元中将有一个神经元触发)。我完成了一个二维BackPropagation神经元网络的实现.我的拓扑大小是5 -> 3 -> 110,所以它是一个二维输入层,一个二维隐藏层和一个一维输出层.然而,我得到了奇怪和错误的结果(平均错误和输出值)。
在这个阶段进行调试有点费时。因此,我想知道这是否是正确的设计,所以我继续调试。下面是我实现的流程步骤:
- Get result of SUM (Output Value \* Connection Weight) of connected Neurons from previous layer towards this nth Neuron.
- Get TanHyperbolic - Transfer Function - of this SUM as Results
- Set Results as the Output Value of this nth Neuron
- Calculate Network Error: on the Output Layer, get SUM Neurons' (Target Values - Output Values)^2. Divide this SUM by the size of the Output Layer. Get its SquareRoot as Result. Compute Average Error = (OldAverageError \* SmoothingFactor \* Result) / (SmoothingFactor + 1.00)
- Calculate Output Layer Gradients: for each Output Neuron 'n', nth Gradient = (nth Target Value - nth Output Value) \* nth Output Value TanHyperbolic Derivative
- Calculate Hidden Layer Gradients: for each Neuron 'n', get SUM (TanHyperbolic Derivative of a weight going from this nth Neuron \* Gradient of the destination Neuron) as Results. Assign (Results \* this nth Output Value) as the Gradient.
- Update all Weights: Starting from the hidden Layer and back to the Input Layer, for nth Neuron: Compute NewDeltaWeight = (NetLearningRate \* nth Output Value \* nth Gradient + Momentum \* OldDeltaWeight). Then assign New Weight as (OldWeight + NewDeltaWeight)
这是我对数字7的尝试。输出神经元# 0和神经元# 6。神经元6应该携带1,神经元#0应该携带0。在我的结果中,除6以外的所有神经元都带有相同的值(# 0是一个样本)。

很抱歉寄了这么长的邮筒。如果你知道这一点,那么你可能知道它有多酷,在一个帖子里有多大。提前谢谢你
发布于 2015-12-20 00:34:14
具有日志丢失的Softmax通常用于多类输出层激活函数.您有多类/多项:包含10个类的10个可能的数字。
因此,您可以尝试将输出层激活函数更改为softmax。
函数
人工神经网络 在神经网络仿真中,通常将softmax函数实现在网络的最后一层进行分类。然后,在日志丢失(或交叉熵)的情况下对此类网络进行训练,给出多项式logistic回归的非线性变量。
让我们知道这会产生什么影响。-
https://stackoverflow.com/questions/34376665
复制相似问题