深度学习算法与深度神经网络

Machine learning, and especially deep learning, are two technologies that are changing the world.

机器学习 ,尤其是深度学习,是改变世界的两种技术。

After a long "AI winter" that spanned 30 years, computing power and data sets have finally caught up to the artificial intelligence algorithms that were proposed during the second half of the twentieth century.

经过长达30年的漫长的“ AI冬季”之后,计算能力和数据集终于赶上了20世纪下半叶提出的人工智能算法。

This means that deep learning models are finally being used to make effective predictions that solve real-world problems.

这意味着深度学习模型最终被用于做出解决现实问题的有效预测。

It's more important than ever for data scientists and software engineers to have a high-level understanding of how deep learning models work. This article will explain the history and basic concepts of deep learning neural networks in plain English.

对于数据科学家和软件工程师来说,全面了解深度学习模型的工作原理比以往任何时候都更为重要。 本文将以普通英语解释深度学习神经网络的历史和基本概念。

深度学习的历史 (The History of Deep Learning)

Deep learning was conceptualized by Geoffrey Hinton in the 1980s. He is widely considered to be the founding father of the field of deep learning. Hinton has worked at Google since March 2013 when his company, DNNresearch Inc., was acquired.

深度学习Geoffrey Hinton在1980年代概念化。 他被广泛认为是深度学习领域的创始人。 自2013年3月收购其公司DNNresearch Inc.以来,Hinton一直在Google工作。

Hinton’s main contribution to the field of deep learning was to compare machine learning techniques to the human brain.

Hinton在深度学习领域的主要贡献是将机器学习技术与人脑进行了比较。

More specifically, he created the concept of a "neural network", which is a deep learning algorithm structured similar to the organization of neurons in the brain. Hinton took this approach because the human brain is arguably the most powerful computational engine known today.

更具体地说,他提出了“神经网络”的概念,这是一种深度学习算法,其结构类似于大脑中神经元的组织。 Hinton之所以采用这种方法,是因为人脑可以说是当今已知的最强大的计算引擎。

The structure that Hinton created was called an artificial neural network (or artificial neural net for short). Here’s a brief description of how they function:

Hinton创建的结构称为人工神经网络(或简称为人工神经网络)。 这是它们如何工作的简要说明:

  • Artificial neural networks are composed of layers of node

    人工神经网络由节点层组成
  • Each node is designed to behave similarly to a neuron in the brain

    每个节点的设计行为都类似于大脑中的神经元
  • The first layer of a neural net is called the input layer, followed by hidden layers, then finally the output layer

    神经网络的第一层称为input层,其次是hidden层,最后是output

  • Each node in the neural net performs some sort of calculation, which is passed on to other nodes deeper in the neural net

    神经网络中的每个节点都执行某种计算,然后传递给神经网络中更深的其他节点

Here is a simplified visualization to demonstrate how this works:

这是简化的可视化效果,以演示其工作原理:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

Neural nets represented an immense stride forward in the field of deep learning.

神经网络代表了深度学习领域的巨大进步。

However, it took decades for machine learning (and especially deep learning) to gain prominence.

但是,机器学习(尤其是深度学习)花了数十年才获得关注。

We’ll explore why in the next section.

在下一节中,我们将探讨原因。

为什么深度学习不能立即发挥作用 (Why Deep Learning Did Not Immediately Work)

If deep learning was originally conceived decades ago, why is it just beginning to gain momentum today?

如果深度学习最初是几十年前构想的,为什么今天才开始兴起?

It’s because any mature deep learning model requires an abundance of two resources:

这是因为任何成熟的深度学习模型都需要大量两种资源:

  • Data

    数据
  • Computing power

    计算能力

At the time of deep learning’s conceptual birth, researchers did not have access to enough of either data or computing power to build and train meaningful deep learning models. This has changed over time, which has led to deep learning’s prominence today.

在深度学习的概念诞生之时,研究人员没有足够的数据或计算能力来构建和训练有意义的深度学习模型。 随着时间的流逝,这种情况发生了变化,这导致了深度学习的发展。

了解深度学习中的神经元 (Understanding Neurons in Deep Learning)

Neurons are a critical component of any deep learning model.

神经元是任何深度学习模型的关键组成部分。

In fact, one could argue that you can’t fully understand deep learning with having a deep knowledge of how neurons work.

实际上,有人可能会辩称,如果对神经元的工作原理有深刻的了解,就无法完全理解深度学习。

This section will introduce you to the concept of neurons in deep learning. We’ll talk about the origin of deep learning neurons, how they were inspired by the biology of the human brain, and why neurons are so important in deep learning models today.

本节将向您介绍深度学习中神经元的概念。 我们将讨论深度学习神经元的起源,它们是如何受到人脑生物学的启发,以及为什么神经元在当今的深度学习模型中如此重要。

什么是生物学中的神经元? (What is a Neuron in Biology?)

Neurons in deep learning were inspired by neurons in the human brain. Here is a diagram of the anatomy of a brain neuron:

深度学习中的神经元受到人脑中神经元的启发。 这是大脑神经元的解剖图:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

As you can see, neurons have quite an interesting structure. Groups of neurons work together inside the human brain to perform the functionality that we require in our day-to-day lives.

如您所见,神经元具有相当有趣的结构。 神经元组在人脑内部协同工作,以执行我们日常生活中所需的功能。

The question that Geoffrey Hinton asked during his seminal research in neural networks was whether we could build computer algorithms that behave similarly to neurons in the brain. The hope was that by mimicking the brain’s structure, we might capture some of its capability.

杰弗里·欣顿(Geoffrey Hinton)在神经网络的开创性研究中提出的问题是,我们是否可以构建行为类似于大脑神经元的计算机算法。 希望是通过模仿大脑的结构,我们可以捕获大脑的某些功能。

To do this, researchers studied the way that neurons behaved in the brain. One important observation was that a neuron by itself is useless. Instead, you require networks of neurons to generate any meaningful functionality.

为此,研究人员研究了神经元在大脑中的行为方式。 一个重要的发现是神经元本身是无用的。 相反,您需要神经元网络来生成任何有意义的功能。

This is because neurons function by receiving and sending signals. More specifically, the neuron’s dendrites receive signals and pass along those signals through the axon.

这是因为神经元通过接收和发送信号来起作​​用。 更具体地说,神经元的dendrites接收信号并沿着axon传递这些信号。

The dendrites of one neuron are connected to the axon of another neuron. These connections are called synapses, which is a concept that has been generalized to the field of deep learning.

一个神经元的dendrites连接到另一个神经元的axon 。 这些连接称为synapses ,这是一个已广泛应用于深度学习领域的概念。

什么是深度学习中的神经元? (What is a Neuron in Deep Learning?)

Neurons in deep learning models are nodes through which data and computations flow.

深度学习模型中的神经元是数据和计算流经的节点。

Neurons work like this:

神经元的工作方式如下:

  • They receive one or more input signals. These input signals can come from either the raw data set or from neurons positioned at a previous layer of the neural net.

    它们接收一个或多个输入信号。 这些输入信号可以来自原始数据集,也可以来自位于神经网络上一层的神经元。
  • They perform some calculations.

    他们执行一些计算。
  • They send some output signals to neurons deeper in the neural net through a synapse.

    他们通过synapse向神经网络中较深的神经元发送一些输出信号。

Here is a diagram of the functionality of a neuron in a deep learning neural net:

这是深度学习神经网络中神经元功能的示意图:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

Let’s walk through this diagram step-by-step.

让我们逐步浏览该图。

As you can see, neurons in a deep learning model are capable of having synapses that connect to more than one neuron in the preceding layer. Each synapse has an associated weight, which impacts the preceding neuron’s importance in the overall neural network.

如您所见,深度学习模型中的神经元能够使突触连接到上一层中的多个神经元。 每个突触都有一个相关的weight ,这会影响整个神经网络中先前神经元的重要性。

Weights are a very important topic in the field of deep learning because adjusting a model’s weights is the primary way through which deep learning models are trained. You’ll see this in practice later on when we build our first neural networks from scratch.

权重是深度学习领域中非常重要的主题,因为调整模型的权重是训练深度学习模型的主要方法。 稍后,当我们从头开始构建第一个神经网络时,您将在实践中看到这一点。

Once a neuron receives its inputs from the neurons in the preceding layer of the model, it adds up each signal multiplied by its corresponding weight and passes them on to an activation function, like this:

一旦神经元从模型的上一层中的神经元接收到输入,它将每个信号相乘并乘以相应的权重,然后将其传递给**函数,如下所示:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

The activation function calculates the output value for the neuron. This output value is then passed on to the next layer of the neural network through another synapse.

**函数计算神经元的输出值。 然后,该输出值通过另一个突触传递到神经网络的下一层。

This serves as a broad overview of deep learning neurons. Do not worry if it was a lot to take in – we’ll learn much more about neurons in the rest of this tutorial. For now, it’s sufficient for you to have a high-level understanding of how they are structured in a deep learning model.

这是深度学习神经元的广泛概述。 不用担心会花很多钱-在本教程的其余部分中,我们将学习有关神经元的更多信息。 到目前为止,对您在深度学习模型中的结构有一个高层次的了解就足够了。

深度学习**功能 (Deep Learning Activation Functions)

Activation functions are a core concept to understand in deep learning.

**功能是深度学习中要理解的核心概念。

They are what allows neurons in a neural network to communicate with each other through their synapses.

它们使神经网络中的神经元可以通过突触相互通信。

In this section, you will learn to understand the importance and functionality of activation functions in deep learning.

在本节中,您将学习了解**功能在深度学习中的重要性和功能。

深度学习中的**功能是什么? (What Are Activation Functions in Deep Learning?)

In the last section, we learned that neurons receive input signals from the preceding layer of a neural network. A weighted sum of these signals is fed into the neuron's activation function, then the activation function's output is passed onto the next layer of the network.

在最后一节中,我们了解到神经元从神经网络的上一层接收输入信号。 这些信号的加权总和被输入到神经元的**函数中,然后**函数的输出被传递到网络的下一层。

There are four main types of activation functions that we’ll discuss in this tutorial:

我们将在本教程中讨论四种主要的**函数类型:

  • Threshold functions

    阈值功能
  • Sigmoid functions

    乙状结肠功能
  • Rectifier functions, or ReLUs

    整流器功能或ReLU
  • Hyperbolic Tangent functions

    双曲正切函数

Let’s work through these activations functions one-by-one.

让我们一步一步地完成这些**功能。

阈值函数 (Threshold Functions)

Threshold functions compute a different output signal depending on whether or not its input lies above or below a certain threshold. Remember, the input value to an activation function is the weighted sum of the input values from the preceding layer in the neural network.

阈值函数根据其输入是高于还是低于某个阈值来计算不同的输出信号。 请记住,**函数的输入值是来自神经网络中前一层的输入值的加权和。

Mathematically speaking, here is the formal definition of a deep learning threshold function:

从数学上讲,这是深度学习阈值函数的正式定义:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

As the image above suggests, the threshold function is sometimes also called a unit step function.

如上图所示,阈值函数有时也称为unit step function

Threshold functions are similar to boolean variables in computer programming. Their computed value is either 1 (similar to True) or 0 (equivalent to False).

阈值函数类似于计算机编程中的布尔变量。 它们的计算值为1 (类似于True )或0 (等于False )。

乙状结肠功能 (The Sigmoid Function)

The sigmoid function is well-known among the data science community because of its use in logistic regression, one of the core machine learning techniques used to solve classification problems.

由于在逻辑回归中使用了S型函数,因此它在数据科学界是众所周知的,这是用于解决分类问题的核心机器学习技术之一。

The sigmoid function can accept any value, but always computes a value between 0 and 1.

sigmoid函数可以接受任何值,但始终会计算01之间的值。

Here is the mathematical definition of the sigmoid function:

这是S型函数的数学定义:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

One benefit of the sigmoid function over the threshold function is that its curve is smooth. This means it is possible to calculate derivatives at any point along the curve.

S形函数比阈值函数的好处之一是其曲线平滑。 这意味着可以计算曲线上任何一点的导数。

整流器功能 (The Rectifier Function)

The rectifier function does not have the same smoothness property as the sigmoid function from the last section. However, it is still very popular in the field of deep learning.

整流器函数的平滑度特性与上一节中的S形函数不同。 但是,它在深度学习领域仍然非常流行。

The rectifier function is defined as follows:

整流器功能定义如下:

  • If the input value is less than 0, then the function outputs 0

    如果输入值小于0 ,则函数输出0

  • If not, the function outputs its input value

    如果不是,则函数输出其输入值

Here is this concept explained mathematically:

这是用数学方法解释的这个概念:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

Rectifier functions are often called Rectified Linear Unit activation functions, or ReLUs for short.

整流器功能通常称为Rectified Linear Unit**功能,简称ReLUs

双曲正切函数 (The Hyperbolic Tangent Function)

The hyperbolic tangent function is the only activation function included in this tutorial that is based on a trigonometric identity.

双曲正切函数是本教程中包含的唯一基于三角恒等式的**函数。

It’s mathematical definition is below:

它的数学定义如下:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

The hyperbolic tangent function is similar in appearance to the sigmoid function, but its output values are all shifted downwards.

双曲正切函数在外观上类似于S型函数,但其​​输出值都向下移动。

神经网络如何真正起作用? (How Do Neural Networks Really Work?)

So far in this tutorial, we have discussed two of the building blocks for building neural networks:

到目前为止,在本教程中,我们已经讨论了用于构建神经网络的两个构建块:

  • Neurons

    神经元
  • Activation functions

    **功能

However, you’re probably still a bit confused as to how neural networks really work.

但是,您可能对神经网络的实际工作方式仍然有些困惑

This tutorial will put together the pieces we’ve already discussed so that you can understand how neural networks work in practice.

本教程将把我们已经讨论过的部分放在一起,以便您了解神经网络在实践中是如何工作的。

我们将在本教程中使用的示例 (The Example We’ll Be Using In This Tutorial)

This tutorial will work through a real-world example step-by-step so that you can understand how neural networks make predictions.

本教程将逐步介绍一个真实的示例,以便您可以了解神经网络如何进行预测。

More specifically, we will be dealing with property valuations.

更具体地说,我们将处理房地产估价。

You probably already know that there are a ton of factors that influence house prices, including the economy, interest rates, its number of bedrooms/bathrooms, and its location.

你可能已经知道,有一的因素影响,房价,包括经济,利率,其卧室/浴室的数目,它的位置。

The high dimensionality of this data set makes it an interesting candidate for building and training a neural network on.

该数据集的高维度使其成为构建和训练神经网络的有趣候选对象。

One caveat about this section is the neural network we will be using to make predictions has already been trained. We’ll explore the process for training a new neural network in the next section of this tutorial.

关于这一部分的一个警告是我们将用来进行预测的神经网络已经过训练 。 在本教程的下一部分中,我们将探讨训练新神经网络的过程。

数据集中的参数 (The Parameters In Our Data Set)

Let’s start by discussing the parameters in our data set. More specifically, let’s imagine that the data set contains the following parameters:

让我们开始讨论数据集中的参数。 更具体地说,让我们假设数据集包含以下参数:

  • Square footage

    平方英尺
  • Bedrooms

    卧室
  • Distance to city center

    到市中心的距离
  • House age

    入室年龄

These four parameters will form the input layer of the artificial neural network. Note that in reality, there are likely many more parameters that you could use to train a neural network to predict housing prices. We have constrained this number to four to keep the example reasonably simple.

这四个参数将构成人工神经网络的输入层。 请注意,实际上,您可能会使用更多参数来训练神经网络来预测房价。 为了使示例相当简单,我们将此数字限制为四个。

神经网络的最基本形式 (The Most Basic Form of a Neural Network)

In its most basic form, a neural network only has two layers - the input layer and the output layer. The output layer is the component of the neural net that actually makes predictions.

在其最基本的形式中,神经网络只有两层-输入层和输出层。 输出层是实际进行预测的神经网络的组成部分。

For example, if you wanted to make predictions using a simple weighted sum (also called linear regression) model, your neural network would take the following form:

例如,如果您想使用简单的加权和(也称为线性回归)模型进行预测,则神经网络将采用以下形式:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

While this diagram is a bit abstract, the point is that most neural networks can be visualized in this manner:

尽管此图有点抽象,但要点是大多数神经网络都可以这种方式可视化:

  • An input layer

    输入层
  • Possibly some hidden layers

    可能有些隐藏层
  • An output layer

    输出层

It is the hidden layer of neurons that causes neural networks to be so powerful for calculating predictions.

正是神经元的隐藏层使神经网络在计算预测方面如此强大。

For each neuron in a hidden layer, it performs calculations using some (or all) of the neurons in the last layer of the neural network. These values are then used in the next layer of the neural network.

对于隐藏层中的每个神经元,它使用神经网络最后一层中的某些(或全部)神经元执行计算。 然后,将这些值用于神经网络的下一层。

神经网络隐藏层中神经元的目的 (The Purpose of Neurons in the Hidden Layer of a Neural Network)

You are probably wondering – what exactly does each neuron in the hidden layer mean? Said differently, how should machine learning practitioners interpret these values?

您可能想知道–隐藏层中的每个神经元到底是什么意思 ? 换句话说,机器学习从业者应该如何解释这些价值观?

Generally speaking, neurons in the midden layers of a neural net are activated (meaning their activation function returns 1) for an input value that satisfies certain sub-properties.

一般来说,对于满足某些子属性的输入值,将**神经网​​络中间层的神经元(这意味着它们的**函数返回1 )。

For our housing price prediction model, one example might be 5-bedroom houses with small distances to the city center.

对于我们的房价预测模型,一个示例可能是距离市中心不远的五居室房屋。

In most other cases, describing the characteristics that would cause a neuron in a hidden layer to activate is not so easy.

在大多数其他情况下,描述会导致隐藏层中的神经元**的特征并不容易。

神经元如何确定其输入值 (How Neurons Determine Their Input Values)

Earlier in this tutorial, I wrote “For each neuron in a hidden layer, it performs calculations using some (or all) of the neurons in the last layer of the neural network.”

在本教程的前面,我写道:“对于隐藏层中的每个神经元,它使用神经网络最后一层中的一些(或全部)神经元执行计算。”

This illustrates an important point – that each neuron in a neural net does not need to use every neuron in the preceding layer.

这说明了一个重要的观点–神经网络中的每个神经元都不需要使用上一层中的每个神经元。

The process through which neurons determine which input values to use from the preceding layer of the neural net is called training the model. We will learn more about training neural nets in the next section of this course.

神经元从神经网络的前一层确定要使用哪些输入值的过程称为训练模型。 我们将在本课程的下一部分中学习有关训练神经网络的更多信息。

可视化神经网络的预测过程 (Visualizing A Neural Net’s Prediction Process)

When visualizing a neutral network, we generally draw lines from the previous layer to the current layer whenever the preceding neuron has a weight above 0 in the weighted sum formula for the current neuron.

当可视化中立网络时,通常在当前神经元的加权总和公式中,只要前一个神经元的权重大于0 ,我们通常就从前一层到当前层画线。

The following image will help visualize this:

下图将有助于可视化此图像:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

As you can see, not every neuron-neuron pair has synapse. x4 only feeds three out of the five neurons in the hidden layer, as an example. This illustrates an important point when building neural networks – that not every neuron in a preceding layer must be used in the next layer of a neural network.

如您所见,并非每个神经元-神经元对都有突触。 x4仅提供隐藏层中五个神经元中的三个。 这说明了构建神经网络时的一个重要点-并非上一层中的每个神经元都必须在神经网络的下一层中使用。

如何训练神经网络 (How Neural Networks Are Trained)

So far you have learned the following about neural networks:

到目前为止,您已经了解了有关神经网络的以下知识:

  • That they are composed of neurons

    他们是由神经元组成的
  • That each neuron uses an activation function applied to the weighted sum of the outputs from the preceding layer of the neural network

    每个神经元都使用一个**函数,该函数应用于来自神经网络前一层的输出的加权和
  • A broad, no-code overview of how neural networks make predictions

    关于神经网络如何进行预测的广泛的无代码概述

We have not yet covered a very important part of the neural network engineering process: how neural networks are trained.

我们尚未涵盖神经网络工程过程中非常重要的部分:如何训练神经网络。

Now you will learn how neural networks are trained. We’ll discuss data sets, algorithms, and broad principles used in training modern neural networks that solve real-world problems.

现在,您将学习如何训练神经网络。 我们将讨论用于训练解决实际问题的现代神经网络的数据集,算法和广泛原理。

硬编码与软编码 (Hard-Coding vs. Soft-Coding)

There are two main ways that you can develop computer applications. Before digging in to how neural networks are trained, it’s important to make sure that you have an understanding of the difference between hard-coding and soft-coding computer programs.

开发计算机应用程序的主要方法有两种。 在深入探讨如何训练神经网络之前,重要的是要确保您了解hard-codingsoft-coding计算机程序之间的区别。

Hard-coding means that you explicitly specify input variables and your desired output variables. Said differently, hard-coding leaves no room for the computer to interpret the problem that you’re trying to solve.

硬编码意味着您明确指定输入变量和所需的输出变量。 换句话说,硬编码没有空间让计算机解释您要解决的问题。

Soft-coding is the complete opposite. It leaves room for the program to understand what is happening in the data set. Soft-coding allows the computer to develop its own problem-solving approaches.

软编码则完全相反。 它为程序留出了了解数据集中正在发生的情况的空间。 软编码使计算机可以开发自己的问题解决方法。

A specific example is helpful here. Here are two instances of how you might identify cats within a data set using soft-coding and hard-coding techniques.

一个具体的例子在这里很有帮助。 这是两个有关如何使用软编码和硬编码技术识别数据集中的猫的实例。

  • Hard-coding: you use specific parameters to predict whether an animal is a cat. More specifically, you might say that if an animal’s weight and length lie within certain

    硬编码:您使用特定的参数来预测动物是否是猫。 更具体地说,您可能会说,如果动物的体重和长度在一定范围内

  • Soft-coding: you provide a data set that contains animals labelled with their species type and characteristics about those animals. Then you build a computer program to predict whether an animal is a cat or not based on the characteristics in the data set.

    软编码:您提供一个数据集,其中包含标有动物种类类型和有关这些动物特征的动物。 然后,您可以建立一个计算机程序,根据数据集中的特征预测动物是否是猫。

As you might imagine, training neural networks falls into the category of soft-coding. Keep this in mind as you proceed through this course.

您可能会想到,训练神经网络属于软编码类别。 在学习本课程时,请记住这一点。

使用成本函数训练神经网络 (Training A Neural Network Using A Cost Function)

Neural networks are trained using a cost function, which is an equation used to measure the error contained in a network’s prediction.

神经网络使用cost function进行训练, cost function是用于衡量网络预测中包含的误差的方程式。

The formula for a deep learning cost function (of which there are many – this is just one example) is below:

深度学习成本函数的公式(有很多,这只是一个例子)如下:

深度学习算法与深度神经网络_深度学习神经网络用简单的英语解释

Note: this cost function is called the mean squared error, which is why there is an MSE on the left side of the equal sign.

注意:此成本函数称为mean squared error ,这就是为什么等号左侧有一个MSE的原因。

While there is plenty of formula mathematics in this equation, it is best summarized as follows:

尽管此方程式中包含很多公式数学,但最好将其总结如下:

Take the difference between the predicted output value of an observation and the actual output value of that observation. Square that difference and divide it by 2.

Take the difference between the predicted output value of an observation and the actual output value of that observation. Square that difference and divide it by 2.

To reiterate, note that this is simply one example of a cost function that could be used in machine learning (although it is admittedly the most popular choice). The choice of which cost function to use is a complex and interesting topic on its own, and outside the scope of this tutorial.

重申一下,请注意,这只是成本函数的一个示例,可以在机器学习中使用(尽管公认它是最受欢迎的选择)。 使用哪种成本函数的选择本身就是一个复杂而有趣的话题,不在本教程的讨论范围之内。

As mentioned, the goal of an artificial neural network is to minimize the value of the cost function. The cost function is minimized when your algorithm’s predicted value is as close to the actual value as possible. Said differently, the goal of a neural network is to minimize the error it makes in its predictions!

如上所述,人工神经网络的目标是最小化成本函数的值。 当算法的预测值尽可能接近实际值时,成本函数将降至最低。 换句话说,神经网络的目标是最大程度地减少其预测中的误差!

修改神经网络 (Modifying A Neural Network)

After an initial neural network is created and its cost function is imputed, changes are made to the neural network to see if they reduce the value of the cost function.

创建初始神经网络并估算其成本函数后,对神经网络进行更改以查看它们是否降低了成本函数的值。

More specifically, the actual component of the neural network that is modified is the weights of each neuron at its synapse that communicate to the next layer of the network.

更具体地,被修改的神经网络的实际组成部分是每个神经元在其突触处的权重,这些权重与网络的下一层进行通信。

The mechanism through which the weights are modified to move the neural network to weights with less error is called gradient descent. For now, it’s enough for you to understand that the process of training neural networks looks like this:

修改权重以将神经网络移动到误差较小的权重的机制称为gradient descent 。 现在,您已经足够了解神经网络的训练过程如下:

  • Initial weights for the input values of each neuron are assigned

    分配每个神经元输入值的初始权重
  • Predictions are calculated using these initial values

    使用这些初始值计算预测
  • The predictions are fed into a cost function to measure the error of the neural network

    将预测输入到成本函数中以测量神经网络的误差
  • A gradient descent algorithm changes the weights for each neuron’s input values

    梯度下降算法更改每个神经元输入值的权重
  • This process is continued until the weights stop changing (or until the amount of their change at each iteration falls below a specified threshold)

    继续此过程,直到权重停止变化(或直到每次迭代的权重变化量降至指定阈值以下)为止。

This may seem very abstract - and that’s OK! These concepts are usually only fully understood when you begin training your first machine learning models.

这看起来很抽象-没关系! 这些概念通常只有在您开始训练您的第一个机器学习模型时才被完全理解

最后的想法 (Final Thoughts)

In this tutorial, you learned about how neural networks perform computations to make useful predictions.

在本教程中,您学习了神经网络如何执行计算以做出有用的预测。

If you're interested in learning more about building, training, and deploying cutting-edge machine learning model, my eBook Pragmatic Machine Learning will teach you how to build 9 different machine learning models using real-world projects.

如果您想了解有关构建,训练和部署前沿机器学习模型的更多信息,我的电子书实用机器学习电子书将教您如何使用实际项目构建9种不同的机器学习模型。

You can deploy the code from the eBook to your GitHub or personal portfolio to show to prospective employers. The book launches on August 3rd – preorder it for 50% off now!

您可以将代码从电子书部署到GitHub或个人投资组合,以向潜在雇主展示。 该书将于8月3日发行, 现在可以50%的价格预订

翻译自: https://www.freecodecamp.org/news/deep-learning-neural-networks-explained-in-plain-english/

深度学习算法与深度神经网络

相关文章: