deep-learning-keras-tensorflow:使用Keras和Tensorflow的深度神经网络简介

  • h3_676892
    了解作者
  • 34.2MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 18:33
    上传日期
使用Keras和Tensorflow进行深度学习 作者:Valerio Maggio 联系人: valeriomaggio_at_gmail git clone https://github.com/leriomaggio/deep-learning-keras-tensorflow.git 目录 第一部分:简介 人工神经网络简介 Perceptron和MLP 天真的纯Python实现 快进,sgd,反向传播 深度学习框架简介 Theano简介 Tensorflow简介 介绍Keras 概述和主要功能 core层概述 多层感知器和全连接keras.models.Sequential和Den
deep-learning-keras-tensorflow-master.zip
  • deep-learning-keras-tensorflow-master
  • deep-learning-osx.yml
    3.4KB
  • 8. Extra
  • 8.2 Multi-Modal Networks.ipynb
    10.8KB
  • 8.1 Custom Layer.ipynb
    8.3KB
  • Conclusions.ipynb
    2.5KB
  • 0. Preamble.ipynb
    9.2KB
  • 7. Recurrent Neural Networks
  • 7.2 LSTM for Sentence Generation.ipynb
    14.3KB
  • 7.1 RNN and LSTM.ipynb
    244.1KB
  • data
  • intro_to_ann.csv
    12.9KB
  • kaggle_ottogroup
  • train.csv
    11.9MB
  • test.csv
    26.6MB
  • mnist.pkl.gz
    14.6MB
  • word_embeddings
  • male_blog_list.txt
    2.5MB
  • rt-polarity.neg
    597.9KB
  • rt-polarity.pos
    611.5KB
  • female_blog_list.txt
    2.1MB
  • 2. Deep Learning Frameworks
  • 2.3.1 Keras Backend.ipynb
    24.3KB
  • 2.3 Introduction to Keras.ipynb
    56.2KB
  • mnist_data.py
    7.2KB
  • 2.2 Introduction - Tensorflow.ipynb
    59.8KB
  • 2.1 Introduction - Theano.ipynb
    12KB
  • kaggle_data.py
    1.8KB
  • 3. Fully Connected Networks and Embeddings
  • 3.0 - MNIST Dataset.ipynb
    6.7KB
  • 3.1 Hidden Layer Representation and Embeddings.ipynb
    227.2KB
  • LICENSE
    1KB
  • imgs
  • LSTM3-chain.png
    224.3KB
  • keras-logo-small.jpg
    30.1KB
  • dl_overview.png
    604.6KB
  • rnn2.png
    12.6KB
  • cnn2.png
    579.5KB
  • logistic_function.png
    299.3KB
  • MLP.png
    71.7KB
  • keras_rank_details.jpg
    278.4KB
  • cnn6.png
    101.8KB
  • overfitting.png
    5.7KB
  • resnet_bb.png
    32.4KB
  • mlp_details.png
    111.8KB
  • cnn3.png
    45.6KB
  • cnn5.png
    110.9KB
  • vgg16.png
    45.2KB
  • fwd_step_net.png
    329.6KB
  • keras-tensorflow-logo.jpg
    36.1KB
  • ConvNet LeNet.png
    43KB
  • twitter_small.png
    3.1KB
  • bkwd_step_net.png
    441.9KB
  • imagenet
  • strawberry_1174.jpeg
    72.9KB
  • strawberry_1189.jpeg
    99.7KB
  • apricot_787.jpeg
    147.6KB
  • apricot_565.jpeg
    199.7KB
  • strawberry_1157.jpeg
    90.5KB
  • apricot_696.jpeg
    56.8KB
  • tf_logo.png
    11KB
  • RNN-unrolled.png
    92KB
  • tensorflow_head.png
    309.9KB
  • MaxPool.png
    16.1KB
  • resnet34.png
    81.2KB
  • autoencoder.png
    21.4KB
  • backprop.png
    153.4KB
  • gmail_small.png
    3.4KB
  • sigmoid.png
    23.7KB
  • conv.png
    185.1KB
  • multi-layers-1.png
    380.3KB
  • gru.png
    47.5KB
  • keDyv.png
    61.6KB
  • convnets_cover.png
    136.2KB
  • multi-layers-2.png
    606.7KB
  • github.jpg
    13.8KB
  • gplus_small.png
    3.5KB
  • vgg19.png
    54.6KB
  • multi_input_model.png
    21.5KB
  • linkedin_small.png
    3.2KB
  • cnn1.png
    165.8KB
  • conference_logo.png
    21.2KB
  • rnn.png
    10.9KB
  • single_layer.png
    464KB
  • Perceptron and MLP.png
    75.6KB
  • cnn4.png
    66.5KB
  • RNN-rolled.png
    21.2KB
  • releases
  • pyss2016_logo.png
    249.2KB
  • pydata_florence.png
    21.2KB
  • keras-tensorflow-logo.jpg
    36.1KB
  • BIforum.PNG
    11.9KB
  • pydata_london.png
    281.6KB
  • euroscipy_2016_logo.png
    78.6KB
  • webvalley2017.png
    16.8KB
  • mnist.png
    109.6KB
  • fwd_step.png
    125.9KB
  • Perceptron.png
    34.6KB
  • keras_rank.jpg
    99.5KB
  • 5. HyperParameter Tuning and Transfer Learning
内容介绍
<div> <h1 style="text-align: center;">Deep Learning with Keras and Tensorflow</h1> <img style="text-align: left" src="https://blog.keras.io/img/keras-tensorflow-logo.jpg" width="15%" /> <div> <br> ### Author: Valerio Maggio #### Contacts: <table style="border: 0px; display: inline-table"> <tbody> <tr style="border: 0px;"> <td style="border: 0px;"> <a href="http://twitter.com/leriomaggio" target="_blank" rel='nofollow' onclick='return false;'>@leriomaggio</a> </td> <td style="border: 0px;"> <a href="it.linkedin.com/in/valeriomaggio" target="_blank" rel='nofollow' onclick='return false;'>valeriomaggio</a> </td> <td style="border: 0px;"> valeriomaggio_at_gmail </td> </tr> </tbody> </table> ```shell git clone https://github.com/leriomaggio/deep-learning-keras-tensorflow.git ``` --- ## Table of Contents - **Part I**: **Introduction** - Intro to Artificial Neural Networks - Perceptron and MLP - naive pure-Python implementation - fast forward, sgd, backprop - Introduction to Deep Learning Frameworks - Intro to Theano - Intro to Tensorflow - Intro to Keras - Overview and main features - Overview of the `core` layers - Multi-Layer Perceptron and Fully Connected - Examples with `keras.models.Sequential` and `Dense` - Keras Backend - **Part II**: **Supervised Learning** - Fully Connected Networks and Embeddings - Intro to MNIST Dataset - Hidden Leayer Representation and Embeddings - Convolutional Neural Networks - meaning of convolutional filters - examples from ImageNet - Visualising ConvNets - Advanced CNN - Dropout - MaxPooling - Batch Normalisation - HandsOn: MNIST Dataset - FC and MNIST - CNN and MNIST - Deep Convolutiona Neural Networks with Keras (ref: `keras.applications`) - VGG16 - VGG19 - ResNet50 - Transfer Learning and FineTuning - Hyperparameters Optimisation - **Part III**: **Unsupervised Learning** - AutoEncoders and Embeddings - AutoEncoders and MNIST - word2vec and doc2vec (gensim) with `keras.datasets` - word2vec and CNN - **Part IV**: **Recurrent Neural Networks** - Recurrent Neural Network in Keras - `SimpleRNN`, `LSTM`, `GRU` - LSTM for Sentence Generation - **PartV**: **Additional Materials**: - Custom Layers in Keras - Multi modal Network Topologies with Keras --- # Requirements This tutorial requires the following packages: - Python version 3.5 - Python 3.4 should be fine as well - likely Python 2.7 would be also fine, but *who knows*? :P - `numpy` version 1.10 or later: http://www.numpy.org/ - `scipy` version 0.16 or later: http://www.scipy.org/ - `matplotlib` version 1.4 or later: http://matplotlib.org/ - `pandas` version 0.16 or later: http://pandas.pydata.org - `scikit-learn` version 0.15 or later: http://scikit-learn.org - `keras` version 2.0 or later: http://keras.io - `tensorflow` version 1.0 or later: https://www.tensorflow.org - `ipython`/`jupyter` version 4.0 or later, with notebook support (Optional but recommended): - `pyyaml` - `hdf5` and `h5py` (required if you use model saving/loading functions in keras) - **NVIDIA cuDNN** if you have NVIDIA GPUs on your machines. [https://developer.nvidia.com/rdp/cudnn-download]() The easiest way to get (most) these is to use an all-in-one installer such as [Anaconda](http://www.continuum.io/downloads) from Continuum. These are available for multiple architectures. --- ### Python Version I'm currently running this tutorial with **Python 3** on **Anaconda** ```python !python --version ``` Python 3.5.2 --- ## Setting the Environment In this repository, files to re-create virtual env with `conda` are provided for Linux and OSX systems, namely `deep-learning.yml` and `deep-learning-osx.yml`, respectively. To re-create the virtual environments (on Linux, for example): ```shell conda env create -f deep-learning.yml ``` For OSX, just change the filename, accordingly. ### Notes about Installing Theano with GPU support **NOTE**: Read this section **only** if after _pip installing_ `theano`, it raises error in enabling the GPU support! Since version `0.9` Theano introduced the [`libgpuarray`](http://deeplearning.net/software/libgpuarray) in the stable release (it was previously only available in the _development_ version). The goal of `libgpuarray` is (_from the documentation_) make a common GPU ndarray (n dimensions array) that can be reused by all projects that is as future proof as possible, while keeping it easy to use for simple need/quick test. Here are some useful tips (hopefully) I came up with to properly install and configure `theano` on (Ubuntu) Linux with **GPU** support: 1) [If you're using Anaconda] `conda install theano pygpu` should be just fine! Sometimes it is suggested to install `pygpu` using the `conda-forge` channel: `conda install -c conda-forge pygpu` 2) [Works with both Anaconda Python or Official CPython] * Install `libgpuarray` from source: [Step-by-step install libgpuarray user library](http://deeplearning.net/software/libgpuarray/installation.html#step-by-step-install-user-library) * Then, install `pygpu` from source: (in the same source folder) `python setup.py build && python setup.py install` * `pip install theano`. After **Theano is installed**: ``` echo "[global] device = cuda floatX = float32 [lib] cnmem = 1.0" > ~/.theanorc ``` ### Installing Tensorflow To date `tensorflow` comes in two different packages, namely `tensorflow` and `tensorflow-gpu`, whether you want to install the framework with CPU-only or GPU support, respectively. For this reason, `tensorflow` has **not** been included in the conda envs and has to be installed separately. #### Tensorflow for CPU only: ```shell pip install tensorflow ``` #### Tensorflow with GPU support: ```shell pip install tensorflow-gpu ``` **Note**: NVIDIA Drivers and CuDNN **must** be installed and configured before hand. Please refer to the official [Tensorflow documentation](https://www.tensorflow.org/install/) for further details. #### Important Note: All the code provided+ in this tutorial can run even if `tensorflow` is **not** installed, and so using `theano` as the (default) backend! ___**This** is exactly the power of Keras!___ Therefore, installing `tensorflow` is **not** stricly required! +: Apart from the **1.2 Introduction to Tensorflow** tutorial, of course. ### Configure Keras with tensorflow By default, Keras is configured with `theano` as backend. If you want to use `tensorflow` instead, these are the simple steps to follow: 1) Create the `keras.json` (if it does not exist): ```shell touch $HOME/.keras/keras.json ``` 2) Copy the following content into the file: ``` { "epsilon": 1e-07, "backend": "tensorflow", "floatx": "float32", "image_data_format": "channels_last" } ``` 3) Verify it is properly configured: ```python !cat ~/.keras/keras.json ``` { "epsilon": 1e-07, "backend": "tensorflow", "floatx": "float32", "image_data_format": "channels_last" } --- # Test if everything is up&running ## 1
评论
    相关推荐
    • keras-master.rar
      conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes 这两行代码用来改成连接清华镜像的 2、接下来安装Tensorflow,创建...
    • keras_classification_tools
      $ git clone https://github.com/kohheinomura/keras_classification_tools.git 下面显示了如何使用Kaggle的数据来使用它。 预设值 创建一个配置文件,用于全面配置设置。可以为配置文件名称指定任何名称。在下面,...
    • Keras_Examples:从https提取的示例
      Keras_范例 DCGAN生成人脸 深梦 神经风格转移 下一帧预测 开关变压器的文本分类 使用Transformer进行文本分类
    • keras-:https
      keras-:https
    • MobileNet_V2_Keras
      使用Keras的MobileNet V2 剧本作者:张胜东 电子邮件: 这是使用Keras的Mobilenet V2( )的Beta版实现。 由于本文的模型描述部分仍存在一些矛盾,因此该脚本是在对脚本作者的最佳理解的基础上实现的。 准备就绪...
    • seya, 给Keras带来一些额外的Cosmo.zip
      seya, 给Keras带来一些额外的Cosmo Seya给Keras带来一些额外的Cosmo 。自由软件:BSD许可文档:https://seya.readthedocs.org 。注:这里代码库是用 Keras 0.3构建的。 在keras1中有一个分支,其中一些层被更新
    • keras vgg 代码实例
      keras vgg 训练自己的数据.详细的观看 https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html
    • Keras.jl:https://keras.io的Julia包装
      Keras.jl:https://keras.io的Julia包装
    • imdb.npz Keras
      百度网盘地址:链接:https://pan.baidu.com/s/1L7rNOHsFsAJSNirWM4ykMw 密码:kjpa 。。。一开始我以为为啥这样的资源都需要资源分,待我分享的时候我懂了。资源分最少一分。。。
    • GroupNormalization-keras:keras 实现组规范化。 https
      GroupNormalization_keras keras 实现组规范化。 吴宇新和何开明 [WIP警报] 该存储库仍在进行中。 组标准化的功能尚未完全检查。 实现可能是错误的。 用法 from GroupNormalization import GroupNormalization ...