逻辑运算 神经网络_使用神经网络实现逻辑门(第2部分)

逻辑运算 神经网络

Hello everyone!! Before starting with part 2 of implementing logic gates using Neural networks, you would want to go through part1 first.

大家好!! 与实施基于神经网络的逻辑门的第二部分开始之前,你可能想通过第一部分第一。

From part 1, we had figured out that we have two input neurons or x vector having values as x1 and x2 and 1 being the bias value. The input values, i.e., x1, x2, and 1 is multiplied with their respective weight matrix that is W1, W2, and W0. The corresponding value is then fed to the summation neuron where we have the summed value which is

从第1部分中,我们发现我们有两个输入神经元或x向量,其值分别为x1和x2,其中1为偏差值。 输入值x1,x2和1乘以它们各自的权重矩阵W1,W2和W0。 然后将相应的值馈入求和神经元,其中我们得到的总和为

Now, this value is fed to a neuron which has a non-linear function(sigmoid in our case) for scaling the output to a desirable range. The scaled output of sigmoid is 0 if the output is less than 0.5 and 1 if the output is greater than 0.5. Our main aim is to find the value of weights or the weight vector which will enable the system to act as a particular gate.

现在,该值被馈送到具有非线性函数(在本例中为Sigmoid)的神经元,用于将输出缩放到所需范围。 如果输出小于0.5,则Sigmoid的缩放输出为0,如果输出大于0.5,则为1。 我们的主要目的是找到权重值或权重向量,以使系统充当特定的门。

实施与门 (Implementing AND gate)

AND gate operation is a simple multiplication operation between the inputs. If any of the input is 0, the output is 0. In order to achieve 1 as the output, both the inputs should be 1. The truth table below conveys the same information.

与门运算是输入之间的简单乘法运算。 如果任何输入为0,则输出为0。为了使输出为1,两个输入都应为1。下面的真值表传达了相同的信息。

Image for post
Truth Table of AND gate and the values of weights that make the system act as AND and NAND gate, Image by Author
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值