Keras:Switching from Theano backend to tensorflow
来源:互联网 发布:苏联解密档案数据库 编辑:程序博客网 时间:2024/06/05 06:31
If you have run Keras at least once, you will find the Keras configuration file at:
~/.keras/keras.json
If it isn't there, you can create it.
It probably looks like this:
{"epsilon": 1e-07, "floatx": "float32", "backend": "theano"}
Simply change the field backend
to either "theano"
or "tensorflow"
, and Keras will use the new configuration next time you run any Keras code.
Pip install tensorflow
Pip is a package management system used to install and manage software packages written in Python.
The packages that will be installed or upgraded during the pip install are listed in the REQUIRED_PACKAGES section of setup.py
Install pip (or pip3 for python3) if it is not already installed:
# Ubuntu/Linux 64-bit$ sudo apt-get install python-pip python-dev# Mac OS X$ sudo easy_install pip
Install TensorFlow:
# Ubuntu/Linux 64-bit, CPU only:$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0rc0-cp27-none-linux_x86_64.whl# Ubuntu/Linux 64-bit, GPU enabled. Requires CUDA toolkit 7.5 and CuDNN v4. For# other versions, see "Install from sources" below.$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp27-none-linux_x86_64.whl# Mac OS X, CPU only:$ sudo easy_install --upgrade six$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0rc0-py2-none-any.whl
For python3:
# Ubuntu/Linux 64-bit, CPU only:$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl# Ubuntu/Linux 64-bit, GPU enabled. Requires CUDA toolkit 7.5 and CuDNN v4. For# other versions, see "Install from sources" below.$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0rc0-cp34-cp34m-linux_x86_64.whl# Mac OS X, CPU only:$ sudo easy_install --upgrade six$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0rc0-py3-none-any.whl
NOTE: If you are upgrading from a previous installation of TensorFlow < 0.7.1, you should uninstall the previous TensorFlowand protobuf using pip uninstall
first to make sure you get a clean installation of the updated protobuf dependency.
You can now test your installation.
参考
http://keras.io/backend/
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#test-the-tensorflow-installation
- Keras:Switching from Theano backend to tensorflow
- keras的backend 设置 tensorflow,theano
- keras的backend 设置 tensorflow,theano
- 使用Keras时后端(backend)的切换——切换Tensorflow backend和Theano backend
- keras切换后端(backend)为tensorflow或theano的方法
- tensorflow theano keras介绍
- 将tensorflow的backend设置为theano的backend
- Anaconda+Tensorflow+Theano+Keras安装
- Keras设定GPU使用内存大小(Tensorflow backend)
- Keras设定GPU使用内存大小(Tensorflow backend)
- windows anaconda3 tensorflow作为Keras的backend
- 在Ubuntu中安装以theano作为backend的keras
- Switching from Prototype to jQuery
- Keras 切换后端(Theano和TensorFlow)
- Ubuntu14.04 配置theano、keras、tensorflow、tensorlayer
- 【Keras】切换后端(Theano和TensorFlow)
- Ubuntu14.04+Keras+Theano+Tensorflow配置
- Keras 切换后端(Theano和TensorFlow)
- URL 编码/解码方法(linux shell实现)
- 钢管焊缝缺陷检测
- C++的静态成员函数,成员变量,构造函数,析构函数,拷贝构造函数
- 【干货Share】MySQL 加锁处理分析
- 二路归并排序
- Keras:Switching from Theano backend to tensorflow
- 用java开发编译器之Thompson构造:正则表达式的词法解析
- gdb调试php
- Josephus问题
- 汇编语言调试DEBUG命令详解
- 为什么健身房的教练都不提倡做仰卧起坐呢?
- WebService机制和使用《一》
- POJ:3061 Subsequence(尺取法)
- LeetCode——054