Neural Networks API, Written in Python and Capable of Running on Top of a Deferred Execution Backend

Total Page:16

File Type:pdf, Size:1020Kb

Neural Networks API, Written in Python and Capable of Running on Top of a Deferred Execution Backend Keras’s Phylanx Backend Bita Hasheminezhad STE||AR GROUP Outline – Available Deep Learning Platforms – What’s Special about Keras – Keras Backends – Inference Example 1; Multi-Class classification – Inference Example 2; Sentiment Analysis – Keras In Future – Conclusion 2 Deep Learning Platforms – Spark Apache – Caffe Berkeley AI Research – DistBelief Google – Caffe2 Facebook – TensorFlow Google – PyTorch Facebook – CNTK Microsoft – SINGA National university of Singapore – Project Adam Microsoft – Chainer Preferred Networks – MXNet Apache – CoreML Apple – Theano Universite de Montreal 3 Deep Learning Platforms – Spark Apache – Caffe -> Caffe2 -> PyTorch Facebook – DistBelief -> TensorFlow Google – SINGA National university of Singapore – CNTK Microsoft – Chainer Preferred Networks – Project Adam Microsoft – MXNet Apache – CoreML Apple – Theano Universite de Montreal Support Keras 4 What is Keras? – Keras is a high-level neural networks API, written in Python and capable of running on top of a deferred execution backend. User friendly Modular Easily extensible Fig 1. Number of publications during the last decade having the name of the DL platform in their full text1 [1] https://app.dimensions.ai/discover/publication 5 Deep Learning Platforms – Caffe -> Caffe2 -> PyTorch Facebook – TensorFlow Google – CNTK Microsoft Imperative or Eager Style – Theano Universite de Montreal – MXNet Apache – CoreML Apple Deferred Style – Deferred Execution: it has two distinct phases: the first phase defines the program as a symbolic graph; and the second phase executes an optimized version of the program on the set of available devices.2 [2] Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., ... & Kudlur, M. (2016). Tensorflow: A system for large-scale machine learning. In 12th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 16) (pp. 265-283).c 6 Keras different backends Table 1. Investigating parallelism in the deep learning platforms supported by Keras Platform Data Parallelism Model Parallelism TensorFlow Synchronous or asynchronous Supported using greedy through parameter servers heuristics CNTK Bounded asynchronous through a parameter server model Theano Not on multiple nodes MXNet Synchronous or asynchronous Not on multiple nodes through parameter servers – “When gradient nodes are automatically added to the graph, the user has less control, and the heuristics may break down. ”2 7 The solution to the problem Problem: On a single node, training ResNet50 on the ImageNet data set on an NVIDIA M40 GPU takes 14 days!3 Solution: A High-Performance Keras Backend which Is deferred style; can optimize the expression graph Is distributed and can run on multiple nodes Uses asynchronous computations; avoids straggler problem Let’s use HPX! [3] Zhang, Z., Yin, L., Peng, Y., & Li, D. (2018, December). A Quick Survey on Large Scale Distributed Deep Learning Systems. In 2018 IEEE 24th International Conference on Parallel and Distributed Systems (ICPADS) (pp. 1052-1056). IEEE. 8 HPX as a backend for Keras Phylanx Keras (Python) HPX (C++) (Python Frontend, C++ Backend) – Using hints from the user and the optimization step the expression graph will be passed to the HPX runtime which schedules work and infers the data layout on each compute locale arguments.4 [4] http://phylanx.stellar-group.org/ 9 How to implement a Keras Backend Keras related Basic math Up to 4D Not yet backend Late Binding epsilon set_epsilon map_fn shape int_shape ndim reshape count_params foldl flodr floatx cast_to_floatx eye ones ones_like zeros zeros_like constant Inference Training image_data_format set_floatx dtype cast dot batch_dot transpose gather in_top_k set_image_data_format max min sum prod cumsum cumprod argmax argmin Activations and Losses normalize_data_format var std mean square sqrt abs exp log logsumexp any all equal not_equal greater greater_equal less less_equal relu elu tanh softmax softplus softsign main round sign pow clip maximum minimum permute_dimensions concatenate stack repeat_elements repeat tile sin cos categorical_crossentropy binary_crossentropy name_scope arange flatten expand_dims squeeze one_hot reverse sparse_categorical_crossentropy variable eval slice switch bias_add dropout l2_normalize sigmoid hard_sigmoid get_uid reset_uids random_binomial random_uniform is_sparse to_dense random_normal truncated_normal update update_add update_sub learning_phase set_learning_phase Convolutional Batch related moving_average_update identity batch_get_value batch_set_value in_train_phase in_test_phase pool2d pool3d batch_flatten batch_normalization is_tensor is_keras_tensor conv1d conv2d conv3d normalize_batch_in_training placeholder is_placeholder separable_conv1d separable_conv2d gradients stop_gradient temporal_padding spatial_2d_padding spatial_3d_padding random_uniform_variable conv2d_transpose conv3d_transpose depthwise_conv2d Recurrent random_normal_variable resize_images resize_volumes rnn ctc_decode get_value set_value local_conv1d local_conv2d ctc_label_dense_to_sparse print_tensor ctc_batch_cost function 10 Inference Example 1; Multi-Class Classification fromcorrectskeras= Kimport.equal(backendlabels_predas K, y_test) Using Phylanx backend. fromcorrectskeras= K.datasets.cast(corrects,import'intmnist64') y_train shape: (60000,) fromprint(keras"Correct.utilslabelsimport:", Kto_categorical.get_value(corrects)) y_train shape, after one_hot encoding: (60000, 10) import numpy as np class_predict shape: (10000, 10) importnumber_of_correctspandas as pd = K.get_value(K.sum(corrects)) A sample of class_predict: [3.27987540e-37 1.93442800e-25 5.78854500e-25 1.94946260e-21 print("Number of corrects predictions: %d "%number_of_corrects) 3.15305600e-31 1.03375155e-32 0.00000000e+00 1.00000000e+00 4.98417950e-32 3.93246830e-21] (_,correctsy_train=),K(.x_testexpand_dims, y_test)(corrects,= mnist.load_dataaxis=0) () Predicted labels: [7 2 1 ... 4 5 6] num_classesnum_images = lenK.int_shape(np.unique(corrects)[(y_train))1] What we have on y_test [7 2 1 ... 4 5 6] #printconvert("Accuracyclass vectors: %.2f%%to"binary% ((number_of_correctsclass matrices *100)/num_images)) Correct labels: [1 1 1 ... 1 1 1] print# Misclassified("y_train shape:", y_train.shape) Number of corrects predictions: 9837 y_trainincorrects= to_categorical= K.not_equal(y_train(corrects,, num_classes1) ) Accuracy: 98.37% printincorrects("y_train= K.shape,eval(incorrectsafter one_hot) encoding:", y_train.shape) Label 4 is misclassified as 2 Label 2 is misclassified as 7 dflabels_error= pd.read_csv= (lambda('class_predx: x[0.]csv'* x[)1])([K.eval(labels_pred), incorrects]) Label 5 is misclassified as 3 class_predlabels_true==df(lambda.values x: x[0] * x[1])([K.eval(y_test), incorrects]) Label 3 is misclassified as 7 printlabels_true_slice("class_predict= Kshape.slice(:K".,squeezeclass_pred(K.variable.shape)(labels_true),0),[0],[500]) Label 6 is misclassified as 0 printlabels_error_slice("A sample of=class_predictK.slice(K.flatten:", class_pred(K.variable[0(labels_error]) )),[0],[500]) Label 9 is misclassified as 3 labels_predfor i,j in zip(K=.get_valueK.argmax((class_predlabels_true_slice, axis=1),)K.get_value(labels_error_slice)): Label 8 is misclassified as 2 printif i !=("Predicted0: labels:", K.get_value(labels_pred)) Label 2 is misclassified as 7 printprint("What("Label"we have,i,"isonmisclassifiedy_test", K.evalas",j()y_test)) Label 8 is misclassified as 4 11 Inference Example 2; Sentiment Analysis largest_indexy_scorefrom keras= K.importgather= y_test(backendlabels_pred.size - as1 K, desc_score_indices) Using Phylanx backend. y_truefrom keras= .gather.datasets(y_trueimport, desc_score_indicesimdb ) df = pd.read_csvK ('labels_pred.csv') classes: [0 1] labels_predy_trueimport=numpyK.cast= K(as.y_truesqueezenp , "int(df.64values") , 1) Predicted labels: [9.2614290e-03 9.9999920e-01 9.9997926e-01 printimport("Predicted"y_truepandas", Kas.labelsget_valuepd :", K.(get_valuey_true)) (labels_pred)) ... 6.2763690e-05 3.3009052e-03 6.0482204e-01] [email protected]("y_score(K.get_value", K.get_value(labels_pred(y_score)) )) Accuracy: 86.704 pltdiffdef.show=unique_eagernp.()diff(K.eval(x)(y_score: )) desc_score_indices [12420 1594 2351 ... 11280 13389 18853] correctsdistinct_value_indicesreturn=npK..lessunique(K.abs(x)(=labels_predwhere(K.not_equal- K.variable(diff,(y_test0)) )), .5) y_true [1 1 1 ... 0 0 0] printdistinct_value_indicesunique("Accuracy= Phylanx:",.lazyK.get_value(unique_eager= K.get_value(K.sum()distinct_value_indices(K.cast(corrects,"int32)[")))0]*100/ y_score [1. 1. 1. ... 0. 0. 0.] [email protected]_shapePhylanx("distinct_value_indices(corrects)[0]) ", distinct_value_indices) distinct_value_indices [ 484 593 981 ... 23598 23794 23973] threshold_idxsdef argsort_eager= K(x).eval: (K.concatenate True Positives: [ 483 591 975 ... 12493 12495 12500] y_true([Kreturn.variable= Knp.equal(distinct_value_indices.argsort(y_test(x) , 1.) ), False Positives: [ 2 3 7 ... 11302 11479 12500] K.variable(np.array([largest_index]))], 0)) Decreasing Threshold: [1.0000000e+00 9.9999994e-01 P N #argsortsort scores= Phylanxand corresponding.lazy(argsort_eagertruth) values # accumulate the true positives with decreasing threshold 9.9999990e-01 ... 5.9604645e-08 2.9802322e-08 indices@Phylanx= argsort(labels_pred) tps = K.get_value(K.gather(K.cumsum(y_true), threshold_idxs)) 0.0000000e+00] desc_score_indicesdef where_eager(x)=: K.eval(K.reverse(indices, 0)) P TP FP print("True Positives:", tps) printreturn("desc_score_indicesnp.where(x) ", desc_score_indices) fps =
Recommended publications
  • SOL: Effortless Device Support for AI Frameworks Without Source Code Changes
    SOL: Effortless Device Support for AI Frameworks without Source Code Changes Nicolas Weber and Felipe Huici NEC Laboratories Europe Abstract—Modern high performance computing clusters heav- State of the Art Proposed with SOL ily rely on accelerators to overcome the limited compute power API (Python, C/C++, …) API (Python, C/C++, …) of CPUs. These supercomputers run various applications from different domains such as simulations, numerical applications or Framework Core Framework Core artificial intelligence (AI). As a result, vendors need to be able to Device Backends SOL efficiently run a wide variety of workloads on their hardware. In the AI domain this is in particular exacerbated by the Fig. 1: Abstraction layers within AI frameworks. existance of a number of popular frameworks (e.g, PyTorch, TensorFlow, etc.) that have no common code base, and can vary lines of code to their scripts in order to enable SOL and its in functionality. The code of these frameworks evolves quickly, hardware support. making it expensive to keep up with all changes and potentially We explore two strategies to integrate new devices into AI forcing developers to go through constant rounds of upstreaming. frameworks using SOL as a middleware, to keep the original In this paper we explore how to provide hardware support in AI frameworks without changing the framework’s source code in AI framework unchanged and still add support to new device order to minimize maintenance overhead. We introduce SOL, an types. The first strategy hides the entire offloading procedure AI acceleration middleware that provides a hardware abstraction from the framework, and the second only injects the necessary layer that allows us to transparently support heterogenous hard- functionality into the framework to enable the execution, but ware.
    [Show full text]
  • Deep Learning Frameworks | NVIDIA Developer
    4/10/2017 Deep Learning Frameworks | NVIDIA Developer Deep Learning Frameworks The NVIDIA Deep Learning SDK accelerates widely­used deep learning frameworks such as Caffe, CNTK, TensorFlow, Theano and Torch as well as many other deep learning applications. Choose a deep learning framework from the list below, download the supported version of cuDNN and follow the instructions on the framework page to get started. Caffe is a deep learning framework made with expression, speed, and modularity in mind. Caffe is developed by the Berkeley Vision and Learning Center (BVLC), as well as community contributors and is popular for computer vision. Caffe supports cuDNN v5 for GPU acceleration. Supported interfaces: C, C++, Python, MATLAB, Command line interface Learning Resources Deep learning course: Getting Started with the Caffe Framework Blog: Deep Learning for Computer Vision with Caffe and cuDNN Download Caffe Download cuDNN The Microsoft Cognitive Toolkit —previously known as CNTK— is a unified deep­learning toolkit from Microsoft Research that makes it easy to train and combine popular model types across multiple GPUs and servers. Microsoft Cognitive Toolkit implements highly efficient CNN and RNN training for speech, image and text data. Microsoft Cognitive Toolkit supports cuDNN v5.1 for GPU acceleration. Supported interfaces: Python, C++, C# and Command line interface Download CNTK Download cuDNN TensorFlow is a software library for numerical computation using data flow graphs, developed by Google’s Machine Intelligence research organization. TensorFlow supports cuDNN v5.1 for GPU acceleration. Supported interfaces: C++, Python Download TensorFlow Download cuDNN https://developer.nvidia.com/deep­learning­frameworks 1/3 4/10/2017 Deep Learning Frameworks | NVIDIA Developer Theano is a math expression compiler that efficiently defines, optimizes, and evaluates mathematical expressions involving multi­dimensional arrays.
    [Show full text]
  • 1 Amazon Sagemaker
    1 Amazon SageMaker 13:45~14:30 Amazon SageMaker 14:30~15:15 Amazon SageMaker re:Invent 15:15~15:45 Q&A | 15:45~17:00 Amazon SageMaker 20 SmartNews Data Scientist, Meng Lee Sagemaker SageMaker - FiNC FiNC Technologies SIGNATE Amazon SageMaker SIGNATE CTO 17:00~17:15© 2018, Amazon Web Services, Inc. or itsQ&A Affiliates. All rights reserved. Amazon Confidential and Trademark Amazon SageMaker Makoto Shimura, Solutions Architect 2019/01/15 © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark • • • • ⎼ Amazon Athena ⎼ AWS Glue ⎼ Amazon SageMaker © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark • • Amazon SageMaker • Amazon SageMasker • SageMaker SDK • [ | | ] • Amazon SageMaker • © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark 開発 学習 推論推論 学習に使うコードを記述 大量の GPU 大量のCPU や GPU 小規模データで動作確認 大規模データの処理 継続的なデプロイ 試行錯誤の繰り返し 様々なデバイスで動作 © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark 開発 学習 推論推論 エンジニアがプロダク データサイエンティストが開発環境で作業 ション環境に構築 開発と学習を同じ 1 台のインスタンスで実施 API サーバにデプロイ Deep Learning であれば GPU インスタンスを使用 エッジデバイスで動作 © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark & • 開発 学習 推論推論 • エンジニアがプロダク データサイエンティストが開発環境で作業 • ション環境に構築 開発と学習を同じ 1 台のインスタンスで実施 API サーバにデプロイ • Deep Learning であれば GPU インスタンスを使用 エッジデバイスで動作 • API • • © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Amazon SageMaker © 2018, Amazon Web Services, Inc.
    [Show full text]
  • Intel® Optimized AI Frameworks
    Intel® optimized AI frameworks Dr. Fabio Baruffa & Shailen Sobhee Technical Consulting Engineers, Intel IAGS Visit: www.intel.ai/technology Speed up development using open AI software Machine learning Deep learning TOOLKITS App Open source platform for building E2E Analytics & Deep learning inference deployment Open source, scalable, and developers AI applications on Apache Spark* with distributed on CPU/GPU/FPGA/VPU for Caffe*, extensible distributed deep learning TensorFlow*, Keras*, BigDL TensorFlow*, MXNet*, ONNX*, Kaldi* platform built on Kubernetes (BETA) Python R Distributed Intel-optimized Frameworks libraries * • Scikit- • Cart • MlLib (on Spark) * * And more framework Data learn • Random • Mahout optimizations underway • Pandas Forest including PaddlePaddle*, scientists * * • NumPy • e1071 Chainer*, CNTK* & others Intel® Intel® Data Analytics Intel® Math Kernel Library Kernels Distribution Acceleration Library Library for Deep Neural Networks for Python* (Intel® DAAL) (Intel® MKL-DNN) developers Intel distribution High performance machine Open source compiler for deep learning optimized for learning & data analytics Open source DNN functions for model computations optimized for multiple machine learning library CPU / integrated graphics devices (CPU, GPU, NNP) from multiple frameworks (TF, MXNet, ONNX) 2 Visit: www.intel.ai/technology Speed up development using open AI software Machine learning Deep learning TOOLKITS App Open source platform for building E2E Analytics & Deep learning inference deployment Open source, scalable,
    [Show full text]
  • Theano: a Python Framework for Fast Computation of Mathematical Expressions (The Theano Development Team)∗
    Theano: A Python framework for fast computation of mathematical expressions (The Theano Development Team)∗ Rami Al-Rfou,6 Guillaume Alain,1 Amjad Almahairi,1 Christof Angermueller,7, 8 Dzmitry Bahdanau,1 Nicolas Ballas,1 Fred´ eric´ Bastien,1 Justin Bayer, Anatoly Belikov,9 Alexander Belopolsky,10 Yoshua Bengio,1, 3 Arnaud Bergeron,1 James Bergstra,1 Valentin Bisson,1 Josh Bleecher Snyder, Nicolas Bouchard,1 Nicolas Boulanger-Lewandowski,1 Xavier Bouthillier,1 Alexandre de Brebisson,´ 1 Olivier Breuleux,1 Pierre-Luc Carrier,1 Kyunghyun Cho,1, 11 Jan Chorowski,1, 12 Paul Christiano,13 Tim Cooijmans,1, 14 Marc-Alexandre Cotˆ e,´ 15 Myriam Cotˆ e,´ 1 Aaron Courville,1, 4 Yann N. Dauphin,1, 16 Olivier Delalleau,1 Julien Demouth,17 Guillaume Desjardins,1, 18 Sander Dieleman,19 Laurent Dinh,1 Melanie´ Ducoffe,1, 20 Vincent Dumoulin,1 Samira Ebrahimi Kahou,1, 2 Dumitru Erhan,1, 21 Ziye Fan,22 Orhan Firat,1, 23 Mathieu Germain,1 Xavier Glorot,1, 18 Ian Goodfellow,1, 24 Matt Graham,25 Caglar Gulcehre,1 Philippe Hamel,1 Iban Harlouchet,1 Jean-Philippe Heng,1, 26 Balazs´ Hidasi,27 Sina Honari,1 Arjun Jain,28 Sebastien´ Jean,1, 11 Kai Jia,29 Mikhail Korobov,30 Vivek Kulkarni,6 Alex Lamb,1 Pascal Lamblin,1 Eric Larsen,1, 31 Cesar´ Laurent,1 Sean Lee,17 Simon Lefrancois,1 Simon Lemieux,1 Nicholas Leonard,´ 1 Zhouhan Lin,1 Jesse A. Livezey,32 Cory Lorenz,33 Jeremiah Lowin, Qianli Ma,34 Pierre-Antoine Manzagol,1 Olivier Mastropietro,1 Robert T. McGibbon,35 Roland Memisevic,1, 4 Bart van Merrienboer,¨ 1 Vincent Michalski,1 Mehdi Mirza,1 Alberto Orlandi, Christopher Pal,1, 2 Razvan Pascanu,1, 18 Mohammad Pezeshki,1 Colin Raffel,36 Daniel Renshaw,25 Matthew Rocklin, Adriana Romero,1 Markus Roth, Peter Sadowski,37 John Salvatier,38 Franc¸ois Savard,1 Jan Schluter,¨ 39 John Schulman,24 Gabriel Schwartz,40 Iulian Vlad Serban,1 Dmitriy Serdyuk,1 Samira Shabanian,1 Etienne´ Simon,1, 41 Sigurd Spieckermann, S.
    [Show full text]
  • Comparative Study of Deep Learning Software Frameworks
    Comparative Study of Deep Learning Software Frameworks Soheil Bahrampour, Naveen Ramakrishnan, Lukas Schott, Mohak Shah Research and Technology Center, Robert Bosch LLC {Soheil.Bahrampour, Naveen.Ramakrishnan, fixed-term.Lukas.Schott, Mohak.Shah}@us.bosch.com ABSTRACT such as dropout and weight decay [2]. As the popular- Deep learning methods have resulted in significant perfor- ity of the deep learning methods have increased over the mance improvements in several application domains and as last few years, several deep learning software frameworks such several software frameworks have been developed to have appeared to enable efficient development and imple- facilitate their implementation. This paper presents a com- mentation of these methods. The list of available frame- parative study of five deep learning frameworks, namely works includes, but is not limited to, Caffe, DeepLearning4J, Caffe, Neon, TensorFlow, Theano, and Torch, on three as- deepmat, Eblearn, Neon, PyLearn, TensorFlow, Theano, pects: extensibility, hardware utilization, and speed. The Torch, etc. Different frameworks try to optimize different as- study is performed on several types of deep learning ar- pects of training or deployment of a deep learning algorithm. chitectures and we evaluate the performance of the above For instance, Caffe emphasises ease of use where standard frameworks when employed on a single machine for both layers can be easily configured without hard-coding while (multi-threaded) CPU and GPU (Nvidia Titan X) settings. Theano provides automatic differentiation capabilities which The speed performance metrics used here include the gradi- facilitates flexibility to modify architecture for research and ent computation time, which is important during the train- development. Several of these frameworks have received ing phase of deep networks, and the forward time, which wide attention from the research community and are well- is important from the deployment perspective of trained developed allowing efficient training of deep networks with networks.
    [Show full text]
  • Comparative Study of Caffe, Neon, Theano, and Torch
    Workshop track - ICLR 2016 COMPARATIVE STUDY OF CAFFE,NEON,THEANO, AND TORCH FOR DEEP LEARNING Soheil Bahrampour, Naveen Ramakrishnan, Lukas Schott, Mohak Shah Bosch Research and Technology Center fSoheil.Bahrampour,Naveen.Ramakrishnan, fixed-term.Lukas.Schott,[email protected] ABSTRACT Deep learning methods have resulted in significant performance improvements in several application domains and as such several software frameworks have been developed to facilitate their implementation. This paper presents a comparative study of four deep learning frameworks, namely Caffe, Neon, Theano, and Torch, on three aspects: extensibility, hardware utilization, and speed. The study is per- formed on several types of deep learning architectures and we evaluate the per- formance of the above frameworks when employed on a single machine for both (multi-threaded) CPU and GPU (Nvidia Titan X) settings. The speed performance metrics used here include the gradient computation time, which is important dur- ing the training phase of deep networks, and the forward time, which is important from the deployment perspective of trained networks. For convolutional networks, we also report how each of these frameworks support various convolutional algo- rithms and their corresponding performance. From our experiments, we observe that Theano and Torch are the most easily extensible frameworks. We observe that Torch is best suited for any deep architecture on CPU, followed by Theano. It also achieves the best performance on the GPU for large convolutional and fully connected networks, followed closely by Neon. Theano achieves the best perfor- mance on GPU for training and deployment of LSTM networks. Finally Caffe is the easiest for evaluating the performance of standard deep architectures.
    [Show full text]
  • Toolkits and Libraries for Deep Learning
    J Digit Imaging DOI 10.1007/s10278-017-9965-6 Toolkits and Libraries for Deep Learning Bradley J. Erickson1 & Panagiotis Korfiatis1 & Zeynettin Akkus1 & Timothy Kline 1 & Kenneth Philbrick 1 # The Author(s) 2017. This article is published with open access at Springerlink.com Abstract Deep learning is an important new area of machine the algorithm learns, deep learning approaches learn the impor- learning which encompasses a wide range of neural network tant features as well as the proper weighting of those features to architectures designed to complete various tasks. In the medical make predictions for new data. In this paper, we will describe imaging domain, example tasks include organ segmentation, le- some of the libraries and tools that are available to aid in the sion detection, and tumor classification. The most popular net- construction and efficient execution of deep learning as applied work architecture for deep learning for images is the to medical images. convolutional neural network (CNN). Whereas traditional ma- chine learning requires determination and calculation of features How to Evaluate a Toolkit from which the algorithm learns, deep learning approaches learn the important features as well as the proper weighting of those There is not a single criterion for determining the best toolkit for features to make predictions for new data. In this paper, we will deep learning. Each toolkit was designed and built to address the describe some of the libraries and tools that are available to aid in needs perceived by the developer(s) and also reflects their skills the construction and efficient execution of deep learning as ap- and approaches to problems.
    [Show full text]
  • Chainer and Chainerx
    The Frontier of Define-by-Run Deep Learning Frameworks GTC 2019 @ San Jose. Mar. 20, 2019 Seiya Tokui, Preferred Networks, Inc. S9380 Deep Learning Framework for fast iterative research/development 2 Define-by-Run frameworks by default from 2.0 3 x = numpy.array(…) h1 = layer1(x, W1) Write forward prop h2 = layer2(h1, W2) as a plain Python script. loss = loss_func(h2) loss.backward() Variables hold how they W1.array -= lr * W1.grad were computed. Use it to W2.array -= lr * W2.grad compute the gradient. 4 Deep learning framework optimized for the Define-by-Run API design 5 ✓ Model description ✓ Distributed training ✓ Serialization, export …… Everything is optimized for Define-by-Run style programming 6 class Linear(chainer.Link): Tie parameters to the def __init__(self, n_in, n_out): forward code using OOP. super().__init__() with self.init_scope(): self.W = chainer.Parameter(I.HeNormal(), (n_in, n_out)) self.b = chainer.Parameter(0, (n_out,)) def forward(self, x): return x @ self.W + self.b 7 class MLP(chainer.Chain): def __init__(self): super().__init__() with self.init_scope(): Object structure = self.l1 = Linear(784, 200) composition of NN fragments self.l2 = Linear(200, 100) self.l3 = Linear(100, 10) def forward(self, x): h1 = F.relu(self.l1(x)) h2 = F.relu(self.l2(h1)) return self.l3(h2) 8 for batch in iterator: # fetch the next minibatch x, t = converter(batch) # concat, transfer to the device loss = loss_fun(x, t) # forward prop loss.backward() # backprop optimizer.update() # update parameters model.cleargrad() # cleanup gradients
    [Show full text]
  • Which Deep Learning Framework Is Growing Fastest? Integrations
    Which Deep Learning Framework is Growing Fastest? TensorFlow vs. PyTorch Jeff Hale Follow Apr 1 · 8 min read In September 2018, I compared all the major deep learning frameworks in terms of demand, usage, and popularity in this article. TensorFlow was the undisputed heavyweight champion of deep learning frameworks. PyTorch was the young rookie with lots of buzz. ] How has the landscape changed for the leading deep learning frameworks in the past six months? To answer that question, I looked at the number of job listings on Indeed, Monster, LinkedIn, and SimplyHired. I also evaluated changes in Google search volume, GitHub activity, Medium articles, ArXiv articles, and Quora topic followers. Overall, these sources paint a comprehensive picture of growth in demand, usage, and interest. Integrations and Updates We’ve recently seen several important developments in the TensorFlow and PyTorch frameworks. PyTorch v1.0 was pre-released in October 2018, at the same time fastai v1.0 was released. Both releases marked major milestones in the maturity of the frameworks. TensorFlow 2.0 alpha was released March 4, 2019. It added new features and an improved user experience. It more tightly integrates Keras as its high-level API, too. Methodology In this article, I include Keras and fastai in the comparisons because of their tight integrations with TensorFlow and PyTorch. They also provide scale for evaluating TensorFlow and PyTorch. I won’t be exploring other deep learning frameworks in this article. I expect I will receive feedback that Caffe, Theano, MXNET, CNTK, DeepLearning4J, or Chainer deserve to be discussed. While these frameworks each have their virtues, none appear to be on a growth trajectory likely to put them near TensorFlow or PyTorch.
    [Show full text]
  • Chainer: a Next-Generation Open Source Framework for Deep Learning
    Chainer: a Next-Generation Open Source Framework for Deep Learning Seiya Tokui Kenta Oono Shohei Hido Preferred Networks Preferred Networks Preferred Networks America Tokyo, Japan. Tokyo, Japan. San Mateo, CA. [email protected] [email protected] [email protected] Justin Clayton Preferred Networks America San Mateo, CA. [email protected] Abstract Software frameworks for neural networks play key roles in the development and application of deep learning methods. However, as new types of deep learning models are developed, existing frameworks designed for convolutional neural net- works are becoming less useful. In this paper, we introduce Chainer, a Python- based, standalone open source framework for deep learning models. Chainer pro- vides a flexible, intuitive, and high performance means of implementing a full range of deep learning models, including state-of-the-art models such as recurrent neural networks and variational autoencoders. 1 Introduction Deep learning is driving the third wave of artificial intelligence research [13]. Recent papers indicate that deep learning is moving beyond its early successes in pattern recognition and towards new applications in diverse domains and industries. In order to put these research ideas into practice, a software framework for deep learning is needed. Implementing neural networks (NNs) requires a set of specialized building blocks, including mul- tidimensional arrays, activation functions, and autonomous gradient computation. To avoid dupli- cating these tools, many developers use open source deep learning frameworks such as Caffe [9] or Torch [6]. Because deep learning was first used successfully in the areas of computer vision and speech recognition, existing deep learning frameworks were designed mainly for feed-forward net- works such as convolutional neural networks (CNNs), which are effective for analyzing data samples of fixed length, such as images.
    [Show full text]
  • Ezgi Korkmaz Outline
    KTH ROYAL INSTITUTE OF TECHNOLOGY BigDL: A Distributed Deep Learning Framework for Big Data ACM Symposium on Cloud Computing 2019 [Acceptance Rate: 24%] Jason Jinquan Dai, Yiheng Wang, Xin Qiu, Ding Ding, Yao Zhang, Yanzhang Wang, Xianyan Jia, Cherry Li Zhang, Yan Wan, Zhichao Li, Jiao Wang, Sheng- sheng Huang, Zhongyuan Wu, Yang Wang, Yuhao Yang, Bowen She, Dongjie Shi, Qi Lu, Kai Huang, Guoqiong Song. [Intel Corporation] Presenter: Ezgi Korkmaz Outline I Deep learning frameworks I BigDL applications I Motivation for end-to-end framework I Drawbacks of prior approaches I BigDL framework I Experimental Setup and Results of BigDL framework I Critique of the paper 2/16 Deep Learning Frameworks I Big demand from organizations to apply deep learning to big data I Deep learning frameworks: I Torch [2002 Collobert et al.] [ C, Lua] I Caffe [2014 Berkeley BAIR] [C++] I TensorFlow [2015 Google Brain] [C++, Python, CUDA] I Apache MXNet [2015 Apache Software Foundation] [C++] I Chainer [2015 Preferred Networks] [ Python] I Keras [2016 Francois Chollet] [Python] I PyTorch [2016 Facebook] [Python, C++, CUDA] I Apache Spark is an open-source distributed general-purpose cluster-computing framework. I Provides interface for programming clusters with data parallelism 3/16 BigDL I A library on top of Apache Spark I Provides integrated data-analytics within a unifed data analysis pipeline I Allows users to write their own deep learning applications I Running directly on big data clusters I Supports similar API to Torch and Keras I Supports both large scale distributed training and inference I Able to run across hundreds or thousands servers efficiently by uses underlying Spark framework 4/16 BigDL I Developed as an open source project I Used by I Mastercard I WorldBank I Cray I Talroo I UCSF I JD I UnionPay I GigaSpaces I Wide range of applications: transfer learning based image classification, object detection, feature extraction, sequence-to-sequence prediction, neural collaborative filtering for reccomendation etc.
    [Show full text]