深度学习工作站攒机指南_想知道深度学习的工作原理吗? 这是每个人的快速指南。...

深度学习工作站攒机指南

by Radu Raicea

由Radu Raicea

Artificial Intelligence (AI) and Machine Learning (ML) are some of the hottest topics right now.

人工智能 (AI)和机器学习 (ML)是目前最热门的话题。

The term “AI” is thrown around casually every day. You hear aspiring developers saying they want to learn AI. You also hear executives saying they want to implement AI in their services. But quite often, many of these people don’t understand what AI is.

术语“ AI”每天都随便乱扔。 您会听到有抱负的开发人员说他们想学习AI。 您还会听到高管说他们想在其服务中实施AI。 但是很多时候,其中许多人不了解什么是AI。

Once you’ve read this article, you will understand the basics of AI and ML. More importantly, you will understand how Deep Learning, the most popular type of ML, works.

阅读本文后,您将了解AI和ML的基础知识。 更重要的是,您将了解最流行的ML类型深度学习的工作原理。

This guide is intended for everyone, so no advanced mathematics will be involved.

本指南面向所有人,因此不会涉及任何高级数学。

背景 (Background)

The first step towards understanding how Deep Learning works is to grasp the differences between important terms.

理解深度学习如何工作的第一步是掌握重要术语之间的差异。

人工智能与机器学习 (Artificial Intelligence vs Machine Learning)

Artificial Intelligence is the replication of human intelligence in computers.

人工智能是人类在计算机中的复制。

When AI research first started, researchers were trying to replicate human intelligence for specific tasks — like playing a game.

人工智能研究刚开始时,研究人员试图将人类智能复制到特定任务上,例如玩游戏。

They introduced a vast number of rules that the computer needed to respect. The computer had a specific list of possible actions, and made decisions based on those rules.

他们介绍了计算机需要遵守的大量规则。 计算机具有特定的可能动作列表,并根据这些规则进行决策。

Machine Learning refers to the ability of a machine to learn using large data sets instead of hard coded rules.

机器学习是指机器使用大数据集而不是硬编码规则进行学习的能力。

ML allows computers to learn by themselves. This type of learning takes advantage of the processing power of modern computers, which can easily process large data sets.

ML允许计算机自行学习。 这种学习利用了现代计算机的处理能力,可以轻松处理大型数据集。

监督学习与无监督学习 (Supervised learning vs unsupervised learning)

Supervised Learning involves using labelled data sets that have inputs and expected outputs.

监督学习涉及使用带有输入和预期输出的标记数据集。

When you train an AI using supervised learning, you give it an input and tell it the expected output.

当您使用监督学习训练AI时,您会给它一个输入并告诉它预期的输出。

If the output generated by the AI is wrong, it will readjust its calculations. This process is done iteratively over the data set, until the AI makes no more mistakes.

如果AI生成的输出错误,它将重新调整其计算。 在数据集上反复进行此过程,直到AI不再犯错误为止。

An example of supervised learning is a weather-predicting AI. It learns to predict weather using historical data. That training data has inputs (pressure, humidity, wind speed) and outputs (temperature).

监督学习的一个例子是天气预报AI。 它学会使用历史数据预测天气。 该训练数据具有输入(压力,湿度,风速)和输出(温度)。

Unsupervised Learning is the task of machine learning using data sets with no specified structure.

无监督学习是使用没有指定结构的数据集进行机器学习的任务。

When you train an AI using unsupervised learning, you let the AI make logical classifications of the data.

当您使用无监督学习训练AI时,您可以让AI对数据进行逻辑分类。

An example of unsupervised learning is a behavior-predicting AI for an e-commerce website. It won’t learn by using a labelled data set of inputs and outputs.

无监督学习的一个示例是电子商务网站的行为预测AI。 使用带有标签的输入和输出数据集将无法学习。

Instead, it will create its own classification of the input data. It will tell you which kind of users are most likely to buy different products.

相反,它将创建自己的输入数据分类。 它会告诉您哪种类型的用户最有可能购买不同的产品。

现在,深度学习如何工作? (Now, how does Deep Learning work?)

You’re now prepared to understand what Deep Learning is, and how it works.

您现在准备了解什么是深度学习及其工作原理。

Deep Learning is a machine learning method. It allows us to train an AI to predict outputs, given a set of inputs. Both supervised and unsupervised learning can be used to train the AI.

深度学习是一种机器学习方法。 给定一组输入,它允许我们训练AI以预测输出。 监督学习和无监督学习均可用于训练AI。

We will learn how deep learning works by building an hypothetical airplane ticket price estimation service. We will train it using a supervised learning method.

我们将通过构建虚拟的机票价格估算服务来学习深度学习的工作原理。 我们将使用监督学习方法对其进行培训。

We want our airplane ticket price estimator to predict the price using the following inputs (we are excluding return tickets for simplicity):

我们希望我们的机票价格估算器使用以下输入来预测价格(为简单起见,我们不包括往返机票):

  • Origin Airport

    始发机场
  • Destination Airport

    目的地机场
  • Departure Date

    出发日期
  • Airline

    航空公司
神经网络 (Neural networks)

Let’s look inside the brain of our AI.

让我们看一下AI的大脑。

Like animals, our estimator AI’s brain has neurons. They are represented by circles. These neurons are inter-connected.

像动物一样,我们的估算器AI的大脑也有神经元。 它们由圆圈表示。 这些神经元是相互连接的。

The neurons are grouped into three different types of layers:

神经元分为三种不同类型的层:

  1. Input Layer

    输入层
  2. Hidden Layer(s)

    隐藏层
  3. Output Layer

    输出层

The input layer receives input data. In our case, we have four neurons in the input layer: Origin Airport, Destination Airport, Departure Date, and Airline. The input layer passes the inputs to the first hidden layer.

输入层接收输入数据。 在我们的例子中,我们在输入层中有四个神经元:始发机场,目的地机场,出发日期和航空公司。 输入层将输入传递到第一隐藏层。

The hidden layers perform mathematical computations on our inputs. One of the challenges in creating neural networks is deciding the number of hidden layers, as well as the number of neurons for each layer.

隐藏层在我们的输入上执行数学计算。 创建神经网络的挑战之一是确定隐藏层的数量以及每层神经元的数量。

The “Deep” in Deep Learning refers to having more than one hidden layer.

深度学习中的“ 深度 ”是指具有多个隐藏层。

The output layer returns the output data. In our case, it gives us the price prediction.

输出层返回输出数据。 就我们而言,它为我们提供了价格预测。

So how does it compute the price prediction?

那么它如何计算价格预测?

This is where the magic of Deep Learning begins.

这就是深度学习魔力开始的地方。

Each connection between neurons is associated with a weight. This weight dictates the importance of the input value. The initial weights are set randomly.

神经元之间的每个连接都与权重相关。 该权重决定了输入值的重要性。 初始权重是随机设置的。

When predicting the price of an airplane ticket, the departure date is one of the heavier factors. Hence, the departure date neuron connections will have a big weight.

在预测机票价格时,出发日期是较重的因素之一。 因此,出发日期神经元连接将具有很大的权重。

Each neuron has an Activation Function. These functions are hard to understand without mathematical reasoning.

每个神经元都有激活功能 。 如果没有数学推理,这些功能将很难理解。

Simply put, one of its purposes is to “standardize” the output from the neuron.

简而言之,其目的之一是“标准化”神经元的输出。

Once a set of input data has passed through all the layers of the neural network, it returns the output data through the output layer.

一旦一组输入数据通过了神经网络的所有层,它将通过输出层返回输出数据。

Nothing complicated, right?

没什么复杂的,对吧?

训练神经网络 (Training the Neural Network)

Training the AI is the hardest part of Deep Learning. Why?

训练AI是深度学习中最难的部分。 为什么?

  1. You need a large data set.

    您需要一个大数据集

  2. You need a large amount of computational power.

    您需要大量计算能力

For our airplane ticket price estimator, we need to find historical data of ticket prices. And due to the large amount of possible airports and departure date combinations, we need a very large list of ticket prices.

对于我们的机票价格估算器,我们需要找到机票价格的历史数据。 而且由于可能的机场和出发日期组合数量众多,我们需要非常庞大的机票价格清单。

To train the AI, we need to give it the inputs from our data set, and compare its outputs with the outputs from the data set. Since the AI is still untrained, its outputs will be wrong.

要训​​练AI,我们需要为其提供数据集的输入,并将其输出与数据集的输出进行比较。 由于AI仍然未经训练,因此其输出将是错误的。

Once we go through the whole data set, we can create a function that shows us how wrong the AI’s outputs were from the real outputs. This function is called the Cost Function.

遍历整个数据集后,我们可以创建一个函数,向我们展示AI的输出与实际输出有多么错误。 此功能称为成本功能

Ideally, we want our cost function to be zero. That’s when our AI’s outputs are the same as the data set outputs.

理想情况下,我们希望成本函数为零。 那时我们的AI的输出与数据集的输出相同。

我们如何减少成本函数? (How can we reduce the cost function?)

We change the weights between neurons. We could randomly change them until our cost function is low, but that’s not very efficient.

我们改变神经元之间的权重。 我们可以随机更改它们,直到我们的成本函数较低,但这并不是很有效。

Instead, we will use a technique called Gradient Descent.

相反,我们将使用一种称为Gradient Descent的技术。

Gradient Descent is a technique that allows us to find the minimum of a function. In our case, we are looking for the minimum of the cost function.

梯度下降是一项使我们能够找到函数最小值的技术。 就我们而言,我们正在寻找成本函数的最小值。

It works by changing the weights in small increments after each data set iteration. By computing the derivative (or gradient) of the cost function at a certain set of weight, we’re able to see in which direction the minimum is.

它通过在每次数据集迭代后以较小的增量更改权重来工作。 通过计算特定权重下成本函数的导数(或梯度),我们可以看到最小值在哪个方向上。

To minimize the cost function, you need to iterate through your data set many times. This is why you need a large amount of computational power.

为了使成本函数最小化,您需要多次遍历数据集。 这就是为什么您需要大量计算能力的原因。

Updating the weights using gradient descent is done automatically. That’s the magic of Deep Learning!

使用梯度下降更新权重是自动完成的。 这就是深度学习的魔力!

Once we’ve trained our airplane ticket price estimator AI, we can use it to predict future prices.

培训完机票价格估算器AI之后,我们就可以使用它来预测未来的价格。

在哪里可以了解更多? (Where can I learn more?)

There are many other types of neural networks: Convolutional Neural Networks for Computer Vision and Recurrent Neural Networks for Natural Language Processing.

神经网络还有许多其他类型:用于计算机视觉的 卷积神经网络和用于自然语言处理的 递归神经网络

If you want to learn the technical aspect of Deep Learning, I suggest taking an online course.

如果您想学习深度学习的技术方面,建议您参加在线课程。

Currently, one of the best courses for Deep Learning is Andrew Ng’s Deep Learning Specialization. If you’re not interested in getting a certificate, you don’t need to pay for the course. You can audit it for free instead.

目前, Andrew Ng的深度学习专业化 ”是深度学习最好的课程之一。 如果您对获得证书不感兴趣,则无需为课程付费。 您可以免费审核它。

If you have any questions, or want more technical explanations of the concepts, please ask below!

如果您有任何疑问,或者想对这些概念进行更多的技术说明,请在下面提问!

综上所述… (In summary…)

  • Deep Learning uses a Neural Network to imitate animal intelligence.

    深度学习使用神经网络来模仿动物的智力。
  • There are three types of layers of neurons in a neural network: the Input Layer, the Hidden Layer(s), and the Output Layer.

    神经网络中有三种类型的神经元层:输入 层,隐藏层和输出层。

  • Connections between neurons are associated with a weight, dictating the importance of the input value.

    神经元之间的连接与权重相关联,决定了输入值的重要性。
  • Neurons apply an Activation Function on the data to “standardize” the output coming out of the neuron.

    神经元对数据应用激活函数,以“标准化”从神经元出来的输出。
  • To train a Neural Network, you need a large data set.

    要训​​练神经网络,您需要大数据集。
  • Iterating through the data set and comparing the outputs will produce a Cost Function, indicating how much the AI is off from the real outputs.

    遍历数据集并比较输出将产生成本函数,指示AI与实际输出相差多少。
  • After every iteration through the data set, the weights between neurons are adjusted using Gradient Descent to reduce the cost function.

    在数据集的每次迭代之后,使用梯度下降调整神经元之间的权重以减少成本函数。

If you enjoyed this article, please give me some claps so more people see it. Thanks!

如果您喜欢这篇文章,请给我一些鼓掌,以便更多的人看到。 谢谢!

You can also check out my experience of how I got my internship at Shopify!

您也可以查看我在Shopify获得实习的经验

For more updates, follow me on Twitter.

有关更多更新,请在Twitter上关注我。

翻译自: https://www.freecodecamp.org/news/want-to-know-how-deep-learning-works-heres-a-quick-guide-for-everyone-1aedeca88076/

深度学习工作站攒机指南

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值