{"id":1904,"date":"2017-02-22T14:23:42","date_gmt":"2017-02-22T14:23:42","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1904"},"modified":"2017-02-26T07:30:49","modified_gmt":"2017-02-26T07:30:49","slug":"installation-of-opencv-keras-and-tensorflow-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/22\/installation-of-opencv-keras-and-tensorflow-on-ubuntu-14-04\/","title":{"rendered":"Installation of OpenCV, Keras and Tensorflow On Ubuntu 14.04"},"content":{"rendered":"<p>Reference: <a href=\"http:\/\/www.pyimagesearch.com\/2016\/11\/14\/installing-keras-with-tensorflow-backend\/\">http:\/\/www.pyimagesearch.com\/2016\/11\/14\/installing-keras-with-tensorflow-backend\/<\/a><br \/>\nstep-by-step instructions to install Keras using a TensorFlow backend for machine learning.<\/p>\n<p>Keras is simply a wrapper around more complex numerical computation engines such as TensorFlow and Theano.<\/p>\n<p>When it comes to Keras you have two choices for a backend engine \u2014 either\u00a0TensorFlow or\u00a0Theano. Theano is older than TensorFlow and was originally the\u00a0only choice when selecting a backend for Keras.<\/p>\n<p>So why might you want to use TensorFlow over Theano?<\/p>\n<p>The short version is that TensorFlow is extremely\u00a0flexible, allowing you to deploy network computation to multiple CPUs, GPUs, servers, or even mobile systems without having to change a\u00a0single line of code.<\/p>\n<p>This makes TensorFlow an excellent choice for training\u00a0distributed deep learning networks in an architecture agnostic way, something that Theano does not (currently) provide.<\/p>\n<p>Installation:<\/p>\n<ol>\n<li>Use Python virtual environments.\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~$ mkvirtualenv opencv_keras_tf\r\nUsing base prefix '\/usr'\r\nNew python executable in \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/python3\r\nAlso creating executable in \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/python\r\nInstalling setuptools, pip, wheel...done.\r\nvirtualenvwrapper.user_scripts creating \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/predeactivate\r\nvirtualenvwrapper.user_scripts creating \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/postdeactivate\r\nvirtualenvwrapper.user_scripts creating \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/preactivate\r\nvirtualenvwrapper.user_scripts creating \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/postactivate\r\nvirtualenvwrapper.user_scripts creating \/home\/teddy\/.virtualenvs\/opencv_keras_tf\/bin\/get_env_details\r\n(opencv_keras_tf) teddy@teddy-K43SJ:~$<\/pre>\n<p>You can quit the virtualenv with command &#8216;deactivate&#8217;<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ deactivate\r\nteddy@teddy-K43SJ:~$<\/pre>\n<p>And go back the virtualenv with command &#8216;workon opencv_keras_tf&#8217;<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ workon opencv_keras_tf\r\n(opencv_keras_tf) teddy@teddy-K43SJ:~$<\/pre>\n<p>Check python version:<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ python\r\nPython 3.4.3 (default, Nov 17 2016, 01:08:31) \r\n[GCC 4.8.4] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt;<\/pre>\n<p>&nbsp;<\/li>\n<li>Install TensorFlow<br \/>\nNOTE: Read this about CUDA compute capability : <a href=\"http:\/\/stackoverflow.com\/questions\/10961476\/what-are-the-differences-between-cuda-compute-capabilities\">http:\/\/stackoverflow.com\/questions\/10961476\/what-are-the-differences-between-cuda-compute-capabilities<\/a><br \/>\nIT SEEMS DEPEND ON THE HARDWARE! NOTHING CAN DO TO IMPROVE THE COMPUTE CAPABILITY!<br \/>\nAFTER READING THIS <a href=\"https:\/\/www.tensorflow.org\/versions\/r0.10\/get_started\/os_setup#installing_from_sources\">https:\/\/www.tensorflow.org\/versions\/r0.10\/get_started\/os_setup#installing_from_sources<\/a> AND <a href=\"http:\/\/stackoverflow.com\/questions\/38542763\/how-can-i-make-tensorflow-run-on-a-gpu-with-capability-2-0\">http:\/\/stackoverflow.com\/questions\/38542763\/how-can-i-make-tensorflow-run-on-a-gpu-with-capability-2-0<\/a>, I GOT SAD NEWS THAT<br \/>\n&#8220;<span style=\"color: #ffff00;\">In order to build or run TensorFlow with GPU support, both NVIDIA&#8217;s Cuda Toolkit (&gt;= 7.0) and cuDNN (&gt;= v3) need to be installed. <\/span><br \/>\n<span style=\"color: #ffff00;\">TensorFlow GPU support requires having a GPU card with NVidia Compute Capability &gt;= 3.0.<\/span>&#8221;<br \/>\n<span style=\"background-color: #ff0000;\">SO MY GPU GeForce GT 520M THAT ONLY HAS CUDA COMPUTE CAPABILITY 2.1 (REF: <span style=\"color: #ccffff;\"><a style=\"color: #ccffff;\" href=\"https:\/\/en.wikipedia.org\/wiki\/CUDA\">https:\/\/en.wikipedia.org\/wiki\/CUDA<\/a><\/span>) CAN&#8217;T BE USED FOR TENSORFLOW!!!I ONLY CAN USE CPU!!!<\/span>To install TensorFlow, refer to this page: <a href=\"https:\/\/www.tensorflow.org\/versions\/r0.11\/get_started\/os_setup\">https:\/\/www.tensorflow.org\/versions\/r0.11\/get_started\/os_setup<\/a>.<br \/>\nCurrently I have CUDA 7.5 toolkit <a href=\"http:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/24\/installation-of-cuda-toolkit-7-5-on-ubuntu-14-04\/\">installed<\/a><\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ nvcc -V\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2015 NVIDIA Corporation\r\nBuilt on Tue_Aug_11_14:27:32_CDT_2015\r\nCuda compilation tools, release 7.5, V7.5.17<\/pre>\n<p>The tensorflow page need CUDA toolkit 8.0 and CuDNN v5. <a href=\"http:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/22\/upgrade-cuda-toolkit-7-5-to-8-0-on-ubunt-14-04\/\">I already installed them<\/a>. I go to &#8216;Pip installation&#8217; and choose this binary option:<\/p>\n<pre class=\"lang:default decode:true\"># Ubuntu\/Linux 64-bit, GPU enabled, Python 3.4\r\n# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see \"Install from sources\" below.\r\n$ export TF_BINARY_URL=https:\/\/storage.googleapis.com\/tensorflow\/linux\/gpu\/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl<\/pre>\n<p>SO let&#8217;s begin:<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ export TF_BINARY_URL=https:\/\/storage.googleapis.com\/tensorflow\/linux\/gpu\/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl<\/pre>\n<p>Install TensorFlow:<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install --upgrade $TF_BINARY_URL\r\nCollecting tensorflow==0.11.0 from https:\/\/storage.googleapis.com\/tensorflow\/linux\/gpu\/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl\r\n  Downloading https:\/\/storage.googleapis.com\/tensorflow\/linux\/gpu\/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl (119.1MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 119.1MB 9.1kB\/s \r\nRequirement already up-to-date: wheel&gt;=0.26 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from tensorflow==0.11.0)\r\nCollecting numpy&gt;=1.11.0 (from tensorflow==0.11.0)\r\n  Downloading numpy-1.12.0-cp34-cp34m-manylinux1_x86_64.whl (16.8MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 16.8MB 59kB\/s \r\nRequirement already up-to-date: six&gt;=1.10.0 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from tensorflow==0.11.0)\r\nCollecting protobuf==3.0.0 (from tensorflow==0.11.0)\r\n  Downloading protobuf-3.0.0-cp34-cp34m-manylinux1_x86_64.whl (5.2MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5.2MB 177kB\/s \r\nRequirement already up-to-date: setuptools in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from protobuf==3.0.0-&gt;tensorflow==0.11.0)\r\nRequirement already up-to-date: packaging&gt;=16.8 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from setuptools-&gt;protobuf==3.0.0-&gt;tensorflow==0.11.0)\r\nRequirement already up-to-date: appdirs&gt;=1.4.0 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from setuptools-&gt;protobuf==3.0.0-&gt;tensorflow==0.11.0)\r\nRequirement already up-to-date: pyparsing in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from packaging&gt;=16.8-&gt;setuptools-&gt;protobuf==3.0.0-&gt;tensorflow==0.11.0)\r\nInstalling collected packages: numpy, protobuf, tensorflow\r\nSuccessfully installed numpy-1.12.0 protobuf-3.0.0 tensorflow-0.11.0<\/pre>\n<p>Test the installation<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ python\r\nPython 3.4.3 (default, Nov 17 2016, 01:08:31) \r\n[GCC 4.8.4] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; import tensorflow\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally\r\n&gt;&gt;&gt; \r\n<\/pre>\n<p>&nbsp;<\/li>\n<li>Install Keras<br \/>\nInstall a few Python dependencies:<br \/>\nInstall numpy scify<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install numpy scipy\r\nRequirement already satisfied: numpy in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages\r\nCollecting scipy\r\n  Downloading scipy-0.18.1-cp34-cp34m-manylinux1_x86_64.whl (40.2MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 40.2MB 26kB\/s \r\nInstalling collected packages: scipy\r\nSuccessfully installed scipy-0.18.1<\/pre>\n<p>Install scikit-learn<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install scikit-learn\r\nCollecting scikit-learn\r\n  Downloading scikit_learn-0.18.1-cp34-cp34m-manylinux1_x86_64.whl (11.9MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 11.9MB 87kB\/s \r\nInstalling collected packages: scikit-learn\r\nSuccessfully installed scikit-learn-0.18.1<\/pre>\n<p>Install pillow<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install pillow\r\nCollecting pillow\r\n  Downloading Pillow-4.0.0-cp34-cp34m-manylinux1_x86_64.whl (5.6MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5.6MB 169kB\/s \r\nCollecting olefile (from pillow)\r\n  Downloading olefile-0.44.zip (74kB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 81kB 1.9MB\/s \r\nBuilding wheels for collected packages: olefile\r\n  Running setup.py bdist_wheel for olefile ... done\r\n  Stored in directory: \/home\/teddy\/.cache\/pip\/wheels\/20\/58\/49\/cc7bd00345397059149a10b0259ef38b867935ea2ecff99a9b\r\nSuccessfully built olefile\r\nInstalling collected packages: olefile, pillow\r\nSuccessfully installed olefile-0.44 pillow-4.0.0<\/pre>\n<p>Install h5py<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install h5py\r\nCollecting h5py\r\n  Downloading h5py-2.6.0-1-cp34-cp34m-manylinux1_x86_64.whl (4.6MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 4.6MB 103kB\/s \r\nRequirement already satisfied: six in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from h5py)\r\nRequirement already satisfied: numpy&gt;=1.6.1 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from h5py)\r\nInstalling collected packages: h5py\r\nSuccessfully installed h5py-2.6.0<\/pre>\n<p>Install keras<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ pip install keras\r\nCollecting keras\r\n  Downloading Keras-1.2.2.tar.gz (175kB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 184kB 1.5MB\/s \r\nCollecting theano (from keras)\r\n  Downloading Theano-0.8.2.tar.gz (2.9MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.9MB 257kB\/s \r\nCollecting pyyaml (from keras)\r\n  Downloading PyYAML-3.12.tar.gz (253kB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 256kB 1.6MB\/s \r\nRequirement already satisfied: six in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from keras)\r\nRequirement already satisfied: numpy&gt;=1.7.1 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from theano-&gt;keras)\r\nRequirement already satisfied: scipy&gt;=0.11 in .\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages (from theano-&gt;keras)\r\nBuilding wheels for collected packages: keras, theano, pyyaml\r\n  Running setup.py bdist_wheel for keras ... done\r\n  Stored in directory: \/home\/teddy\/.cache\/pip\/wheels\/f6\/c5\/63\/97d96b41bf822858027c70b04448c19deaccf1cf518148fa82\r\n  Running setup.py bdist_wheel for theano ... done\r\n  Stored in directory: \/home\/teddy\/.cache\/pip\/wheels\/96\/2b\/3d\/71d54e24a7171a4afb7144d1e944a7be643b448b23a35b9937\r\n  Running setup.py bdist_wheel for pyyaml ... done\r\n  Stored in directory: \/home\/teddy\/.cache\/pip\/wheels\/2c\/f7\/79\/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc\r\nSuccessfully built keras theano pyyaml\r\nInstalling collected packages: theano, pyyaml, keras\r\nSuccessfully installed keras-1.2.2 pyyaml-3.12 theano-0.8.2<\/pre>\n<p>Then run &#8216;import keras&#8217; in python console to create keras.json file (http:\/\/stackoverflow.com\/questions\/40310035\/how-to-change-keras-backend-wheres-the-json-file)<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ python\r\nPython 3.4.3 (default, Nov 17 2016, 01:08:31) \r\n[GCC 4.8.4] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; import keras\r\nUsing TensorFlow backend.\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally\r\n&gt;&gt;&gt; quit()<\/pre>\n<p>keras.json file would be created in ~\/.keras\/ (~\/.keras\/keras.json file)<\/p>\n<pre class=\"lang:default decode:true \">{\r\n    \"backend\": \"tensorflow\",\r\n    \"image_dim_ordering\": \"tf\",\r\n    \"epsilon\": 1e-07,\r\n    \"floatx\": \"float32\"\r\n}<\/pre>\n<p>Specifically, you\u2019ll want to ensure that image_dim_ordering\u00a0 is set to tf\u00a0 (indicating that the TensorFlow image dimension ordering is used rather than th\u00a0 for Theano).<\/p>\n<p>You\u2019ll also want to ensure that the backend\u00a0 is properly set to tensorflow\u00a0 (rather thantheano\u00a0).<\/li>\n<li>Symlink with OpenCV<br \/>\nMy opencv binding file for python 3 is in \/usr\/local\/lib\/python3.4\/site-packages\/cv2.cpython-34m.so. I need to symlink it with the virtualenv &#8216;opencv_keras_tf&#8217; like this:<br \/>\nGo into this directory:<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ cd ~\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages\/<\/pre>\n<p>Then symlink it (HERE I CHANGE THE FILE TO &#8216;cv2.so&#8217;)<\/p>\n<pre class=\"lang:default decode:true\">(opencv_keras_tf) teddy@teddy-K43SJ:~\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages$ ln -s \/usr\/local\/lib\/python3.4\/site-packages\/cv2.cpython-34m.so  cv2.so\r\n(opencv_keras_tf) teddy@teddy-K43SJ:~\/.virtualenvs\/opencv_keras_tf\/lib\/python3.4\/site-packages$ cd ~<\/pre>\n<p>Test it<\/p>\n<pre class=\"lang:default decode:true \">(opencv_keras_tf) teddy@teddy-K43SJ:~$ python\r\nPython 3.4.3 (default, Nov 17 2016, 01:08:31) \r\n[GCC 4.8.4] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; import keras\r\nUsing TensorFlow backend.\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow\/stream_executor\/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally\r\n&gt;&gt;&gt; import cv2\r\n&gt;&gt;&gt; quit()<\/pre>\n<p>OK. NO ERROR<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Reference: http:\/\/www.pyimagesearch.com\/2016\/11\/14\/installing-keras-with-tensorflow-backend\/ step-by-step instructions to install Keras using a TensorFlow backend for machine learning. Keras is simply a wrapper around more complex numerical computation engines such as TensorFlow and Theano. When it comes to Keras you have two choices for a backend engine \u2014 either\u00a0TensorFlow or\u00a0Theano. Theano is older than TensorFlow and was originally the\u00a0only &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/22\/installation-of-opencv-keras-and-tensorflow-on-ubuntu-14-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installation of OpenCV, Keras and Tensorflow On Ubuntu 14.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,19,18],"tags":[],"class_list":["post-1904","post","type-post","status-publish","format-standard","hentry","category-opencv","category-python","category-ubuntu-14-04"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1904"}],"version-history":[{"count":12,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1904\/revisions"}],"predecessor-version":[{"id":2014,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1904\/revisions\/2014"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}