IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> Python知识库 -> Introduction to Keras -> 正文阅读

[Python知识库]Introduction to Keras

Two of the top numerical platforms in Python that provide the basic for deep learning research and development are Theano and TensorFlow. Both are very powerful libraries, but both can be difficult to use directly for creating deep learning models. In this lesson you will discover the Keras Python library that provides a clean and convenient way to create a range of deep learning modules on top of Theano or TensorFlow. After completiing this lesson you will know:

  • About the Keras Python library for deep learning
  • How to configure Keras for Theano or TensorFlow.
  • The standard idiom for creating models with Keras.

4.1 What is Keras?

Keras is a minimalist Python library for deep learning that can run on top of Theano or TensorFlow. It was developed to make developing deep learning models as fast and easy as possible for research and development.It is released under the permissive MIT license. Keras was developed and maintained by Fran?cois Chollet, a Google engineer using four guiding principles:

  • Modularity:A model can be understood as a sequence or a graph alone.
  • Minimalism: The library provides just enough to achieve an outcome, no frills and maximizing readability.
  • Extensibility:New components are intentionally easy to add and use within the framework, intended for developers to trial and explore new ideas.
  • Python:No separate model files with custom file formats. Everything is native Python.

4.2 How to Install Keras

Keras can be installed easily using pip:

sudo pip install keras

??

?You can upgrade your installation of Keras using the same method:

sudo pip install --upgrade keras

?4.3 Theano and TensorFlow Backends for Keras

Keras is a lightweight API and rather than providing an implementation of the required mathematical operations needed for deep learning it provides a consistent interface to efficient numerical libraries called backends.

4.4 Build Deep Learning Models with Keras

The focus of Keras is the idea of a model. The main type of model is a sequence of layers called a Sequential which is a linear stack of layers. You create a Sequential and add layers to it in the order that you wish for the computation to be performed. Once defined, you compile the model which makes use of the underlying framework to optimize the computation to be performed by your model. In this you can specify the loss function and the optimizer to be used.We can summarize the construction of deep learning models in Keras as follows:

  1. Define your model.? Create a Sequential model and add configured layers.
  2. Compile your model. Specify loss function and optimizers and call the compile() function on the model.
  3. Fit your model. Train the model on a sample of data by calling the fit() function on the model.
  4. Make predictions. Use the model to generate predictions on new data by calling functions such as evaluate() or predict() on the model.

4.5 Summary

In this lesson you discovered the Keras Python library for deep learning research and development. You learned:

  • Keras wraps both the TensorFlow and Theano libraries, abstracting their capabilities and hiding their complexity.
  • Keras is designed for minimalism and modularity allowing you to very quickly define deep learning models.
  • Keras deep learning models can be developed using an idiom of defining, compiling and fitting models that can then be evaluated or used to make predictions.

4.5.1 Next

You are now up to speed with the Python libraries for deep learning. In the next project you will discover step-by-step how you can develop and run very large deep learning models using these libraries in the cloud using GPU hardware at a fraction of the cost of purchasing your own hardware.

  Python知识库 最新文章
Python中String模块
【Python】 14-CVS文件操作
python的panda库读写文件
使用Nordic的nrf52840实现蓝牙DFU过程
【Python学习记录】numpy数组用法整理
Python学习笔记
python字符串和列表
python如何从txt文件中解析出有效的数据
Python编程从入门到实践自学/3.1-3.2
python变量
上一篇文章      下一篇文章      查看所有文章
加:2022-05-07 11:09:05  更:2022-05-07 11:09:15 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 16:40:23-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码