神经网络:如何计算单位的误差 [英] Neural network: How to calculate the error for a unit
问题描述
我正在尝试从
答案是B.
有人可以指出我要去哪里了吗?
我从纸上的上一个问题得出的I1为0.982.
激活功能为S型.对于输出1,总和应该也是如此:
d1 = f(Ik)[1-f(Ik)](Tk-Zk)
从问题开始:
T1 = 0.58Z1 = 0.83T1-Z1 = -0.25乙状结肠(I1)=乙状结肠(0.982)= 0.7281-Sigmoid(I1)= 1-0.728 = 0.272
因此,将所有这些放在一起:
d1 =(0.728)(0.272)(-0.25)d1 = -0.049
但是答案应该是d1 = -0.0353
谁能告诉我我要去哪里错了?
我试图倒退以了解情况,但仍然陷于困境.
我说:
d1 = f(Ik)[1-f(Ik)](Tk-Zk)-0.0353 = f'(Ik)(-0.25)(我知道-0.0353是正确的答案,而-0.25是Tk-Zk)0.1412 = f'(Ik)0.1412 = f(Ik)[1-f(Ik)]0.1412 = S形(x).(1-s形(x))
...但是如果有人有主意,我就会被困住
问题是,您从上一个问题获得的I₁
与不相同>I₁您需要执行此任务.
I₁
的值根据输入值(此问题的不同)而变化!
对于该问题的解决方案,您可以改用 f(Iₖ)=zₖ
:
δₖ= f(Iₖ)·[1-f(Iₖ)]·(tₖ-zₖ)
=zₖ·[1-zₖ]·(tₖ-zₖ)
→δ₁= 0.83·[1-0.83]·(-0.25)= -0.2075·0.17 = -0.035275≈-0.0353
→δ2 = 0.26·[1-0.26]·(0.70-0.26)≈-0.0847
→δ₃= 0.56·[1-0.56]·(0.20-0.56)≈-0.0887
I am trying to work out question 26 from this exam paper (the exam is from 2002, not one I'm getting marked on!)
This is the exact question:
The answer is B.
Could someone point out where I'm going wrong?
I worked out I1 from the previous question on the paper to be 0.982.
The activation function is sigmoid. So should the sum be, for output 1:
d1 = f(Ik)[1-f(Ik)](Tk-Zk)
From the question:
T1 = 0.58
Z1 = 0.83
T1 - Z1 = -0.25
sigmoid(I1) = sigmoid(0.982) = 0.728
1-sigmoid(I1) = 1-0.728 = 0.272
So putting this all together:
d1 = (0.728)(0.272)(-0.25)
d1 = -0.049
But the answer should be d1 = -0.0353
Can anyone show me where I'm going wrong?
Edit 1: I tried to work backwards to understand the situation, but I still got stuck.
I said:
d1 = f(Ik)[1-f(Ik)](Tk-Zk)
-0.0353 = f'(Ik)(-0.25) (where I know -0.0353 is the right answer, and -0.25 is Tk - Zk)
0.1412 = f'(Ik)
0.1412 = f(Ik)[1-f(Ik)]
0.1412 = sigmoid(x).(1-sigmoid(x))
...but then I got stuck, if anyone has an idea
The problem is, that the I₁
you got from the previous question is not the same I₁
you need for this task.
The value of I₁
changes depending on the input values(which are different for this question)!
For the solution of this question you can instead use the fact that f(Iₖ) = zₖ
:
δₖ = f(Iₖ)·[1 - f(Iₖ)]·(tₖ - zₖ)
= zₖ·[1 - zₖ]·(tₖ - zₖ)
→ δ₁ = 0.83·[1 - 0.83]·(-0.25) = -0.2075·0.17 = -0.035275 ≈ -0.0353
→ δ₂ = 0.26·[1 - 0.26]·(0.70 - 0.26) ≈ -0.0847
→ δ₃ = 0.56·[1 - 0.56]·(0.20 - 0.56) ≈ -0.0887
这篇关于神经网络:如何计算单位的误差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!