Page 80 - Handbook of Deep Learning in Biomedical Engineering Techniques and Applications
P. 80

68   Chapter 3 Application, algorithm, tools directly related to deep learning




                                    2.4 Torch tool
                                       This tool is implemented with C. Easy-to-write codes for new
                                    layers, computational schemes based on Lua, and pretrained
                                    prototypes are considered to be the main advantages of this
                                    tool. It supports basic features for indexing, slicing, transposing,
                                    type casting, resizing, sharing storage, and cloning [8].
                                       It provides a flexible and affordable N-dimensional array
                                    whose object is used by most other packages, and it forms the
                                    core object of the library. The Tensor also supports all the math-
                                    ematical operations, such as max, min, sum, statistical distribu-
                                    tions, and BLAS operations, such as dot product, matrixevector
                                    multiplication,  matrixematrix  multiplication,  matrixevector
                                    product, and matrix product [9].
                                       The torch also simplifies objects and serialization by providing
                                    various convenient functions that are used throughout its entire
                                    packages. The torch.class (classname, parentclass) function can
                                    be used to create many object factories (classes). When the argu-
                                    ment constructor is called, torch initializes and sets with a Lua ta-
                                    ble, which makes the table as an object.
                                       Objects developed with the torch factory can be initialized,
                                    but they do not contain references to objects that cannot be seri-
                                    alized. However, user data can be serialized if it is wrapped by or
                                    metatable that provides both read( ) and write( ) methods [9].

                                    2.5 Theano
                                       Theano is an open-source platform released under the BSD li-
                                    cense and was invented by the LISA (now MILA) group at the
                                    University of Montreal, Quebec, Canada (home of Yoshua Ben-
                                    gio). It is named after a Greek mathematician [10].
                                       Theano is a compiler for mathematical expressions in Python.
                                    It knows how to take code structures and make them into very
                                    efficient code like NumPy, efficient native libraries like BLAS,
                                    and native code (Cþþ) to run as fast as possible on CPUs or
                                    GPUs. It uses clever code optimizations to squeeze performance
                                    as possible from hardware.The actual syntax of Theano is very
                                    symbolic, which can be easy for beginners used to normal soft-
                                    ware development. Particularly, expressions are defined in the ab-
                                    stract and then compiled and later actually used to make
                                    calculations [11].
                                       It was used to handle the types of computation required for
                                    bulk neural network algorithms used in DL. It was one of the
                                    initial libraries of its development started in 2007. Theano pro-
                                    vides extensive installation instructions for the fundamental
                                    operating systems: Windows, OS X, and Linux [11].
   75   76   77   78   79   80   81   82   83   84   85