Python environment set-up

This chapter will describe how to prepare your computer in order to run provided scripts.

First of all, ensure that you have installed conda package manager. If you have not done so, please follows the steps described here.

Note: Python version required to run the provided scripts is 3.6.2 and for TensorFlow it is 1.3.0.

Further, git clone all the scripts that are available in this repository and then using the command line to switch to the location of the cloned files. In Scripts directory you should see environment.yml file that specifies the name of the conda environment and packages that will be installed. To create the environment run the following command while in Scripts directory:

conda env create -f environment.yml

Additional information on conda package manager and commands can be found here.

This tutorial does not require GPU and for that reason, only CPU version of TensorFlow is installed. If you wish to install the GPU version, first, follow the steps regarding CUDA set up on TensorFlow website. After you have successfully installed CUDA and all associated programs, modify environment.yml by replacing tensorflow with tensorflow-gpu and then run the command shown above.

On the date of writing the website has a misleading version number for cuDNN that should be v6 rather than v5.1.

After the environment setup is complete, to activate it on Unix systems run the following:

source activate tf_tutorial

and if you running Windows use:

activate tf_tutorial

Here tf_tutorial is the default environment name that is specified in environment.yml file. Hence, if you have replaced it, replace it in the commands above.

While in the environment, you can run any Python command or/and script but it will use only packages that are available in the envirment. This tutorial is using the following packages:

Note: It is advisable to create a separate environment and environment.yml files for each project. For more information on conda environment management see here.

Next chapter is going give a very brief introduction into TensorFlow, if you wish to return to previous chapter press here.

Code

results matching ""

    No results matching ""