Machine Learning Workshop

Similar documents
If you installed VM and Linux libraries as in the tutorial, you should not get any errors. Otherwise, you may need to install wget or gunzip.

Day 1 Lecture 6. Software Frameworks for Deep Learning

Getting started with Caffe. Jon Barker, Solutions Architect

Get Started Tutorials How To Mobile API Resources About

Tutorial on Keras CAP ADVANCED COMPUTER VISION SPRING 2018 KISHAN S ATHREY

Keras: Handwritten Digit Recognition using MNIST Dataset

Deep Learning and Its Applications

Machine Learning With Python. Bin Chen Nov. 7, 2017 Research Computing Center

RNN LSTM and Deep Learning Libraries

Deep Learning with Torch

TENSORFLOW: LARGE-SCALE MACHINE LEARNING ON HETEROGENEOUS DISTRIBUTED SYSTEMS. By Sanjay Surendranath Girija

Review: The best frameworks for machine learning and deep learning

Accelerating Convolutional Neural Nets. Yunming Zhang

Keras: Handwritten Digit Recognition using MNIST Dataset

Frameworks in Python for Numeric Computation / ML

Deep Learning Frameworks. COSC 7336: Advanced Natural Language Processing Fall 2017

Lecture note 7: Playing with convolutions in TensorFlow

Deep Learning Basic Lecture - Complex Systems & Artificial Intelligence 2017/18 (VO) Asan Agibetov, PhD.

A Quick Guide on Training a neural network using Keras.

Lecture 2 Notes. Outline. Neural Networks. The Big Idea. Architecture. Instructors: Parth Shah, Riju Pahwa

Basic Models in TensorFlow. CS 20SI: TensorFlow for Deep Learning Research Lecture 3 1/20/2017

All You Want To Know About CNNs. Yukun Zhu

INTRODUCTION TO DEEP LEARNING

PLT: Inception (cuz there are so many layers)

Mocha.jl. Deep Learning in Julia. Chiyuan Zhang CSAIL, MIT

Homework 01 : Deep learning Tutorial

NVIDIA GPU CLOUD DEEP LEARNING FRAMEWORKS

Hardware and Software. Fei-Fei Li & Justin Johnson & Serena Yeung. Lecture 6-1

DECISION SUPPORT SYSTEM USING TENSOR FLOW

cosmic rays problem EUCLID VIS simulation M. Brescia - Data Mining

Throughput-Optimized OpenCL-based FPGA Accelerator for Large-Scale Convolutional Neural Networks

Convolutional Neural Networks (CNN)

Index. Umberto Michelucci 2018 U. Michelucci, Applied Deep Learning,

Tutorial on Machine Learning Tools

NVIDIA DLI HANDS-ON TRAINING COURSE CATALOG

SVM multiclass classification in 10 steps 17/32

Machine Learning 13. week

Code Mania Artificial Intelligence: a. Module - 1: Introduction to Artificial intelligence and Python:

An Introduction to Deep Learning with RapidMiner. Philipp Schlunder - RapidMiner Research

CS224n: Natural Language Processing with Deep Learning 1

Reverse Engineering AI Models

TensorFlow: A System for Learning-Scale Machine Learning. Google Brain

M. Sc. (Artificial Intelligence and Machine Learning)

python numpy tensorflow tutorial

BAYESIAN GLOBAL OPTIMIZATION

Introduction to Neural Networks and Brief Tutorial with Caffe 10 th Set of Notes

Deep Learning Frameworks with Spark and GPUs

Deep Neural Network Hyperparameter Optimization with Genetic Algorithms

Polytechnic University of Tirana

Manage Experiments. CS 20SI: TensorFlow for Deep Learning Research Lecture 5 1/27/2017

Lecture 3: Overview of Deep Learning System. CSE599W: Spring 2018

A performance comparison of Deep Learning frameworks on KNL

Deep learning using Caffe Execution Process

Why data science is the new frontier in software development

Deep Learning with Tensorflow AlexNet

MoonRiver: Deep Neural Network in C++

ECE 5470 Classification, Machine Learning, and Neural Network Review

Deep Learning for Computer Vision with MATLAB By Jon Cherrie

CMU Lecture 18: Deep learning and Vision: Convolutional neural networks. Teacher: Gianni A. Di Caro

Recurrent Neural Network

Natural Language Processing with Deep Learning CS224N/Ling284. Christopher Manning Lecture 4: Backpropagation and computation graphs

CIS680: Vision & Learning Assignment 2.b: RPN, Faster R-CNN and Mask R-CNN Due: Nov. 21, 2018 at 11:59 pm

Usable while performant: the challenges building. Soumith Chintala

POINT CLOUD DEEP LEARNING

CNN Basics. Chongruo Wu

Convolutional Neural Networks. Computer Vision Jia-Bin Huang, Virginia Tech

Multi-Task Self-Supervised Visual Learning

TENSORRT. RN _v01 January Release Notes

Machine Learning. Deep Learning. Eric Xing (and Pengtao Xie) , Fall Lecture 8, October 6, Eric CMU,

Deep Neural Networks:

Deep Learning for Computer Vision II

Object Detection Lecture Introduction to deep learning (CNN) Idar Dyrdal

Natural Language Processing CS 6320 Lecture 6 Neural Language Models. Instructor: Sanda Harabagiu

Lecture 3: Theano Programming

CAFFE TUTORIAL ROHIT GIRDHAR. Brewing Deep Networks With Caffe. Many slides from Xinlei Chen ( tutorial), Caffe CVPR 15 tutorial

NVIDIA FOR DEEP LEARNING. Bill Veenhuis

Machine Learning and Algorithms for Data Mining Practical 2: Neural Networks

Application of Deep Learning Techniques in Satellite Telemetry Analysis.

Handwritten Digit Recognition Using Convolutional Neural Networks

On the Effectiveness of Neural Networks Classifying the MNIST Dataset

Introduction to Deep Learning and Software

CNNS FROM THE BASICS TO RECENT ADVANCES. Dmytro Mishkin Center for Machine Perception Czech Technical University in Prague

Image Classification with Convolutional Networks & TensorFlow

ndpi & Machine Learning A future concrete idea

Accelerating Binarized Convolutional Neural Networks with Software-Programmable FPGAs

TensorFlow: A System for Machine Learning on Heterogeneous Systems

Dynamic Routing Between Capsules

Encoding RNNs, 48 End of sentence (EOS) token, 207 Exploding gradient, 131 Exponential function, 42 Exponential Linear Unit (ELU), 44

Pyramidal Deep Models for Computer Vision

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic

Is Bigger CNN Better? Samer Hijazi on behalf of IPG CTO Group Embedded Neural Networks Summit (enns2016) San Jose Feb. 9th

Convolutional Networks for Traffic Sign Classification. Master s thesis in Communication Engineering FEDERICO ZANETTI

An Introduction to NNs using Keras

Predict the Likelihood of Responding to Direct Mail Campaign in Consumer Lending Industry

Tutorial on Deep Learning with Theano and Lasagne. Jan Schlüter Sander Dieleman EMBL-EBI

Developing Machine Learning Models. Kevin Tsai

CAFFE TUTORIAL. Brewing Deep Networks With Caffe XINLEI CHEN

Convolutional Neural Networks

Neural Network Neurons

TensorFlow and Keras-based Convolutional Neural Network in CAT Image Recognition Ang LI 1,*, Yi-xiang LI 2 and Xue-hui LI 3

Transcription:

Machine Learning Workshop {Presenters} Feb. 20th, 2018 Theory of Neural Networks Architecture and Types of Layers: Fully Connected (FC) Convolutional Neural Network (CNN) Pooling Drop out Residual Recurrent

Some Frameworks TensorFlow and Caffe are the big two. There are many others: Scikit-learn: python module with ML algorithms Torch: a collection of algoritms connected via LuaJIT Theano: Fast linear algebra from python - architecturally a bit like TensorFlow Keras: Higher-level, more intuitive set of abstractions that acts as an interface to TensorFlow, Theano, and others Keras is great for quickly prototyping solutions. Windows users: Theano is better supported on Windows than TensorFlow.

Setting Up an Environment Before installing any frameworks you need to consider what kind of environment you want to use. Native Environment: Installed software libraries can be used by any programs on the local system. Possiblity of getting conflicts from other projects on the system. Virtual Environment: Installed software libraries can only be used by programs in the virtual environment. Keeps your environment isolated so software versions can't conflict with other projects.

Virtual Environment Example: Using Anaconda Anaconda provides data science packages along with the Conda package manager and virtual environment manager: https://www.anaconda.com/distribution/ (https://www.anaconda.com/distribution/) Example of using Conda to create a virtual environment and installing python and tensorflow into that environment. $ conda create -n tensorflow-env python=3.5 $ source activate tensorflow-env (tensorflow-env) $ conda install tensorflow There are other virtual environment managers: (that I can't think of...) In Windows, remove "source" from command to activate: "activate tensorflow-env" "tensorflow-env" is the name for the environment: it can be any string.

Caffe or TensorFlow? Caffe is: From Berkeley Vision and Learning Center (BVLC) A set of plug-and-play layers You can add your own Parallelism is supported 'after the fact' TensorFlow is: From Google Brain Much more "flexible" and confusing You can wrap your own layers, but mostly you work in python Parallelism is supported in the core design Both can use GPUs or CPUs. Both have active development communities.

A Sample Dataset: MNIST 10k test images of hand-written digits Each 28x28 1-bit pixels Each is labeled with the 'correct' answer Train A NN To Recongize MNIST This is a classification problem - given input, select from a finite set of possible interpretations. Divide the 10K samples into training set and a test set... because we can't test on the inputs we trained on - it might only recongize specific 28x28 arrays. Want a network with: 28x28 inputs, all 1 or 0. 10 outputs, "one-hot" (meaning only one non-zero)

Caffe provides a catalog of layers Vision related: Convolution, Pooling, Local Response Normalization Activation/Neuron: ReLU, Sigmoid, Etc. Loss: Softmax, Sum-of-Squares, Etc. Data: HDF5, In-memory, Etc. Misc: Inner Product, Flatten, Etc. Special Purpose: Segnet-provided layers

Caffe MNIST A Caffe Layer Definition This is a Google Protobuf language For each filter block there is a 'layer' of a preexisting 'type', with set-up parameters. This code defines the first convolution step. Each layer type knows how to calculate its gradient.

In [ ]: layer { } name: "conv1" type: "Convolution" bottom: "data" top: "conv1" param { lr_mult: 1 } param { } lr_mult: 2 convolution_param { } num_output: 20 kernel_size: 5 stride: 1 weight_filler { } type: "xavier" bias_filler { } type: "constant"

Caffe Framework Takes Care of Learning The network shown learns to identify MNIST at about 98% accuracy Specify training parameters with another protobuf Training time: a few minutes GPU or CPU? Just 'solver mode: GPU' TensorFlow is Very Different Everything is in Python Your code defines a directed graph Edges are Tensors - really n-dimensional rectangular arrays Nodes are Tensors Transformations The calculation doesn't happen when your code executes - only the setup. Calculation happens later when you explicitly execute the graph TensorFlow handles assigning graph elements to hardware and taking gradients (Free parallelism) Large catalog of graph elements, analogous to Caffe layers.

Execution happens later! If you say: tensora = tensorb + tensorc You mean that is it to build the following graph: Tensorflow Example: Linear Regression We can use tensorflow to find the best fitting line. Using the linear equation to build our model, we can feed and (our data) into tensorflow and have it compute the values m X b Y Y = m X + b of and that satisfy the equation.

In [ ]: import tensorflow as tf import numpy as np x_data = np.random.rand(100).astype(np.float32) y_data = x_data * 0.1 + 0.3 # some phony data # Try to find values for W and b that compute y_data = W * x_data + b W = tf.variable(tf.random_uniform([1], -1.0, 1.0)) b = tf.variable(tf.zeros([1])) y = W * x_data + b # Minimize the mean square errors loss = tf.reduce_mean(tf.square(y - y_data)) optimizer = tf.train.gradientdescentoptimizer(0.5) train = optimizer.minimize(loss) # Before starting, initialize the variables. We will 'run' this fi rst. init = tf.global_variables_initializer() # create a graph that do es initialization # Launch the graph. sess = tf.session() sess.run(init) # do initialization by running the graph above # Fit the line. for step in range(201): sess.run(train) if step % 20 == 0: print(step, sess.run(w), sess.run(b)) # Learns best fit is W: [0.1], b: [0.3]

A TensorFlow Layer Definition This would be analogous to the Caffe Convolution definition we wrote in Protobuf filter = tf.variable(tf.random_normal([blksz, 5, 5, 20])) conv1_unbiased = tf.nn.conv2d(data, filter, strides=[1, 1, 1, 1], padding='valid') biases = tf.variable(tf.random_normal([blksz, 5, 5, 20])) conv1 = tf.nn.bias_add(conv1_unbiased, biases) TensorBoard! TensorFlow comes with a wonder tool for visualizing networks and their convergence To use TensorBoard, insert calls like scalar_summary(), histogram_summary(), or image_summary() Then use a SummaryWriter instance to serialize that data TensorBoard provides a web server that gives visualizations of the summaries as the run proceeds

TensorBoard shows up as http://localhost:6006/ (http://localhost:6006/) Dynamic Images of the Calculation Graph