多层感知机(MLP)实现异或(XOR)操作

版权声明:转载请注明出处网址 :) https://blog.csdn.net/qq_36810398/article/details/88804585

在这里插入图片描述

1.图中元素说明

(a)输入层和隐层之间灰色箭头的权重均为+1;其他箭头表示的权重标在箭头旁边。
(b)圆圈中的阶梯符号表示函数:
在这里插入图片描述

2. 验证满足XOR运算

(a)当输入 (x1,x2)=(0,0)时:

隐层左perception输出为heaviside(-1.5+1×0+1×0)=0;
隐层右perception输出为heaviside(-0.5+1×0+1×0)=0;
输出层perception输出为heaviside(-0.5+(-1)×0+1×0)=0。
MLP输出0。

(b)当输入 (x1,x2)=(1,1)时:

隐层左perception输出为heaviside(-1.5+1×1+1×1)=1;
隐层右perception输出为heaviside(-0.5+1×1+1×1)=1;
输出层perception输出为heaviside(-0.5+(-1)×1+1×1)=0。
MLP输出0。

(c)当输入 (x1,x2)=(0,1)时:

隐层左perception输出为heaviside(-1.5+1×0+1×1)=0;
隐层右perception输出为heaviside(-0.5+1×0+1×1)=1;
输出层perception输出为heaviside(-0.5+(-1)×0+1×1)=1。
MLP输出1。

(d)当输入 (x1,x2)=(1,0)时:

隐层左perception输出为heaviside(-1.5+1×1+1×0)=0;
隐层右perception输出为heaviside(-0.5+1×1+1×0)=1;
输出层perception输出为heaviside(-0.5+(-1)×0+1×1)=1。
MLP输出1。

猜你喜欢

转载自blog.csdn.net/qq_36810398/article/details/88804585