Academia.eduAcademia.edu

Deep learning: An introduction to framework

2018, IJARIIT

Deep learning also called hierarchical learning is part of a broader family of machine learning method based on the learning data representation .learning can be supervised, unsupervised or reinforcement there are many deep learning libraries nowadays. Libraries contain direct function by which we can import the library and we can directly perform the algorithm on the data .now days number of such type libraries are available with their available feature and benefits .we have to select an appropriate tool for performing a particular task is difficult to decide. This research represents the comparative analysis of deep learning libraries .the main libraries which I will compare is tensorflow, pytorch, theano and caffe the parameters for comparing the libraries are the adoption, dynamic and static graph definition, debugging, visualization and data parallelism.

Shah Shivam; International Journal of Advance Research, Ideas and Innovations in Technology ISSN: 2454-132X Impact factor: 4.295 (Volume 4, Issue 6) Available online at: www.ijariit.com Deep learning: An introduction to framework Shivam Shah [email protected] Parul Institute of Engineering and Technology, Parul University, Waghodia, Gujarat ABSTRACT Deep learning also called hierarchical learning is part of a broader family of machine learning method based on the learning data representation .learning can be supervised, unsupervised or reinforcement there are many deep learning libraries nowadays. Libraries contain direct function by which we can import the library and we can directly perform the algorithm on the data .now days number of such type libraries are available with their available feature and benefits .we have to select an appropriate tool for performing a particular task is difficult to decide. This research represents the comparative analysis of deep learning libraries .the main libraries which I will compare is tensorflow, pytorch, theano and caffe the parameters for comparing the libraries are the adoption, dynamic and static graph definition, debugging, visualization and data parallelism. Keywords— Deep learning, Deep learning tools, Theano, Caffe, Pytorch, Tensorflow 1. INTRODUCTION Deep learning is part of machine learning for learning about, multiple levels of representation and abstraction to make sense data such as image sound and text. It is set of the algorithm in machine learning which typically uses the artificial neural network to learn in multiple levels corresponding different levels of abstraction. Deep learning tool consists of: (1) Conventional neural network (2) Document classification (3) Image segmentation (4) ML algorithm libraries (5) Model training (6) Neural network modeling (7) Self-learning (8) Visualization  Conventional neural network: it involves the use of the deep artificial neural network to analyze visual imagery. It helps image clustering by similarities and does image reorganization with the scene.  Document classification: deep learning allows the document classification algorithmically where the task involves assigning of the document to one or several class which makes it easy and sort to manage the document categorized by image, text etc.  Image segmentation: another feature of deep learning contains it allows the division of image into separate pieces that cover it allow the represent the image into something that can easily be analyzed.  ML algorithm libraries: deep learning is an open source machine learning algorithm libraries for everyone.  Model training: deep learning helps in model training that provides machine learning algorithm with training data to learn from.  Neural network modeling: another feature of deep learning is neural network modeling that allows the use of an artificial neural network to forecast and predict the outcome based on available data using simple mathematical modeling.  Self-learning: deep learning involves the self and unsupervised feature learning.  Visualization: another feature of deep learning that allows the ability to representing the data in graph or diagram. 2. DEEP LEARNING TOOLS The machine learning model changing continuously. The key to shifting toward running machine learning algorithm on another platform that makes that run on another platform that makes the application more smarter and intelligent .by using the deep learning we can solve the complex problem makes possible. There are multiple framework or libraries are available. Each framework built for different purpose and different manner here. © 2018, www.IJARIIT.com All Rights Reserved Page | 5 Shah Shivam; International Journal of Advance Research, Ideas and Innovations in Technology Four deep learning frameworks for comparisons are selected namely tensorflow, pytorch, theano and caffe based on several facts. The entire four frameworks are freely available for any user. Tensorflow: tensorflow is one of the best deep learning frameworks arguably use buy the tech giant company it is an open source library developed by Google researcher team named Google brain. It is released on it is developed 2 years ago in November 2015. currently, the stable version of tensorflow is 1.11.0 it is written in python, C++ and cuda .tensorflow support language such as the python, C++ and r to create deep learning model with a wrapper library Tensorflow consist of two tools that are widely used:  Tensorboard for the effective data visualization of network modeling and performance  Tensorflow for the deployment of a rapid algorithm while retaining the same architecture and api. It also provides integration with another tensorflow model. Which different from conventional practice and can be extended to serve other model and data type. Pytorch: the torch is scientific computing framework that offers the wide support of machine learning it is lua-based deep learning uses widely among industry such Facebook, Google etc. it employs the cuda with c/C++ library processing and basically made to scale the production of building model and provide flexibility. As pytorch runs on python .means the basic understanding of python anyone can build the model. This library builds by the Facebook artificial intelligence group it firstly released 2 years ago. The stable version of pytorch is 1.0. It was written in python, C++ and cuda. Caffe: caffe is deep learning framework that supports interface like the python, C++ and Matlab as well as it also supports command line interface. It is known for the transportability, speed, and applicability to the Conventional neural network. Caffe is developed by the University of California, Berkeley it is written in C++ the last stable version was 1.0. Theano: Theano is machine learning and deep learning library for python programming. In theano, the computation is expressed using the numpy which are compiled to run efficiently on cpu or Gpu architecture. Developed by the university of Montreal. It was initially released 11 years ago in 2007the latest stable version is 1.0.3it was written in python ad cuda. 3. DEEP LEARNING LIBRERIES COMPERESION 3.1 Comparison Based on Platform Tenorflow, theano, pytorch and caffe all the four tools are available free online and anyone can use it the tensorflow can be used in python, c++, Java , and go and r while theano and pytorch can be used in only python language .caffe is written in C++ and can be supported in python matlan and C++. Software Caffe Pytorch Software licence BSD BSD Theano Tensorflow Table 1: General comparison of libraries Open source Platform Written in Yes Linux, Macos ,windows C++ Yes Linux, Macos ,windows C++,python ,cuda BSD Yes Cross platform python Apache 2.0 Yes Linux, Macos ,windows, C++,python ,cuda Android Interface Python, Matlab, C++ Python python python,c++, java,go , r Table 2: Comparisons based on the functionality of the library Software Open MP support Open CL support Cuda Support Automatic Has Pre-trained Recurrent neural network model and conventional differentiation Neural network Yes Yes YES Caffe Yes Under development Yes Pytorch Yes Yes Yes Theano Yes Yes Yes Tensorflow No Via separately maintainable Package Via separately maintainable Package On roadmap but already supports SYCL Yes Yes Yes YES Throuth Lesagen’s YES Model Yes YES 3.2 Graphing The tensorflow, caffe, and theano are the static graph framework while the pytorch is a dynamic graph framework. In the static graph network, the graph is defined statically before the model can run all the communication with the outer world is performed via an object which is substituted by external data at runtime. In the dynamic graphing it provides more flexibility of computation.py torch allows the graphing process very smoothly. 3.3 Visualization Tensorboard which is part of tensorflow is a good tool when it comes to visualization. While the pytorch uses the visdom it is not complete but it is convenient to use. The caffe generate the protext file. Caffe itself has python implementation to visualize network © 2018, www.IJARIIT.com All Rights Reserved Page | 6 Shah Shivam; International Journal of Advance Research, Ideas and Innovations in Technology located in caffe root or python folder or we can use digits from NVIDIA which is visualization tool.d3viz is extended theano printing module to interactively visualize compute graph .instead of the static picture it creates an html file which can be open in web browser. 3.4 Data parallelism one of the biggest features that differentiates the pytorch from other framework is declarative data parallelism we can use the direct function to wrap any module and it will be parallelized over the batch dimension in the other way tensorflow allows to every operation to run on a specific device .in the caffe by the data Parallelism it allows to run the simple code on the multiple GPU. A solver and net will be used for every GPU so the batch size is effectively multiplied by the number of GPUs. It will again create single GPU training; reduce the batch size in the network definition accordingly. Theano has feature allow t use the multiple GPU at the same time in one function the multiple GPU require the use of the GPU array backend so it will work correctly .for the data Parallelism the probably batter using the platoons. 4. CONCLUSION Using which type of framework will depend on the application .if we want large scale image classification and object detection then caffe is good caffe has the largest quantity of pre trained computer vision model. it makes it one of the best frameworks for the computer vision the tensorflow has the largest active community by far learning the tensorflow is very easy for the tensorflow many moocs and tutorial are available on the internet it has the very nice visualizing capability with tensorboard. It is generally the numeric computation library means we can implement many algorithms with the tensorflow. The theano framework online learning tools are not available easily it also causes loss of momentum so the recent model appears more slowly. State of the art model is always be found. pretrained model is can be slow to appear. Pytorch is similar to Numpy in the way that it manages computation but it needs the strong GPU support similarity to Numpy. It also has the c programming language as a backend so it much faster than native python library Numpy could be GPU accelerated but it doesn’t have strong GPU support pytorch is specifically tailored for GPU functionality in python. 5. REFERENCES [1] S. Bahrampour, N. Ramakrishnan, L. Schott, M. Shah, "Research and Technology Center", Robert Bosch LLC Comparative Study of Deep Learning Software Frameworks. [2] Ian J. Goodfellow, David Warde-Farley, Pascal Lamblin, Vincent Dumoulin, Mehdi Mirza, Razvan Pascanu, James Bergstra, Frederic Bastien, Yoshua Bengio, "Departement dInformatique et de Recherche Operationelle", Universite de Montreal Pylearn2: a machine learning research library. [3] R. Collobert, Laurens van der Maaten, A. Joulin, "Facebook AI Research 1 Hacker Way Menlo Park CA 94025 / 770 Broadway New York NY 10003", USA Torchnet: An Open-Source Platform for (Deep) Learning Research. [4] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, Trevor Darrell, "SUBMITTED to ACM MULTIMEDIA 2014 OPEN SOURCE SOFTWARE COMPE-TITION UC Berkeley EECS Berkeley", CA 94702 Caffe: Convolutional Architecture for Fast Feature Embedding. [5] Introduction to Deep learning algorithm Deep learning tutorials,http://deeplearning.net/tutorial/. [6] A beginner’s introduction to Deep Learning Article by Samvita, http://hyperverge.co/a-beginners-introduction-to-deeplearning/. [7] Deep learning book Chapter 1 Introduction, http://www.deeplearningbook.org/contents/intro.html. [8] Cuda-convnet High-performance C++/CUDA implementation of convo-lution of neural networks, [online] Available: https://code.google.com/p/cuda-convnet/. [9] Evaluation of Deep Learning Toolkits, https://github.com/zer0n/deepframeworks/performance. BIOGRAPHY Shivam Shah B. Tech (Information Technology) Parul Institute of Engineering and Technology, Parul University, Waghodia, Gujarat © 2018, www.IJARIIT.com All Rights Reserved Page | 7