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

Similar documents
Keras: Handwritten Digit Recognition using MNIST Dataset

Keras: Handwritten Digit Recognition using MNIST Dataset

DECISION SUPPORT SYSTEM USING TENSOR FLOW

Frameworks in Python for Numeric Computation / ML

TENSORFLOW: LARGE-SCALE MACHINE LEARNING ON HETEROGENEOUS DISTRIBUTED SYSTEMS. by Google Research. presented by Weichen Wang

Deep Nets with. Keras

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

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

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

NVIDIA DLI HANDS-ON TRAINING COURSE CATALOG

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

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

A Quick Guide on Training a neural network using Keras.

NVIDIA GPU CLOUD DEEP LEARNING FRAMEWORKS

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

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

Machine Learning Workshop

Introduction to TensorFlow. Mor Geva, Apr 2018

Deep RL and Controls Homework 2 Tensorflow, Keras, and Cluster Usage

Deep learning in MATLAB From Concept to CUDA Code

Tracing and profiling dataflow applications

CERN openlab & IBM Research Workshop Trip Report

CS224n: Natural Language Processing with Deep Learning 1

NVIDIA DEEP LEARNING INSTITUTE

Neural Network Exchange Format

Package tensorflow. January 17, 2018

XES Tensorflow Process Prediction using the Tensorflow Deep-Learning Framework

TensorFlow for Deep Learning

SVM multiclass classification in 10 steps 17/32

CS179 GPU Programming Introduction to CUDA. Lecture originally by Luke Durant and Tamas Szalay

GPU Programming Using NVIDIA CUDA

Review: The best frameworks for machine learning and deep learning

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

An Introduction to NNs using Keras

Automatic Code Generation TVM Stack

A Short History of Array Computing in Python. Wolf Vollprecht, PyParis 2018

Deep Learning Benchmarks Mumtaz Vauhkonen, Quaizar Vohra, Saurabh Madaan Collaboration with Adam Coates, Stanford Unviersity

Pouya Kousha Fall 2018 CSE 5194 Prof. DK Panda

NVIDIA DGX SYSTEMS PURPOSE-BUILT FOR AI

PLT: Inception (cuz there are so many layers)

End to End Optimization Stack for Deep Learning

Day 1 Lecture 6. Software Frameworks for Deep Learning

Adam Paszke, Sam Gross, Soumith Chintala, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia

Research Faculty Summit Systems Fueling future disruptions

Matchbox. automatic batching for imperative deep learning NVIDIA GTC, 2018/3/28. James Bradbury

RNN LSTM and Deep Learning Libraries

R for SQListas, a Continuation

ndpi & Machine Learning A future concrete idea

2015 The MathWorks, Inc. 1

python numpy tensorflow tutorial

Deep Learning Frameworks with Spark and GPUs

Operator Vectorization Library A TensorFlow Plugin

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

Deploying Deep Learning Networks to Embedded GPUs and CPUs

Machine Learning Software ROOT/TMVA

Shrinath Shanbhag Senior Software Engineer Microsoft Corporation

The Anatomy of Deep Learning Frameworks* *Everything you wanted to know about DL Frameworks but were afraid to ask

Introduction to Parallel and Distributed Computing. Linh B. Ngo CPSC 3620

Application of Deep Learning Techniques in Satellite Telemetry Analysis.

Using GPUaaS in Cloud Foundry

Programmer's View of Execution Teminology Summary

Nvidia Jetson TX2 and its Software Toolset. João Fernandes 2017/2018

Performance Analysis of Sobel Edge Detection Filter on GPU using CUDA & OpenGL

Accelerating a Simulation of Type I X ray Bursts from Accreting Neutron Stars Mark Mackey Professor Alexander Heger

HPC with Multicore and GPUs

OpenCL Base Course Ing. Marco Stefano Scroppo, PhD Student at University of Catania

Lecture note 4: How to structure your model in TensorFlow

Transferring Deep Learning into a. Recommender System

Multipredicate Join Algorithms for Accelerating Relational Graph Processing on GPUs

PROGRAMOVÁNÍ V C++ CVIČENÍ. Michal Brabec

G P G P U : H I G H - P E R F O R M A N C E C O M P U T I N G

Deep Learning Accelerators

CSCI 402: Computer Architectures. Parallel Processors (2) Fengguang Song Department of Computer & Information Science IUPUI.

ECE 5470 Classification, Machine Learning, and Neural Network Review

Onto Petaflops with Kubernetes

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

Automation.

COMPARISON OF PYTHON 3 SINGLE-GPU PARALLELIZATION TECHNOLOGIES ON THE EXAMPLE OF A CHARGED PARTICLES DYNAMICS SIMULATION PROBLEM

Martin Dubois, ing. Contents

Torch Internals. Ronan Collobert torch.ch

Usable while performant: the challenges building. Soumith Chintala

Chapter 2 Parallel Hardware

Why data science is the new frontier in software development

Accelerator programming with OpenACC

TENSORFLOW. DU _v1.8.0 June User Guide

Polytechnic University of Tirana

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

EXTENDING THE REACH OF PARALLEL COMPUTING WITH CUDA

Parallel Neural Network Training with OpenCL

Recurrent Neural Networks. Deep neural networks have enabled major advances in machine learning and AI. Convolutional Neural Networks

Deep Learning and Its Applications

NVIDIA DATA LOADING LIBRARY (DALI)

Scaling Convolutional Neural Networks on Reconfigurable Logic Michaela Blott, Principal Engineer, Xilinx Research

Deep neural networks

INTRODUCTION TO DEEP LEARNING

Embarquez votre Intelligence Artificielle (IA) sur CPU, GPU et FPGA

SPOC : GPGPU programming through Stream Processing with OCaml

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

Applications of Berkeley s Dwarfs on Nvidia GPUs

CNN optimization. Rassadin A

Transcription:

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

Today s lecture Deep learning software overview TensorFlow Keras Practical

Graphical Processing Unit (GPU) From graphical computing to general numerical processing GPGPU Single Instruction Multiple Data architecture High-throughput type computations with data-parallelism Commodity hardware Two main vendors: NVidia, AMD

Performance evolution

NVIDIA Tesla

GPU vs CPU for deep learning

Programming GPUs CUDA: NVidia s parallel computing platform Access to the GPU's virtual instruction for the execution of compute kernels on the parallel computational elements. CUDA C: a specialized version of C (also CUDA Fortran) Optimized libraries OpenCL: Similar to CUDA but multiplatform no vendor dependant. The way to go with AMD GPU cards. A step behind CUDA

Deep learning frameworks

http://cs231n.stanford.edu/

Overview Numerical computation based on dataflow graphs Developed in C++ Python and C++ frontends Automatic differentiation Easy visualization using TensorBoard Abstraction layers Tf.contrib.learn, tf.contrib.slim TFLearn, Keras Support of heterogeneous architectures: multi-cpu, GPU, multi-gpu, distributed, mobile

Computation graphs (CG) ax2 + bx + c A CG defines the operations that have to be performed over a set of constants and variables. TF works over CG where the variables are usually tensors (scalars, vectors, matrices, multidimensional matrices). In TF the CG is first created and then it can be executed. CG can be symbolically manipulated: e.g. to calculate its gradient or to simplify it. + c + * * * b a x

Creating a graph in TF + c + * * * b a x

Executing a graph Executing a graph requires to create session. A Session object encapsulates the environment in which Operation objects are executed, and Tensor objects are evaluated. Sessions have to be closed so that assigned resources are released

Tensors In general, a tensor is a multidimensional array: Vector: one dimensional tensor. Matrix: two dimensional tensor. In TF, a tensor is a symbolic handle to one of the outputs of an operation. It does not hold the values of that operation's output, but instead provides a means of computing those values in a session. The two main attributes of a tensor are its data type and its shape.

Variables and placeholders A variable maintains state in the graph across calls to run() The Variable() constructor requires an initial value for the variable, which can be a Tensor of any type and shape. The initial value defines the type and shape of the variable. Placeholders allow to input values to the graph. Placeholder values value must be fed using the feed_dict optional argument to Session.run().

Optimization TF can automatically calculate gradients of a graph. You can use the gradients to implement your own optimization strategy, or you can use optimization methods already implemented in the system. Parameters to optimize must be declared as variables. When an optimizer instance is created, it receives parameters such as the learning rate. Optimizer must called with the objective function. Variables must be initialized.

Optimization CG

Optimization CG

Optimizers tf.train.gradientdescentoptimizer tf.train.adadeltaoptimizer tf.train.adagradoptimizer tf.train.momentumoptimizer tf.train.adamoptimizer tf.train.ftrloptimizer tf.train.proximalgradientdescentoptimizer tf.train.proximaladagradoptimizer tf.train.rmspropoptimizer

Monitoring with TensorBoard TensorBoard is a visualization application provided by TensorFlow. It visualizes summary data which is written to log files during training. It also visualizes the computing graph as well as complementary information such as images.

Devices TF supports different target devices: CPU, GPU, multi GPU A graph me be distributed among different devices TF take care of consolidating the data

Additional topics Estimators: a high-level TF API that greatly simplifies machine learning programming. Encapsulates main ML tasks: training, evaluation, prediction. Saving and loading models: TF provides different tools to persists trained models. Dataset API: makes it easy to deal with large amounts of data, different data formats, and complicated transformations. tf.layers: provides a high-level API that makes it easy to construct a neural network. It provides methods that facilitate the creation of dense (fully connected) layers and convolutional layers. tf.nn: Neural network support. tf.contrib: contains volatile or experimental code.

TensorFlow Demo

Keras Developed by François Chollet High-level Python framework able to run on top of TensorFlow, Theano or CNTK, Guiding principles: User firnedliness Modularity Easy extensibility Work with Python Highly popular Fast prototyping Easy to extend Many pretrained models

Sequential model The simplest model is sequential Layers are stacked one above the other The learning process is configured with compile Training is performed with one line. The trained model can be easily evaluated And applied to new data

The functional API The sequential model is easy to use, but someway restricted. The functional API gives more flexibility that allows to construct more complex models: Multiple outputs (multi-task) Multi inputs Shared layers

Layers Layers are the building blocks of models Keras provides several predefined layers for building different types of networks Layers have different methods that allow to get and set their weights, to define an initialization function, to control the regularization, the activation function etc.

Preprocessing Sequences: Text Pad_sequences Skip-grams Text to word sequence One hot Hashing Tokenizer Images Normalization Data augmentation

Keras Demo