[Posts] packets get to know a neural network

Get to know one article Neural Networks

Artificial intelligence is very fire technology in recent years, on to 99 will go down to just have more or less knowledge of artificial intelligence. Neural networks are the core of artificial intelligence, neural network that is not no artificial intelligence, then this article will take you to learn about the knowledge of neural network related. This post has no mathematical formula, there is no code to help readers quickly grasp the core knowledge of neural networks.

https://ai.51cto.com/art/201911/606086.htm

 

[51CTO.com original manuscript] Artificial intelligence is very fire technology in recent years, on to 99 will go down to just have more or less knowledge of artificial intelligence. Neural networks are the core of artificial intelligence, neural network that is not no artificial intelligence, then this article will take you to learn about the knowledge of neural network related. This post has no mathematical formula, there is no code to help readers quickly grasp the core knowledge of neural networks.

First, what neural networks

  1. Concept is simply called neural network system comprising a plurality of simple and highly connected elements, each element will be processed according to the input information. A neural network is a node (neurons), with these nodes linked to each other, after the information is passed to the input layer is processed by a plurality of hidden layers, processed and then transmitted to the output layer for final processing. Final treatment here may be the output, there may be passed to another node of the neural network, or the next round of processing as input data. In the contents of the above, we mentioned several times in the node, the node then what is it? Node is also referred to as neurons, is a basic unit of a neural network. It is calculated to be output data received by the data input, the input data may come from other nodes or external input source. For each input data will have the right weight, the weight is distributed according to the importance come the input data. When the node receives the data input, the inputted weighting information and then passed after the activation function, and the output of the activation function by computing the final output data.

  2. I explained briefly in front of the training concept of neural networks and nodes, here we look at how the neural network is trained. Modification input is simply an input layer weights of the hidden layer processing data, and then they are processed by final activation function. The most common neural network learning method is called delta. delta is a monitoring rule, whenever a learning mode to transmit neural networks will call it, this is called cycle. In training the neural network further relates to a concept: the error rate. The error rate is simply the difference between a picture when we enter into the neural network, and it recognizes the result of the correct answer. Our most fundamental purpose of training the neural network is to reduce the error rate, so that each identification are infinitely close to zero.

  3. Speaking error rate gradient descent gradient descent would have to mention, it is a first-order optimization algorithm is also referred to as steepest descent, while minimizing the loss function, can be lowered by an iterative gradient method for solving step by step, is minimized loss of function and model parameter values, this algorithm is very important and therefore needs specific explain. For example, we want the depths of a mountain down the mountain, but we do not know where down the road, so he decided to go step by step, solve the current position of the gradient at each position came a time, and then along is the most take a step down the steep location, and then continue to solve the current position of the ladder, again the steepest location most likely to go down position. Such a step by step along this road until you come to feel that we have reached the foot of a mountain. But this could go on but we can not go down the mountain to the lowest point of a local. From this description, we can see the gradient descent may not be able to find the global optimal solution, it is possible to find a local optimal solution.

  4. Common neural network currently known neural network as many as thousands, and there are not a large part of GM, this part we do not mention. In common with most of the neural network 27 species, which often see is: RNN, machine-aware network and feedforward networks, Now I am a simple explanation.

  • RNN RNN Chinese called loop neural network, each element of the sequence they will perform the same task, the data output depends on the previous calculations, and it can record the previous steps, short-term memory formation. His image is this:

 

  • Perceptron network which is the most simple neural network, he does not contain any hidden layer and output layer output only. This image is approximately:

 

  • Feedforward Network comprises a plurality of nodes, the nodes having edges between adjacent layers, each side has the right weight. He is this:

 

Second, the type of neural network learning

一个孩子家长要教他很多事情,但是家长不能任何事情都要教他,有时也需要他通过其他方式学习。在人工智能中也存在这种情况,因此神经网络就出现了三种不同的学习类型,分别是有监督学习、无监督学习和强化学习。

  1. 有监督学习 有监督学习的前提条件是你具有一个存在已知结果的数据集。神经网络从给定的训练数据集中学习出一个模型参数,当新的数据到来时可以根据这个函数预测结果。数据集要求包括输入输出,里面的数据输出信息是由人手工标注的。有监督学习一般用在分类问题中,通过已有的数据集去训练得到最优模型,之后再利用这个模型将所有输入映射为相应的输出,对输出进行简单的判断从而实现分类的目的。常见的有监督学习算法包括KNN和SVM
  2. 无监督学习 当你的数据集没有结,那么你就适合使用无监督学习。它会根据数据间相似性对数据集进行分类,试图使每个分类内的差距最小化,每个分类之间的差距最大化。它的目标不是告诉人工智能怎么做,而是让它自己去学习怎样做事情。无监督学习一般我们会分为两大类: 基于概率密度函数估计的直接方法和基于数据间相似性度量的简洁聚类方法。基于概率密度函数估计的直接方法会设法找到各个分类在特征空间中的分布参数,然后再进行分类。而基于数据间相似性度量的简洁聚类方法则是设法规定出不同分类的核心和初始内核,然后根据数据与核心之间的相似度将数据分成不同的类别。
  3. 强化学习 强化学习俗称胡萝卜和大棒。简单说就是如果误差率鉴定成功我们就会得到胡萝卜,反之会得到大棒的惩罚。它是机器学习中的一个领域,强调如何基于环境而行动以取得最大化的预期利益。灵感来源于心理学中的行为主义理论,有机体在环境给予的奖励或惩罚的刺激下会逐步形成对刺激的预期从而产生能获得最大利益的习惯性行为。在人工智能中环境通常被设为马尔可夫决策过程,所以许多强化学习算法在这种情况下使用动态规划技巧。

三、激活函数与感知器

如果说节点是神经网络的核心,那么激活函数和感知器就是神经网络核心的核心,几乎在所有的神经网络中都可以看到他俩,这一小节我就来讲解一下激活函数和感知器。

  1. 激活函数 激活函数被添加到神经网络的输出端以确定输出,它的输出结果范围通常在-1到1的范围,具体取值范围取决于选择的激活函数。它最终用于确定神经元是否运行。激活函数是数据输出之前的最后一部分,可以将其视为输出值的提供者。激活函数分为两种,一种是线性激活函数,另一种是非线性激活函数。简单地说线性函数是在直线上或几乎在直线上的函数,非线性函数是不在直线上的函数(哈哈解释的够简单吧)
  2. 感知器 感知器是一种特殊的节点,当输入为正或0该函数返回1,否则返回0,具有这种激活函数的节点称为感知器。现在我们通过例子来讲解一下感知器。我们有一个感知器,它具有两个输入x1和x2,这两个输入的权重分别为w1和w2,我们要对这两个输出加权,所谓的加权就是乘以权重,权重是随机分配的,权重值介于-1到1之间。加权之后就需要将所有加权求和,求和之后将会被作为激活函数的输入传递给激活函数继续处理。激活函数处理后会告知感知器是否执行。

四、后向传播

前面所讲的都是前向传播,和前向传播相反的就是后向传播,后向传播是提升神经网络准确率的重要内容。后向传播又称误差向后传播,是使用梯度下降有监督学习神经网络算法的一种。后向传播通过在神经网络中反向移动来计算梯度。先计算最后一层权重的梯度,最后计算第一层的梯度。后向传播计算取决于前向阶段的激活函数和输出数据,这些值都必须在后向传播开始之前进行计算,因此前向计算必须在后向传播之前完成。 前向和后向传播对于很多刚刚步入人工智能这一行的人很难以理解,下面我就来说说他俩的区别。前向传播数据以获取输出,然后将输出与预期值进行比较从而获得误差。为了能达到最小化该误差,还必须算出每个权重的误差导数来向后传播,然后从权重中减去误差导数。通过前向传播,可以显示神经网络的行为并找到误差。找出误差率后可以后向传播并使用梯度下降的形式更新权重值。

四、总结

这篇文章旨在引导读者快速入门神经网络,讲解了神经网络的各种概念,方便读者对神经网络的概念有深入理解。

作者简介:

朱钢,笔名喵叔,国内某技术博客认证专家,.NET高级开发工程师,7年一线开发经验,参与过电子政务系统和AI客服系统的开发,以及互联网招聘网站的架构设计,目前就职于一家初创公司,从事企业级安全监控系统的开发。

【51CTO原创稿件,合作站点转载请注明原文作者和出处为51CTO.com】

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/11888754.html