- Keras Deep Learning Cookbook
- Rajdeep Dua Manpreet Singh Ghotra
- 162字
- 2021-06-10 19:38:47
Using the Theano backend with Keras
- Let's modify the default configuration and change TensorFlow to Theano as the backend of Keras. Modify the keras.json file:
vi .keras/keras.json
The default file has the following content:
{ "image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "tensorflow"
}
- The modified file will look like the following file. The "backend" value has been changed to "theano":
{ "image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}
- Run the Python console and import Sequential from keras.model using the Theano backend:
$ python
Python 2.7.14 |Anaconda, Inc.| (default, Oct 16 2017, 17:29:19)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from keras.models import Sequential
Notice how the backend has changed to Theano.
We have installed miniconda, all the dependencies of TensorFlow, and Theano. This was followed by installing TensorFlow and Theano itself. Finally, we installed Keras. We also learned how to change the backend of Keras from TensorFlow to Theano.
推薦閱讀
- Machine Learning for Cybersecurity Cookbook
- PostgreSQL 11 Server Side Programming Quick Start Guide
- 2018西門子工業(yè)專家會(huì)議論文集(上)
- 大數(shù)據(jù)平臺(tái)異常檢測(cè)分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- 21天學(xué)通Visual C++
- INSTANT Autodesk Revit 2013 Customization with .NET How-to
- 人工智能:語(yǔ)言智能處理
- 生物3D打印:從醫(yī)療輔具制造到細(xì)胞打印
- 3ds Max造型表現(xiàn)藝術(shù)
- JRuby語(yǔ)言實(shí)戰(zhàn)技術(shù)
- Oracle 11g Anti-hacker's Cookbook
- 西門子S7-1200/1500 PLC從入門到精通
- 中老年人學(xué)電腦與上網(wǎng)
- 軟件質(zhì)量管理實(shí)踐
- Appcelerator Titanium Smartphone App Development Cookbook(Second Edition)