© 2018 Kenny William Nyallau

Please reload

Recent Posts

I'm busy working on my blog posts. Watch this space!

Please reload

Featured Posts

Oh look! Another Tensorflow installation tutorial! (with Anaconda and OpenCV 3.1)

Assuming you have installed CUDA and CUDNN just like in the previous tutorial, please read on!

 

1) Install Anaconda Python 2.7 version, 64 bit installer from their website:  https://www.continuum.io/downloads

 

2) Write the following in the command line:

 

 

3) Close the terminal and start a new one.

 

First, create a new Anaconda virtual environment. We're going to call the container as "tfgpupy2" since we want to acknowledge the fact that we're using Tensorflow (TF) python version 2.7 with CUDA GPU capability. The naming convention is quite arbitrary but this is important in case you need to distinguish between different environment with different configurations. For those who does not have GPU enabled machine, just install the CPU version of TF but you will soon realize how it is not feasible to use CPU for heavy computation.

 

4) Lets continue creating the environment:

 

 

5) Activate the conda environment by typing 'source activate tfgpupy2'. To deactivate, simply write "source deactivate tfgpupy2".

 

6) You can see the 'tfgpupy2' container is appended in front of your machine's name, which means you are currently in the conda virtual environment.

 

7) Next we will install OpenCV in our TF conda environment. Generally, OpenCV is not necessary to be installed together with TF but if you're going to utilize the computer vision library in the future, you may find it useful. To do just that, lets write:

 

 

8) The OpenCV version installed on anaconda is version 3.1 and I'm not quite sure if opencv_contrib is also being provided but I highly doubt it. In this case, you may have to install OpenCV directly from the official repo and therefore the procedures are slightly finicky but I've done it before so it's doable.

 

9) Once it's done installed, we then proceed to install GPU enabled TF:

 

 

10) Hopefully everything is a breeze for now! Lets verify successful OpenCV and TF installation via python interactive shell and write "import tensorflow as tf" and "import cv2" like so:

 

 

 If there's no error, you have successfully installed Tensorflow with OpenCV in Anaconda environment!

 

 

 

 

 

 

Please reload

Please reload

Search By Tags
Please reload

Archive
  • Instagram Social Icon
  • github-512
  • LinkedIn Social Icon

KENNY

WILLIAM

NYALLAU