TensorFlow + Jupyter Notebook + Nvidia DIY Setup – Towards Data Science – Medium

TensorFlow + Jupyter Notebook + Nvidia DIY Setup

  • Note that we will be using a user that has sudo right instead of root directly.Nvidia Driver SetupInstall Nvidia driver repositorysudo add-apt-repository ppa:graphics-drivers/ppasudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential cmake g++ gfortran git pkg-config python-dev software-properties-common wgetInstall CUDA 8.0 from Nvidia, get both base installer and patch 2.
  • h /usr/local/cuda/include/sudo cp */libcudnn* /usr/local/cuda/lib64/sudo chmod a+r SetupGrab the installer from Anaconda, using Python 3.6 and follow the installation instructioncd ~/Downloads/bash I will install the Anaconda under /opt folder.If is install under home folder, we need to locate the environment folder after activated the environmentsource activate tf-gpuecho $PATHThis is important in order to setup Jupyter Notebook later.TensorFlow SetupOnce we have Anaconda install, we going to create an environment for our Jupyter setup and install TensorFlow GPUconda create –name tf-gpu python=3.6source activate tf-gpupip install –ignore-installed –upgrade SetupOnce we install TensorFlow, we going install Jupyter, we going use conda to manage the packages for both Jupyter Notebook and shell runtimeconda install jupyter notebook numpy pandas matplotlibDDNS SetupInstall any ddns client to able to update domain so we could connect back to our home server.
  • We could use NoIP for this and it has linux client to update the domain.NGINX SetupMake sure we stop current nginx before using letsencrypt instead of buying a SSL certificate because I am on cost savingsudo systemctl stop nginxOnce the NGINX is stop, we could run initial letsencrypt command that will spin off it’s own internal server for verification processClone letsencrypt using command, follow by setting up initial certificatesudo git clone /opt/letsencryptsudo -H certonly –email=me@chclab.net -d deeplearning.chclab.net -d jupyter-cpu.
  • /bin/bashexport notebook –no-browser –NotebookApp.allow_origin=’*’ –NotebookApp.port=9999Secure the Jupyter Notebook by using the following command, more information about this from this linkjupyter notebook –generate-configjupyter notebook passwordCreate a Systemctl service at sudo vi for jupyter cpu notebookAfter=local-fs.
  • chclab.net; listen 443 ssl; access_log off;ssl_certificate ssl_certificate_key TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers ssl_ecdh_curve secp384r1; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; ssl_stapling on; ssl_stapling_verify on; resolver 8.8.8.8 8.8.4.4 valid=300s; resolver_timeout 5s; # disable HSTS header for now #add_header Strict-Transport-Security “max-age=63072000; includeSubDomains; preload”; add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff;ssl_dhparam / { proxy_pass http://notebook-tensorflow; proxy_set_header Host $host; }location ~ /api/kernels/ { proxy_pass http://notebook-tensorflow; proxy_set_header Host $host; # websocket support proxy_http_version 1.1; proxy_set_header Upgrade “websocket”; proxy_set_header Connection “Upgrade”; proxy_read_timeout 86400; } location ~ /terminals/ { proxy_pass http://notebook-tensorflow; proxy_set_header Host $host; # websocket support proxy_http_version 1.1; proxy_set_header Upgrade “websocket”; proxy_set_header Connection “Upgrade”; proxy_read_timeout 86400; }}Generate a strong dhparam fileopenssl dhparam -out /etc/ssl/certs/dhparam.pem 4096Restart NGINXsudo systemctl restart nginxFinally there is how it look like using Jupyter Notebook

Based on my first story, more detail step by step detailed setup using Xbuntu / Ubuntu 17.04. Note that we will be using a user that has sudo right instead of root directly. Install CUDA 8.0 from…
Continue reading “TensorFlow + Jupyter Notebook + Nvidia DIY Setup – Towards Data Science – Medium”

Google releases new TensorFlow Object Detection API

  • Google is releasing a new TensorFlow object detection API to make it easier for developers and researchers to identify objects within images.
  • Google is trying to offer the best of simplicity and performance — the models being released today have performed well in benchmarking and have become regularly used in research.
  • The handful of models included in the detection API include heavy duty inception-based convolutional neural networks and streamlined models designed to operate on less sophisticated machines — a MobileNets single shot detector comes optimized to run in real-time on a smartphone.
  • Earlier this week Google announced its MobileNets family of lightweight computer vision models.
  • Google, Facebook and Apple have been pouring resources into these mobile models.

Google is releasing a new TensorFlow object detection API to make it easier for developers and researchers to identify objects within images. Google is trying..
Continue reading “Google releases new TensorFlow Object Detection API”

Teaching an AI to write Python code with Python code • Will cars dream?

Teaching an #AI to write Python code with Python code  #MachineLearning #DeepLearning

  • So we want to train a neural net to write some Python code.
  • We can now write our code to train a LSTM network on Python code.
  • Teaching an AI to write Python code with Python code
  • The network takes a few hours to train.
  • You will be able to write code directly in your browser and have it run on your instance.

OK, let’s drop autonomous vehicles for a second. Things are getting serious. This post is about creating a machine that writes its own code. More or less.
Continue reading “Teaching an AI to write Python code with Python code • Will cars dream?”

Photon ML Tutorial · linkedin/photon-ml Wiki · GitHub

.@LinkedIn #MachineLearning team shares tutorial on building #Recommender systems

  • You will need to install Docker or Docker Toolbox on your system to use it.
  • After you have installed Docker, launch the Docker daemon (this happens automatically on some systems).
  • Remove the tutorial container by running docker rm photon-ml-tutorial .
  • To access the Photon ML Tutorial, navigate to http://localhost:5334/tutorial .

Read the full article, click here.


@kdnuggets: “.@LinkedIn #MachineLearning team shares tutorial on building #Recommender systems”


photon-ml – A scalable machine learning library on Apache Spark


Photon ML Tutorial · linkedin/photon-ml Wiki · GitHub

Teaching an AI to write Python code with Python code • Will cars dream?

Teaching an #AI to write Python code with Python code  #MachineLearning #DeepLearning

  • So we want to train a neural net to write some Python code.
  • We can now write our code to train a LSTM network on Python code.
  • Teaching an AI to write Python code with Python code
  • The network takes a few hours to train.
  • You will be able to write code directly in your browser and have it run on your instance.

Read the full article, click here.


@MikeTamir: “Teaching an #AI to write Python code with Python code #MachineLearning #DeepLearning”


OK, let’s drop autonomous vehicles for a second. Things are getting serious. This post is about creating a machine that writes its own code. More or less.


Teaching an AI to write Python code with Python code • Will cars dream?

Teaching an AI to write Python code with Python code • Will cars dream?

Teaching #AI to write #Python code with #Python code #DeepLearning #LSTM #MachineLearning

  • So we want to train a neural net to write some Python code.
  • We can now write our code to train a LSTM network on Python code.
  • Teaching an AI to write Python code with Python code
  • The network takes a few hours to train.
  • You will be able to write code directly in your browser and have it run on your instance.

Read the full article, click here.


@kdnuggets: “Teaching #AI to write #Python code with #Python code #DeepLearning #LSTM #MachineLearning”


OK, let’s drop autonomous vehicles for a second. Things are getting serious. This post is about creating a machine that writes its own code. More or less.


Teaching an AI to write Python code with Python code • Will cars dream?

GitHub

A handful of #TensorFlow tutorials:  #DeepLearning #MachineLearning

  • Tensorflow Tutorials using Jupyter Notebook
  • Machine Learing Basics with TensorFlow: Linear Regression / Logistic Regression with MNIST / Logistic Regression with Custom Dataset
  • Hope the tutorials to be a useful recipe book for your deep learning projects.
  • Tried to explain as kindly as possible, as these tutorials are intended for TensorFlow beginners.
  • Most of the codes are simple refactorings of Aymeric Damien’s Tutorial or Nathan Lintz’s Tutorial .

Read the full article, click here.


@randal_olson: “A handful of #TensorFlow tutorials: #DeepLearning #MachineLearning”


Tensorflow-101 – TensorFlow Tutorials


GitHub