keras深度学习_Keras-深度学习概述

keras深度学习

keras深度学习

Keras-深度学习概述 (Keras - Overview of Deep learning)

Deep learning is an evolving subfield of machine learning. Deep learning involves analyzing the input in layer by layer manner, where each layer progressively extracts higher level information about the input.

深度学习是机器学习的一个不断发展的子领域。 深度学习涉及逐层分析输入,其中每一层逐步提取有关输入的更高级别的信息。

Let us take a simple scenario of analyzing an image. Let us assume that your input image is divided up into a rectangular grid of pixels. Now, the first layer abstracts the pixels. The second layer understands the edges in the image. The Next layer constructs nodes from the edges. Then, the next would find branches from the nodes. Finally, the output layer will detect the full object. Here, the feature extraction process goes from the output of one layer into the input of the next subsequent layer.

让我们以分析图像的简单场景为例。 让我们假设您的输入图像被分成像素的矩形网格。 现在,第一层提取像素。 第二层了解图像中的边缘。 下一步层从边缘构造节点。 然后,下一个将从节点中找到分支。 最后,输出层将检测到整个对象。 在这里,特征提取过程从一层的输出转到下一个下一层的输入。

By using this approach, we can process huge amount of features, which makes deep learning a very powerful tool. Deep learning algorithms are also useful for the analysis of unstructured data. Let us go through the basics of deep learning in this chapter.

通过使用这种方法,我们可以处理大量功能,这使深度学习成为非常强大的工具。 深度学习算法对于非结构化数据的分析也很有用。 让我们在本章中学习深度学习的基础知识。

人工神经网络 (Artificial Neural Networks)

The most popular and primary approach of deep learning is using “Artificial neural network” (ANN). They are inspired from the model of human brain, which is the most complex organ of our body. The human brain is made up of more than 90 billion tiny cells called “Neurons”. Neurons are inter-connected through nerve fiber called “axons” and “Dendrites”. The main role of axon is to transmit information from one neuron to another to which it is connected.

深度学习最流行和最主要的方法是使用“人工神经网络”(ANN)。 它们的灵感来自人类大脑的模型,这是人体最复杂的器官。 人脑由超过900亿个称为“神经元”的微小细胞组成。 神经元通过称为“轴突”和“树突”的神经纤维相互连接。 轴突的主要作用是将信息从一个神经元传递到与其连接的另一神经元。

Similarly, the main role of dendrites is to receive the information being transmitted by the axons of another neuron to which it is connected. Each neuron processes a small information and then passes the result to another neuron and this process continues. This is the basic method used by our human brain to process huge about of information like speech, visual, etc., and extract useful information from it.

同样,树突的主要作用是接收与之相连的另一个神经元的轴突传递的信息。 每个神经元处理少量信息,然后将结果传递给另一个神经元,此过程继续进行。 这是人脑处理大量信息(如语音,视觉等)并从中提取有用信息的基本方法。

Based on this model, the first Artificial Neural Network (ANN) was invented by psychologist Frank Rosenblatt, in the year of 1958. ANNs are made up of multiple nodes which is similar to neurons. Nodes are tightly interconnected and organized into different hidden layers. The input layer receives the input data and the data goes through one or more hidden layers sequentially and finally the output layer predict something useful about the input data. For example, the input may be an image and the output may be the thing identified in the image, say a “Cat”.

基于此模型,心理学家Frank Rosenblatt于1958年发明了第一个人工神经网络。人工神经网络由类似于神经元的多个节点组成。 节点紧密互连,并组织成不同的隐藏层。 输入层接收输入数据,数据依次经过一个或多个隐藏层,最后输出层预测有关输入数据的有用信息。 例如,输入可以是图像,而输出可以是图像中标识的东西,例如“猫”。

A single neuron (called as perceptron in ANN) can be represented as below −

单个神经元(在ANN中称为感知器)可以表示如下-

Artificial Neural Networks

Here,

这里,

  • Multiple input along with weight represents dendrites.

    多个输入以及重量代表树突。

  • Sum of input along with activation function represents neurons. Sum actually means computed value of all inputs and activation function represent a function, which modify the Sum value into 0, 1 or 0 to 1.

    输入和激活功能的总和代表神经元。 Sum实际上表示所有输入的计算值,激活函数表示一个函数,它将Sum值修改为0、1或0到1。

  • Actual output represent axon and the output will be received by neuron in next layer.

    实际输出代表轴突,输出将被下一层的神经元接收。

Let us understand different types of artificial neural networks in this section.

让我们在本节中了解不同类型的人工神经网络。

多层感知器 (Multi-Layer Perceptron)

Multi-Layer perceptron is the simplest form of ANN. It consists of a single input layer, one or more hidden layer and finally an output layer. A layer consists of a collection of perceptron. Input layer is basically one or more features of the input data. Every hidden layer consists of one or more neurons and process certain aspect of the feature and send the processed information into the next hidden layer. The output layer process receives the data from last hidden layer and finally output the result.

多层感知器是ANN的最简单形式。 它由一个输入层,一个或多个隐藏层以及最后一个输出层组成。 一层由感知器集合组成。 输入层基本上是输入数据的一个或多个特征。 每个隐藏层由一个或多个神经元组成,并处理特征的某些方面,并将处理后的信息发送到下一个隐藏层。 输出层进程从最后一个隐藏层接收数据,最后输出结果。

Multi-Layer Perceptron

卷积神经网络(CNN) (Convolutional Neural Network (CNN))

Convolutional neural network is one of the most popular ANN. It is widely used in the fields of image and video recognition. It is based on the concept of convolution, a mathematical concept. It is almost similar to multi-layer perceptron except it contains series of convolution layer and pooling layer before the fully connected hidden neuron layer. It has three important layers −

卷积神经网络是最流行的人工神经网络之一。 它广泛应用于图像和视频识别领域。 它基于数学概念卷积的概念。 它几乎与多层感知器相似,不同之处在于它在完全连接的隐藏神经元层之前包含一系列卷积层和池化层。 它具有三个重要的层-

  • Convolution layer − It is the primary building block and perform computational tasks based on convolution function.

    卷积层 -它是主要的构建块,并基于卷积函数执行计算任务。

  • Pooling layer − It is arranged next to convolution layer and is used to reduce the size of inputs by removing unnecessary information so computation can be performed faster.

    池层 -它位于卷积层旁边,用于通过删除不必要的信息来减小输入的大小,从而可以更快地执行计算。

  • Fully connected layer − It is arranged to next to series of convolution and pooling layer and classify input into various categories.

    完全连接的层 -安排在一系列卷积和池化层的旁边,并将输入分类为各种类别。

A simple CNN can be represented as below −

一个简单的CNN可以表示如下-

CNN

Here,

这里,

  • 2 series of Convolution and pooling layer is used and it receives and process the input (e.g. image).

    使用2系列卷积和池化层,它接收并处理输入(例如图像)。

  • A single fully connected layer is used and it is used to output the data (e.g. classification of image)

    使用单个完全连接的层,并用于输出数据(例如,图像分类)

递归神经网络(RNN) (Recurrent Neural Network (RNN))

Recurrent Neural Networks (RNN) are useful to address the flaw in other ANN models. Well, Most of the ANN doesn’t remember the steps from previous situations and learned to make decisions based on context in training. Meanwhile, RNN stores the past information and all its decisions are taken from what it has learnt from the past.

递归神经网络(RNN)对于解决其他ANN模型中的缺陷很有用。 好吧,大多数ANN都不记得以前的情况,而是学会根据训练中的情境做出决策。 同时,RNN存储了过去的信息,其所有决策都是从过去的经验中学到的。

This approach is mainly useful in image classification. Sometimes, we may need to look into the future to fix the past. In this case bidirectional RNN is helpful to learn from the past and predict the future. For example, we have handwritten samples in multiple inputs. Suppose, we have confusion in one input then we need to check again other inputs to recognize the correct context which takes the decision from the past.

该方法主要用于图像分类。 有时,我们可能需要展望未来以修正过去。 在这种情况下,双向RNN有助于从过去学习和预测未来。 例如,我们有多个输入的手写样本。 假设我们在一个输入中有混淆,然后我们需要再次检查其他输入以识别做出过去决定的正确上下文。

人工神经网络的工作流程 (Workflow of ANN)

Let us first understand the different phases of deep learning and then, learn how Keras helps in the process of deep learning.

首先让我们了解深度学习的不同阶段,然后了解Keras在深度学习过程中如何提供帮助。

收集所需数据 (Collect required data)

Deep learning requires lot of input data to successfully learn and predict the result. So, first collect as much data as possible.

深度学习需要大量输入数据才能成功学习和预测结果。 因此,首先要收集尽可能多的数据。

分析数据 (Analyze data)

Analyze the data and acquire a good understanding of the data. The better understanding of the data is required to select the correct ANN algorithm.

分析数据并获得对数据的良好理解。 选择正确的ANN算法需要对数据有更好的了解。

选择一种算法(模型) (Choose an algorithm (model))

Choose an algorithm, which will best fit for the type of learning process (e.g image classification, text processing, etc.,) and the available input data. Algorithm is represented by Model in Keras. Algorithm includes one or more layers. Each layers in ANN can be represented by Keras Layer in Keras.

选择一种最适合学习过程类型(例如图像分类,文本处理等)和可用输入数据的算法。 算法由Keras中的模型表示。 算法包括一层或多层。 ANN中的每个层都可以用Keras中的Keras层表示。

  • Prepare data − Process, filter and select only the required information from the data.

    准备数据 -处理,过滤和仅从数据中选择所需的信息。

  • Split data − Split the data into training and test data set. Test data will be used to evaluate the prediction of the algorithm / Model (once the machine learn) and to cross check the efficiency of the learning process.

    拆分数据 -将数据拆分为训练和测试数据集。 测试数据将用于评估算法/模型的预测(一旦机器学习),并交叉检查学习过程的效率。

  • Compile the model − Compile the algorithm / model, so that, it can be used further to learn by training and finally do to prediction. This step requires us to choose loss function and Optimizer. loss function and Optimizer are used in learning phase to find the error (deviation from actual output) and do optimization so that the error will be minimized.

    编译模型 -编译算法/模型,以便可以通过训练进一步学习,最后进行预测。 这一步需要我们选择损失函数和优化器。 损失函数和优化器用于学习阶段,以查找错误(与实际输出的偏差)并进行优化,以使错误最小化。

  • Fit the model − The actual learning process will be done in this phase using the training data set.

    拟合模型 -实际的学习过程将在此阶段使用训练数据集完成。

  • Predict result for unknown value − Predict the output for the unknown input data (other than existing training and test data)

    预测未知值的结果 -预测未知输入数据的输出(现有培训和测试数据除外)

  • Evaluate model − Evaluate the model by predicting the output for test data and cross-comparing the prediction with actual result of the test data.

    评估模型 -通过预测测试数据的输出并将预测与测试数据的实际结果进行交叉比较来评估模型

  • Freeze, Modify or choose new algorithm − Check whether the evaluation of the model is successful. If yes, save the algorithm for future prediction purpose. If not, then modify or choose new algorithm / model and finally, again train, predict and evaluate the model. Repeat the process until the best algorithm (model) is found.

    冻结,修改或选择新算法 -检查模型评估是否成功。 如果是,则保存算法以供将来预测之用。 如果不是,则修改或选择新的算法/模型,最后再次训练,预测和评估模型。 重复该过程,直到找到最佳算法(模型)为止。

The above steps can be represented using below flow chart −

可以使用以下流程图表示以上步骤-

ANN

翻译自: https://www.tutorialspoint.com/keras/keras_overview_of_deep_learning.htm

keras深度学习

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
图书可以从下面的链接下载 http://download.csdn.net/detail/u013003382/9832573 Deep Learning with Keras by Antonio Gulli English | 26 Apr. 2017 | ASIN: B06Y2YMRDW | 318 Pages | AZW3 | 10.56 MB Key Features Implement various deep-learning algorithms in Keras and see how deep-learning can be used in games See how various deep-learning models and practical use-cases can be implemented using Keras A practical, hands-on guide with real-world examples to give you a strong foundation in Keras Book Description This book starts by introducing you to supervised learning algorithms such as simple linear regression, the classical multilayer perceptron and more sophisticated deep convolutional networks. You will also explore image processing with recognition of hand written digit images, classification of images into different categories, and advanced objects recognition with related image annotations. An example of identification of salient points for face detection is also provided. Next you will be introduced to Recurrent Networks, which are optimized for processing sequence data such as text, audio or time series. Following that, you will learn about unsupervised learning algorithms such as Autoencoders and the very popular Generative Adversarial Networks (GAN). You will also explore non-traditional uses of neural networks as Style Transfer. Finally, you will look at Reinforcement Learning and its application to AI game playing, another popular direction of research and application of neural networks. What you will learn Optimize step-by-step functions on a large neural network using the Backpropagation Algorithm Fine-tune a neural network to improve the quality of results Use deep learning for image and audio processing Use Recursive Neural Tensor Networks (RNTNs) to outperform standard word embedding in special cases Identify problems for which Recurrent Neural Network (RNN) solutions are suitable Explore the process required to implement Autoencoders Evolve a deep neural network using reinforcement learning About the Author Antonio Gulli is a software executive and business leader with a passion for establishing and managing global technological talent, innovation, and execution. He is an expert in search engines, online services, machine learning, information retrieval, analytics, and cloud computing. So far, he has been lucky enough to gain professional experience in four different countries in Europe and managed people in six different countries in Europe and America. Antonio served as CEO, GM, CTO, VP, director, and site lead in multiple fields spanning from publishing (Elsevier) to consumer internet (Ask.com and Tiscali) and high-tech R&D (Microsoft and Google). Sujit Pal is a technology research director at Elsevier Labs, working on building intelligent systems around research content and metadata. His primary interests are information retrieval, ontologies, natural language processing, machine learning, and distributed processing. He is currently working on image classification and similarity using deep learning models. Prior to this, he worked in the consumer healthcare industry, where he helped build ontology-backed semantic search, contextual advertising, and EMR data processing platforms. He writes about technology on his blog at Salmon Run. Table of Contents Neural Networks Foundations Keras Installation and API Deep Learning with ConvNets Generative Adversarial Networks and WaveNet Word Embeddings Recurrent Neural Network — RNN Additional Deep Learning Models AI Game Playing Conclusion

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值