人工神经网络阈下触发

2024-04-25 23:58:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试用python构建一个简单的数字识别ANN电路。它有一个输入层和15个输入,隐藏层和输出层(10个神经元)。我真的是一个初学者在这个领域,但我是一个经验丰富的程序员。你知道吗

Neural sample network

当a=1和b=0,我想要输出f=0和g=1时

   Value at:
   C
   1*1+-0.5*0= 1  
   D
   1*0+.1*1 = 0.1
   E
   -1*0+-0.5*1 = -0.5

由于sigmoidal函数只在value>;0时激发,我猜只有神经元C和D激发。所以E的输出是0,对吗?你知道吗

C:1 D:0.1 E:0

     Value at F:
     1*1+0.1*-0.3+0*0.3=0.97 (neuron fires)
     Value at G:
     1*-1+-0.5*0.1+0*.1=  -1.05  (neuron does not fire)

所以输出似乎是F:1&G:0,这与期望相反。你知道吗

现在我真的很困惑反向传播。在这种情况下,如何使用反向传播来校正权重?数学步骤会很好。。你知道吗

伙计们,我需要确认一下数学是否正确。在那之后我还有很多补充问题要问。你知道吗

我正在使用sigmoidal函数作为阈值。因此,如果值小于0,则没有输出,如果大于0,则激发。你知道吗

如果一个神经元不启动,那么它的输出就被认为是零,对吗?你知道吗


Tags: 函数gtvalue数字数学领域at电路
1条回答
网友
1楼 · 发布于 2024-04-25 23:58:04

我希望这能有所帮助,尽管我们的实现/方法不同。你知道吗

在我的实现(小型/简单网络)中,我将输出计算为所有输入节点输出乘以权重的总和,在这种情况下,如果神经元不激发,它就不算作输入。
(但在我的实现中,我让负值传递到下一个级别)

伪码

    for (let idxHidden in hiddensOutput) {
        let sum = 0
        for (let idxInput in inputsOutput) {
          sum = sum + inputsOutput[idxInput] * inputsWeight[idxInput][idxHidden];
        }
        hiddensOutput[idxHidden] = sigmoid(sum);
    }

hiddensOutput ... is a list of node in the next layer
inputsOutput ... is a list of inputs for the nodes of the hiddensOutputs
inputsWeight ... is a matrix of the weights between those nodes (setting this up is the "tricky" part) hiddensOutput ... is a list with the inputs for the next layer

所以要回答这个问题:“如果一个神经元不启动,那么它的输出就被认为是零,对吗?”

Update:

Here are the links from the comment Section I posted before online course

相关问题 更多 >