How to install and run keras on GPU
2016-09-03 09:00
423 查看
install
http://keras-cn.readthedocs.io/en/latest/getting_started/install/gpu run
first way
import os os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=gpu,floatX=float32" import theano import keras
second way
THEANO_FLAGS=device=gpu,floatX=float32 python xxx.py
test
cpu方式运行:python mnist_cnn.pygpu方式运行:THEANO_FLAGS=device=gpu,floatX=float32 python mnist_cnn.py
默认模式,即mode=FAST_COMPILE,gpu快的太多了!
reference
http://buptldy.github.io/2016/04/09/2016-04-09-Deepin%20CUDA%E5%AE%89%E8%A3%85%E5%8F%8AKeras%E4%BD%BF%E7%94%A8GPU%E6%A8%A1%E5%BC%8F%E8%BF%90%E8%A1%8C/相关文章推荐
- How to Install and Run a node.js App on Centos 6.4 64bit
- How to install and run Chromium OS on VMware Player
- Tomcat - 在Mac的安装和运行(How to Install and Run Tomcat on Mac)
- How to install and run Microsoft Windows for free on Linux
- How to Install and Run Network Simulator (NS2) v2.35 on Ubuntu 10.04
- How to build and install Open vSwitch on a linux
- How To Install And Configure Ganglia On Red Hat Enterprise Linux 5---YUM 安装篇
- Howto Install and Configure Doxygen for QtCreator on Ubuntu
- 【转】How to install and configure SharePoint Server 2010 SP1 on the existing SP 2010 Farm
- how to install apache, PHP and MySQL on Linux 3
- How to install and configure Apache and PHP on ubuntu
- How to install and run FlexSpy
- How to install and run FlexSpy
- How to use write and run MapReduce in eclipse on windows.
- How to Install ESX 3.5 and ESXi as a VM on VMware Server 2.0 推荐
- How to run HelloWorld on ndk r4 and r5
- how to install apache, PHP and MySQL on Linux
- howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL).
- Perl work tips and how to install perl on various platform
- Howto Install and Configure Chinese Input Methods on Ubuntu