DeepLearning(一)最佳环境搭配与入门资料


【原创】Liu_LongPo 转载请注明出处
【CSDN】http://blog.csdn.net/llp1992

最近由于毕业论文的原因搞得学习进度有点慢,过了5月份再加快进度。

DeepLearning,也就是我们所说的深度学习。深度学习是机器学习的一个分支,属于无监督学习,近年来深度学习在语音识别和图像识别等领域取得了巨大的成功。

深度学习的本质,就是通过构建具有很多隐层的机器学习模型和海量的训练数据,来学习数据中更加有用的特征。也就是说,训练数据的特征不用我们去提取了,深度学习帮我们干了这些事。也就是说,我们以往HOG特征、LBP特征、Haar特征等特征提取的算法,如今都可以用DeepLearning 来代替,而且DeepLearning学习到的特征能够更加准确地反映数据的本质,这也就是DeepLearning能够完成精确的算法分类以及预测的根据所在。

好了,扯太多了。接下来主要介绍如何搭建一个非常好用的DeepLearning学习平台,以及分享一些入门资料。

DeepLearning学习平台搭建

DeepLearning现在主要是用Python或者是matlab语言编写,matlab语言的话,在windows环境下可以直接用,就不介绍了。这里主要介绍Python语言的。

这里默认环境是Linux,笔者的系统是Ubuntu12.04

首先,Ubuntu12.04自带了Python,因此我们不用安装了,要在linux环境下编写python,个人推荐使用sublime Text2,轻量化,用户体验好,而且还有一些Python插件。

在ubuntu下安装sublime Text2,可以参考
http://jingyan.baidu.com/article/3aed632e66dc877011809166.html

然后就是为sublime Text2搭建各种插件了,可以参考
http://www.cnblogs.com/dolphin0520/archive/2013/04/29/3046237.html

这里我个人推荐AndyPython 和 Bracket Highlighter 两个插件,AndyPython是编写python的智能补全插件,而且安装后不用配置就可以直接使用,传说中的很强大的SublimeCodeIntel 插件,如果不会配置,结果还是跟没装一样,呵呵。

这一步完成之后,效果如下:


美哉美哉,客官请慢用!

安装完sublime Text2之后,我们继续搭建DeepLearning环境。DeepLearning的代码依赖于几个库:Numpy,Theano,matplotlib,BLAS。

Numpy主要用于矩阵操作,Theano主要用于编写DeepLearning方便,matplotlib用于画图,BLAS即Basic Linear Algebra Subprograms,也就是基础线性代数程序集的意思。

Numpy安装

sudo apt-get install python-numpy
sudo apt-get install python-scipy

matplotlib安装

sudo apt-get install python-matplotlib

BLAS安装

sudo apt-get install libblas-dev

Theano安装

这里可以用git命令安装,如果没有git,先要安装git

Git安装

sudo apt-get install git

Theano安装

git clone git://github.com/Theano/Theano.git

Theano通过git方式安装的过程下载会很慢,我这里已经下载好了,需要可以直接在这里下载,然后解压,然后进入 Theano 文件夹,最后在终端下用 python 命令安装。

sudo python setup.py install

嗯,到这里,所有的软件安装和环境搭配都已经做好了,接下来我们来下载DeepLearning的数据和代码。

DeepLearning的数据和代码下载

命令行输入如下:

git clone git://github.com/lisa-lab/DeepLearningTutorials.git

下载完后,加入你下载的DeepLearningTutorials 文件位置为:
~/DeepLearningTutorials

接下来,进入到 data/ 目录,获取数据集(dataset),

cd ~/DeepLearningTutorials/data/
sh download.sh

然后数据集就会通过 wget 自动下载到 data/ 目录下,数据集下载完成后,便可以进入到 code/ 目录,运行指南提供的 Demo 程序了。

至此,环境搭配与数据集下载全部做完,请尽情下DeepLearningzhong”遨游”~~~

入门资料

DeepLearning的入门资料网上还是挺多的,这里稍微归纳一下:

NG的matlab版本:UFLDL

Deep Learning Tutorials

还有我的一篇博客:机器学习(Machine Learning)&深度学习(Deep Learning)资料 .

其他的,比如Python还不会?不怕

Python 基础教程

什么?Numpy不会?不怕

NumPy的详细教程

什么?Theano不会?不怕

Tutorial Tutorials

全英的,不要说英语也不会哦,我帮不了你,自己去背单词吧。

当然DeepLearning的资料还有各种论文,这里就不介绍了,在这机器学习(Machine Learning)&深度学习(Deep Learning)资料 里面有很多。

等过了毕业论文这一关,后期还会有更多关于DeepLearning的博客,欢迎关注,也欢迎大家分享知识,共同进步。

  • 5
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Chapter 1, Theano Basics, helps the reader to reader learn main concepts of Theano to write code that can compile on different hardware architectures and optimize automatically complex mathematical objective functions. Chapter 2, Classifying Handwritten Digits with a Feedforward Network, will introduce a simple, well-known and historical example which has been the starting proof of superiority of deep learning algorithms. The initial problem was to recognize handwritten digits. Chapter 3, Encoding word into Vector, one of the main challenge with neural nets is to connect the real world data to the input of a neural net, in particular for categorical and discrete data. This chapter presents an example on how to build an embedding space through training with Theano. Such embeddings are very useful in machine translation, robotics, image captioning, and so on because they translate the real world data into arrays of vectors that can be processed by neural nets. Chapter 4, Generating Text with a Recurrent Neural Net, introduces recurrency in neural nets with a simple example in practice, to generate text. Recurrent neural nets (RNN) are a popular topic in deep learning, enabling more possibilities for sequence prediction, sequence generation, machine translation, connected objects. Natural Language Processing (NLP) is a second field of interest that has driven the research for new machine learning techniques. Chapter 5, Analyzing Sentiments with a Bidirectional LSTM, applies embeddings and recurrent layers to a new task of natural language processing, sentiment analysis. It acts as a kind of validation of prior chapters. In the meantime, it demonstrates an alternative way to build neural nets on Theano, with a higher level library, Keras. Chapter 6, Locating with Spatial Transformer Networks, applies recurrency to image, to read multiple digits on a page at once. This time, we take the opportunity to rewrite the classification network for handwritten digits images, and our recurrent models, with the help of Lasagne, a library of built-in modules for deep learning with Theano. Lasagne library helps design neural networks for experimenting faster. With this help, we'll address object localization, a common computer vision challenge, with Spatial Transformer modules to improve our classification scores. Chapter 7, Classifying Images with Residual Networks, classifies any type of images at the best accuracy. In the mean time, to build more complex nets with ease, we introduce a library based on Theano framework, Lasagne, with many already implemented components to help implement neural nets faster for Theano. Chapter 8, Translating and Explaining through Encoding – decoding Networks, presents encoding-decoding techniques: applied to text, these techniques are heavily used in machine-translation and simple chatbots systems. Applied to images, they serve scene segmentations and object localization. Last, image captioning is a mixed, encoding images and decoding to texts. This chapter goes one step further with a very popular high level library, Keras, that simplifies even more the development of neural nets with Theano. Chapter 9, Selecting Relevant Inputs or Memories with the Mechanism of Attention, for solving more complicated tasks, the machine learning world has been looking for higher level of intelligence, inspired by nature: reasoning, attention and memory. In this chapter, the reader will discover the memory networks on the main purpose of artificial intelligence for natural language processing (NLP): the language understanding. Chapter 10, Predicting Times Sequence with Advanced RNN, time sequences are an important field where machine learning has been used heavily. This chapter will go for advanced techniques with Recurrent Neural Networks (RNN), to get state-of-art results. Chapter 11, Learning from the Environment with Reinforcement, reinforcement learning is the vast area of machine learning, which consists in training an agent to behave in an environment (such as a video game) so as to optimize a quantity (maximizing the game score), by performing certain actions in the environment (pressing buttons on the controller) and observing what happens. Reinforcement learning new paradigm opens a complete new path for designing algorithms and interactions between computers and real world. Chapter 12, Learning Features with Unsupervised Generative Networks, unsupervised learning consists in new training algorithms that do not require the data to be labeled to be trained. These algorithms try to infer the hidden labels from the data, called the factors, and, for some of them, to generate new synthetic data. Unsupervised training is very useful in many cases, either when no labeling exists, or when labeling the data with humans is too expensive, or lastly when the dataset is too small and feature engineering would overfit the data. In this last case, extra amounts of unlabeled data train better features as a basis for supervised learning. Chapter 13, Extending Deep Learning with Theano, extends the set of possibilities in Deep Learning with Theano. It addresses the way to create new operators for the computation graph, either in Python for simplicity, or in C to overcome the Python overhead, either for the CPU or for the GPU. Also, introduces the basic concept of parallel programming for GPU. Lastly, we open the field of General Intelligence, based on the first skills developped in this book, to develop new skills, in a gradual way, to improve itself one step further.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值