Installation Tensorflow-gpu == 1.13.1 View Tensorflow domestic version mirrors the experience to identify the number of children

Feelings:
finally installed, and very happy, because in the past using a TF2, some new API and module changes as a white beginners, can not start, so follow the advice installed Tensorflow predecessors, the method used is pip online installation, preferably with domestic mirror installation, fast and a lot of stability, cpu version contains installation instructions, do not need to do all subsequent steps after installing cpu version! ! ! Personal version of the proposed installation GPU

step content
* The use of domestic mirror source install (highly recommended)
1 installation
2 Continue the installation
3 Persevering
4 Test the depth and experience the joy of learning

* Using domestic mirror source install (highly recommended)

If you use this method, then steps 1-3 can not read, because this place is very fast method to download!

Install Anaconda: detailed tutorial
after installation of Anaconda may use pip command to manage the package
in the cmd window, enter the following command:
GPU version

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.13.1

CPU versions:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.13.1

Installed and then enter the same command outputs the following message appears, indicating that the installation is complete, the available Step 4 were testing whether use.
Here Insert Picture Description

First, install

In the cmd window type:

pip install tensorflow-gpu==1.13.1
如果不想安装gpu版本则使用以下命令:

```powershell
pip install tensorflow==1.13.1
```
此方法安装成功后就不用进行后面的所有步骤了,因为CUDA和Cudnn是为了tensorflow使用GPU服务的

This installation method is the use of foreign pypi, I do not know specifically, the transmission speed will be limited on the right, because the online installation will be affected by the network, so when installed try to ensure the smooth flow uninterrupted network, or frequent error, I use a white stick in Dongguan free-wifi installed twice tonight, finally installed! Happy!
Here Insert Picture Description
soft

Second, continue the installation

If the installation is successful input line installation instruction again, displays the output of the above two figures;
if the error continues, do not be discouraged, once it is mounted on the input, and the like, to maintain the network flow

Third, persevering

Until you see as a step in the diagram, it is impossible to install the morning, the probability of success could be bigger

Fourth, the test

1, open the Spyder3
2, type the following code

import tensorflow as tf   %emm,导入tensorflow模块另取名为tf,以方便使用
a = tf.__version__ 		%变量a赋值为tf的版本信息
print(a)				%打印输出

3, look at the output
Here Insert Picture Description
we can also try to call the API tf1 depth experience the joy of learning, written down here with senior experience routines, the code is as follows:

# -*- coding: utf-8 -*-
"""
Created on Wed May 31 20:09:17 2017

@author: 代码医生
@blog:http://blog.csdn.net/lijin6249
"""
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)

print ('输入数据:',mnist.train.images)
print ('输入数据打shape:',mnist.train.images.shape)

import pylab 
im = mnist.train.images[1]
im = im.reshape(-1,28)
pylab.imshow(im)
pylab.show()


print ('输入数据打shape:',mnist.test.images.shape)
print ('输入数据打shape:',mnist.validation.images.shape)

Here Insert Picture Description
This indicates that we have successfully use tf1 of mnist data sets training!

Conclusion: something online installation, the network is the key!
Total paper: white abstract understanding of the software

Above any errors or inappropriate welcome that, given time there will be more white that!

Published 34 original articles · won praise 9 · views 3039

Guess you like

Origin blog.csdn.net/RObot_123/article/details/103154727