Machine Learning - Tutorial Lab

Lab 1 : Introduction to Tools And Usage

  • Prequisites - Git & Github Usage, Python

  • IDE - Jupyter notebook from Anaconda3

  • Programming Language - Python 3.6

  • Framework - Tensorflow & TensorBoard

Why Git

Source Code Management Tool

Other SCM Tools

  1. SCCS - Source Code Control Systems
  2. Apache Subversion - SVN
  3. Bitbucket

Basic Git Commands

To fetch/copy project

git clone projectFile

Ex.

git clone https://github.com/SOCS-2017-18/ml_lab_ecsc_306.git

To update repository

git pull

Tensorflow and TensorBoard

Other frameworks used for Machine Learning

  1. Theano
  2. Torch
  3. Caffe
  4. SciKit Learn

Why TensorFlow

TensorFlow

  • Open source software library for numerical computation using data flow graphs

  • Originally developed by Google Brain Team to conduct machine learning and deep neural networks research

Features

  • Python API

  • Portability: deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API

  • Flexibility: from Raspberry Pi, Android, Windows, iOS, Linux to server farms

  • Visualization (TensorBoard)

  • Checkpoints (for managing experiments)

Companies using Tensorflow

  • Google

  • OpenAI

  • DeepMind

  • Snapchat

  • Uber

  • Airbus

  • Dropbox

Everything in TensorFlow is based on creating a computational graph

It is a network of nodes, with each node known as an operation, running some function that can be as simple as addition or subtraction to as complex as some multi variate equation.

Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them

Computational graphs are a nice way to think about mathematical expressions. For example, consider the expression

e=(a+b)∗(b+1).

There are three operations: two additions and one multiplication.

let’s introduce two intermediary variables, c and d

so that every function’s output has a variable. We now have:

c=a+b

d=b+1

e=c∗d

To create a computational graph, we make each of these operations, along with the input variables, into nodes. When one node’s value is the input to another node, an arrow goes from one to another.

Extra Slides

Github Account

git commands

  • git add
  • git commit

Add file to staging index

git add fileName

git add example1.ipynb

To check status

git status

To Commit file to repository

git commit -m "Message For Commit"

To undo changes

From working directory

git checkout -- filename

Ex.

git checkout file1.ipynb

From staging index

git reset HEAD filename

Ex.

git reset HEAD filename.html