0.说明
在Google开源该框架之后便使用真实K40m卡测试,由于生产环境是CentOS6.6的操作系统,但是该框架需要在Python2.7环境下执行,CentOS6.6下折腾了一天没搞定,后来换成CentOS7,顺利跑通
1.系统环境
2.安装部署
#安装依赖,kernel-devel是为了安装cudayum -y install gcc python-devel kernel-devel#安装pipwget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gztar zvxf 1.5.5.tar.gzcd pip-1.5.5/python setup.py install#安装tensorflow,此时确保服务器可以联网,会自动下载安装numpy和sixpip install http://dlp.iflytek.com/soft/tensorflow-0.5.0-cp27-none-linux_x86_64.whl3.测试用例CNN
wget http://dlp.iflytek.com/soft/cifar-10-binary.tar.gztar -zxvf -C /tmp/cifar10_data执行脚本(默认cpu)
cd /root/tensorflow-master/tensorflow/models/image/cifar10
python cifar10_train.py
采用gpu执行
python cifar10_multi_gpu_train.py --num_gpus=4
4.脚本相关说明
#查看帮助python cifar10_train.py --help --batch_size BATCH_SIZE #一批数据的图片数量,默认是包含128个examples Number of images to process in a batch. --data_dir DATA_DIR #训练数据集目录,默认是/tmp/cifar10_data Path to the CIFAR-10 data directory. --train_dir TRAIN_DIR #训练目录 Directory where to write event logs and checkpoint. --max_steps MAX_STEPS #最大步数,默认是1000000 Number of batches to run. --log_device_placement LOG_DEVICE_PLACEMENT Whether to log device placement. --nolog_device_placementTutorials and Machine Learning Examples — TensorFlow
http://tensorflow.org/tutorials/deep_cnn/index.md
原文:http://www.cnblogs.com/ahauzyy/p/4957520.html