<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sebai Dorsaf on Medium]]></title>
        <description><![CDATA[Stories by Sebai Dorsaf on Medium]]></description>
        <link>https://medium.com/@sebaidorsaf?source=rss-e7bee293e4ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5uExSGRtD1ZJonuMJV_KjA.jpeg</url>
            <title>Stories by Sebai Dorsaf on Medium</title>
            <link>https://medium.com/@sebaidorsaf?source=rss-e7bee293e4ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:52:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sebaidorsaf/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[x-Learning Glossary]]></title>
            <link>https://medium.com/swlh/x-learning-glossary-19203cf9080e?source=rss-e7bee293e4ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/19203cf9080e</guid>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[transfer-learning]]></category>
            <category><![CDATA[zero-shot-learning]]></category>
            <category><![CDATA[federated-learning]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <dc:creator><![CDATA[Sebai Dorsaf]]></dc:creator>
            <pubDate>Sun, 06 Sep 2020 13:02:41 GMT</pubDate>
            <atom:updated>2020-09-12T14:35:24.130Z</atom:updated>
            <content:encoded><![CDATA[<h4>A list of terms related to machine and deep learning techniques</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dAvqzjdZeH3sK2sB" /><figcaption>Photo by <a href="https://unsplash.com/@rvignes?utm_source=medium&amp;utm_medium=referral">Romain Vignes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It will be useful to gather the terms that are related to learning techniques and methods in machine and deep learning techniques in a single glossary, so that I give the concerned readers a quick grasp that can let them save considerable time and effort while looking for their meaning throughout the internet and documentations. The glossary includes some terms that are commonly used, whereas others are less popular, perhaps recently considered. Usually, terms are alphabetically ordered in glossaries. Here, I will present them according to their relation to each other. Aligning with the glossary nature, each term will be briefly introduced. The aim is to provide a comprehensible definition in a compact manner.</p><ul><li><strong><em>Federated</em></strong><em> learning</em> :</li></ul><p>In federated learning, also baptized collaborative learning, the model is collectively trained by several nodes. A server orchestrates the training process of these latter that are generally mobile devices such as smartphones, tablets, and Internet of Things (IoT) devices. Federated learning is a good learning alternative that makes the training data decentralized :</p><blockquote>“ We term our approach Federated Learning, since the learning task is solved by a loose federation of participating devices (which we refer to as clients) which are coordinated by a central server. ” McMahan et al. 2016</blockquote><p>The principal working principle of the federated learning is that data used for the learning are distributed on several devices. This actually disables data disclosure since only trained models are shared between the nodes and the central server. The training data is preserved on devices. The role of the server is to aggregate the local model updates of each node and compute their average. The role of each of the devices is to download the global model update in order to compute the next local update and send it to the server. The first framework developed in this context is the Vanilla FL developed in 2016 by Google. The outcrop of the federated learning is benefiting from the development of a number of tools and frameworks, such as TensorFlow Federated, Federated AI Technology Enabler, PySyft, Leaf, PaddleFL, and Clara Training Framework. Despite its success, the FL is facing several issues, namely privacy concerns, expensive communication, systems heterogeneity, and statistical heterogeneity.</p><ul><li><strong><em>Distributed </em></strong><em>deep learning </em>:</li></ul><p>Unlike federated learning, the focus of the distributed learning is to parallelize the training load by training a model on several nodes. With regard to nodes used in federated learning, they are battery-powered systems, e.g., smartphones and IoT devices, and communicate with the central server using limited reach networks, e.g., Bluetooth and Wi-Fi. However, nodes in distributed learning are typically powerful servers of high computational abilities that communicate using reliable networks. With regard to data, local datasets distributed across devices in federated learning are heterogeneous and not necessarily of the same size. In distributed learning, though, local datasets are almost of the same size and identically distributed on servers. In the table below, I gather the key differences between the federated and distributed learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTpuAnENSxLve0y4ae-bSg.png" /></figure><ul><li><strong><em>Mobile</em></strong><em> deep learning</em> :</li></ul><p>When deep learning is implemented on mobile devices, we are talking about mobile deep learning. As training is locally carried out, the mobile deep learning has many assets, mainly rapid response time, low network bandwidth, better data privacy, and low cost of the cloud resources. This fast-paced field is benefiting from the important advancements in terms of software, such as PyTorch Mobile, Paddle Mobile, and TensoFlow Lite, as well as in terms of hardware architectures, including Field Programmable Gate Arrays (FPGA), Application Specific Integrated Circuit (ASIC), and recent mobile Graphic Processing Units (GPU).</p><ul><li><strong><em>Supervised</em></strong><em> learning :</em></li></ul><p>The machine learning algorithm is presented with inputs and outputs and it has to learn rules to map the former to the latter. Here, we talk about labeled dataset. The supervised learning deals with two types of problems that are classification and regression where the predicted outputs are respectively discrete categorical and continuous numerical variables.</p><ul><li><strong><em>Unsupervised</em></strong><em> learning :</em></li></ul><p>The machine learning algorithm is presented with inputs but not outputs and it has to learn structure from the inputs. Unlike supervised learning, no complete and clean labeled dataset is used in unsupervised learning. The main types of problems in this context are clustering, i.e., identification of data groups based on similarities and differences in input values, association mining, i.e., identification of items sets that frequently occur together in datasets, and anomaly detection, i.e., identification of unusual cases based on deviation from normal input patterns. We note that there is also a <em>semi-supervised</em> learning technique that takes a middle ground. It makes use of a small labeled dataset supported by a larger set of unlabeled data.</p><p><strong><em>Self supervised</em></strong><em> learning :</em></p><p>Self or sole supervised learning is a form of unsupervised learning where the data provides the supervision to solve problems such as data representations learning and automatic dataset labeling. Confronted to supervised learning, the aim of self supervised learning is to train good and why not better models than supervised learning without making use of too many labeled data. Based on cognitive abilities of living beings, like babies and animals that learn by experimenting and without actually having labels, Pierre Sermanet has declared :</p><blockquote>Give a robot a label and you feed it for second, teach a robot to label and you feed it for a lifetime.</blockquote><p>Hence, self supervised learning allows us, unlike supervised technique, to leverage the large quantity of unlabeled data available on the internet. Further, it lets us avoid the compute, time and money cost of manually generating labeled datasets. In other words, self supervised learning exploits the asset of unsupervised learning, i.e., unlabeled data, to enhance the supervised learning return, i.e., labeled data, by firstly extracting data features and secondly performing a cheaper and less time consuming supervised learning.</p><p><strong><em>Reinforcement</em></strong><em> learning :</em></p><p>This specific learning technique is actually based on an agent that learns, on its own, to react to an environment. According to its state, the agent carries out actions in an environment to accumulate rewards. A reward is gained if the agent action corresponds to what is expected. In analogy with humans, the agent learns what to do and what not to do from positive and negative experiences that respectively correspond to rewarded and not rewarded actions. The main used reinforcement learning approaches are value-based, policy-based (deterministic and stochastic) and model-based.</p><p>Below is a table that depicts the main characteristics of the supervised, unsupervised, self supervised and reinforcement learning techniques. No one of these machine learning techniques is favored over others. The idea is to make the choice of the appropriate one according to the nature of the problem to solve as well as the available data (small/large dataset, labeled/unlabeled data, …) and resources (time, hardware, money, …).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b9iBm9fqOY2GSWX-_OcKRg.png" /></figure><ul><li><strong><em>Compositional </em></strong><em>learning </em>:</li></ul><p>Compositional learning imitates the humans ability to decompose complex problems to primitive ones and acquire new knowledge from learned one without having to perform additional training. These assets make the compositional learning extremely useful to outcome the complexity of conventional learning techniques and alleviate their need for exorbitant amounts of labeled training datasets. The compositional learning becomes even a must when we face Natural Language processing problems. In fact, they represent a huge set of known words combinations that result in unknown expressions. Different approaches can be leveraged to achieve compositional learning. Main ones include modular learning, transfer learning and incremental learning that will be addressed in what follows.</p><ul><li><strong><em>Modular</em></strong><em> learning </em>:</li></ul><p>One of the disturbing issues that restrains the usage of deep learning algorithms is their exponential training complexity that highly increases as the number of the training epochs becomes more important. The modular learning is proposed as a solution to overcome such a shortcoming. Indeed, it lets us to control what part of the neural network would be run for each sample of the training dataset. I share with you a definition that I find interesting and complete :</p><blockquote>“ A Modular Neural Network (MNN) is a Neural Network (NN) that consists of several modules, each module carrying out one sub-task of the NN’s global task, and all modules functionally integrated. A module can be a sub-structure or a learning subprocedure of the whole network … decomposing the objective task over smaller, sparsely-connected, and less complex modules decreases the connections-per-node ratio substantially, and hence, decreases the theoretical, as well as the practical, bounds of the required number of training samples” AUDA 1999</blockquote><ul><li><strong><em>Transfer</em></strong><em> learning</em> :</li></ul><p>Transfer learning leverages the knowledge that is generated from models already trained for a specific source task. In simple terms, transfer learning is the process of training a model on a large dataset and subsequently using this pre-trained model, that functions well for source task, to perform learning for another target task. This can make the learning faster and more accurate especially for target tasks that do not dispose of sufficient training data. That is what makes, as shown in the figure below, the success of transfer learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*f3lxxPa_b1DJOCipk66fDg.png" /><figcaption>Source : Sebastien Ruder, Transfer learning — Machine learning next frontier</figcaption></figure><p>For the particular deep transfer learning, two main strategies are commonly used, namely off-the-shelf pre-trained models as feature extractors and fine tuning off-the-shelf pre-trained models. The idea behind the former is to use the pre-trained model weighted layers to extract features of the target task data, then train a new shallow model on the so obtained features using traditional machine learning algorithms. The latter selectively retrains some of the source pre-trained model layers by updating their weights in order to fit the new task data. Layers that are generally chosen to be retrained are the deep ones since first layers do not detect task-specific features. A good transfer learning performance is achieved if new data resembles the source ones or at least shares the same features. The transfer learning is commonly used for both computer vision (e.g., VGG-16, ResNet-50 and Inception V3) and Nature Language Processing (e.g., Word2Vec, FastText and GloVe).</p><ul><li><em>Learning </em><strong><em>from scratch</em></strong> :</li></ul><p>Lack of sufficient data, computing resources and time, you download from the web a pre-trained model that is already trained on a huge dataset. Then, you use it, without any further tuning or with only minimal fine tuning on your own much smaller dataset. Unlike this transfer learning, you may opt for learning from scratch where the model needs to be trained for as many iterations as a new model would demand. A full training process is typically required on all the dataset. Learning from scratch is considered necessary for tasks that do not dispose of pre-trained models or simply do not have access to them. Main differences between learning from scratch and transfer learning are summarized in the table below. Both approaches have their pros and cons and the adoption of one of them depends on the nature of the problem to solve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzOhPgKnx7A4HsdsINpF2Q.png" /></figure><p><strong><em>Incremental</em></strong><em> learning</em> :</p><p>One of the major limits of neural networks is their inability to gain knowledge over time and continually learn as humans do. They will not learn anything new once you stop training them. The incremental learning, also known as continuous, continual, and online learning, is proposed to address such issue especially that, in a world as we are living nowadays, new data is continuously available. Further, they are of high dimensionality, large in size and of continuous update. This is mainly the case of data streams, big data and time series datasets that are largely exploited for stock trend prediction and costumer profiling applications. Another current example is models that are trained on COVID-19 X-rays and CT images as diagnosis alternatives to the time-consuming RT-PCR. These databases are substantially expanded by the scientific community and medical societies as new data becomes available.</p><p>Given a model that you have trained from scratch for a source task, transfer learning makes possible its reuse with and without fine-tuning for a traget one. In the case of fine-tuning, layers that are retrained tend to adjust their weights and biases to solve the new task and forget them for source task. This is not the case for incremental learning. This latter has the advantage of training in sequence a neural network for several tasks, i.e., source, target, …, without forgetting what it learned before.</p><ul><li><strong><em>Few/N-shot</em></strong><em> learning</em> :</li></ul><p>Unlike humans, computers are not able to recognize objects that were not previously learned. In this context, N-shot learning is becoming more and more solicited insofar as it enables recognition of objects from classes that the learned model has not seen during training. These are classes for which labeled images are sparse or even not present during the training phase. Indeed, with numerous object classes in the real life, it is impossible to possess densely populated classes and it becomes unfeasible and expensive to maintain a large number of examples per class to feed the training process. N-shot is hence an interesting variant of transfer learning where the model is able to classify new data belonging to new classes based on few or even unlabeled shots, i.e., samples available for training.</p><p>Few-shot or N-shot learning usually refers to a number of samples per unseen class ranging from 0 to 5. If we consider for example a zero-shot learning, it means that our model will be trained with no samples. By the same reasoning, one-shot means a training using one sample. Besides visual features, a semantic transfer is required to make the N-shot learning possible. The semantic attributes act as a bridge between seen and unseen classes given that samples of these latter are either scarce or unavailable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*x5XmLJaj1_yyzK3fpF3JRA.png" /></figure><p>Thanks for reading ! This glossary may be not complete. If a term is missing, please let me know.</p><p>In case you have missed my other posts :</p><ul><li><a href="https://towardsdatascience.com/frequently-asked-questions-on-learning-rate-6defb4e45d2e">Frequently asked questions on Learning Rate</a></li><li><a href="https://towardsdatascience.com/deep-learning-in-practice-mental-map-cheat-sheet-6647b1767e5c">Deep learning in practice : Mental map cheat sheet</a></li><li><a href="https://medium.com/analytics-vidhya/comprehensive-synthesis-of-the-main-activation-functions-pros-and-cons-dab105fe4b3b">Comprehensive synthesis of the main activation functions pros and cons</a></li></ul><p>Before you go, I want to share with you the pictures below that I have captured during my last visit to Djerba, the island of dreams in Tunisia !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQMEi5W1XOZWX0tR1HnaDA.jpeg" /><figcaption>Djerba — The island of dreams</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19203cf9080e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/x-learning-glossary-19203cf9080e">x-Learning Glossary</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep learning in practice : Mental map cheat sheet]]></title>
            <link>https://medium.com/data-science/deep-learning-in-practice-mental-map-cheat-sheet-6647b1767e5c?source=rss-e7bee293e4ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/6647b1767e5c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[notebook]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[training-datasets]]></category>
            <dc:creator><![CDATA[Sebai Dorsaf]]></dc:creator>
            <pubDate>Wed, 22 Apr 2020 11:02:39 GMT</pubDate>
            <atom:updated>2020-05-18T16:24:47.595Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deep learning in practice: Mental map cheat sheet</h3><h4>What do you need to do deep learning ?</h4><p>Once you understand the theory behind deep learning, the trivial next step is to practice what you have learnt. In this article, I try to gather, in a mental map cheat sheet, all that refer to deep learning in practice. This is extremely useful for deep learning beginners that generally either do not have any idea about the tools or datasets to use or have a superficial knowledge of one or two of the market leaders because they bump into them in almost all the documentation related to deep learning. If you plan to undertake this domain, you should have a more general view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dz2qVB4rMOJGkwNn" /><figcaption>Photo by <a href="https://unsplash.com/@namakuki?utm_source=medium&amp;utm_medium=referral">Tevarak Phanduang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The central subject of the mental map is “Deep Learning in practice” from which 5 main branches are emanated, namely the (1) programming languages, (2) frameworks and libraries, (3) IDEs, notebooks and source code editors, (4) datasets and (5) implementations. Each of them will be presented in what follows. Here is an excerpt of the different branches of the proposed mental map cheat sheet. A link to the download page is available in front of each of the tools and datasets. The most commonly used tools are featured in red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SiwGQFDQ5jCMSW_p5ITFOw.png" /><figcaption>Excerpt of the different branches of the mental map cheat sheet</figcaption></figure><p>You can donwload the cheat sheet by clicking on the button below. As the mental map is very large, please think to download it on your device then zoom the item of interest in the <a href="https://drive.google.com/open?id=15mnyOVZHrxWC-RH3UTwMUU6c3e3gGK3i">PDF document</a>.</p><p><strong>Branch 1: Programming languages</strong></p><p>Python is one of the most well-known languages and perhaps even the most popular. The below interest over time graph is good proof. It shows that Python is trending in comparison with its potential candidates, R, Julia and Scala, according to Google Trends worldwide for the last 12 months. You find the rest of the languages that are used for deep learning in the mental map, e.g. java, javascript, Go, …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQe2bz4AkSihWo36im0iSA.png" /></figure><p><strong>Branch 2: Frameworks and libraries</strong></p><p>Some of the frameworks and libraries that I have mentioned in the mental map are only dedicated to deep learning, e.g. M<em>xNet</em> and <em>DeepLearning.Scala</em>. Others are not just deep learning. They are larger machine learning with a big deep learning focus in them, e.g. <em>TensorFlow</em> and <em>PyTorch</em>. Moreover, frameworks and libraries that I gathered are of various types: <em>BigDL</em> and <em>PaddlePaddle</em> are for distributed deep learning, <em>PaddleFL</em> for federated learning, <em>PyTorch Mobile</em> and <em>TensorFlow Lite</em> for deep learning on mobile and IoT devices, …</p><p>In the charts below, I present the recent activity of the most popular frameworks on GitHub in terms of commits, contributors, stars, forks and watches. Apart from stars category, TensorFlow has by far the most GitHub activity for the rest of the categories. Fastai shows a larger number of stars. In fact, it was the second most trending repositories on GitHub when I was writing this present article. You can find all that you need to understand the GitHub categories <a href="https://help.github.com/en">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7QLtwGywKXj0c8dDUzdKWA.png" /></figure><p><strong>Branch 3: IDEs, notebooks and source code editors</strong></p><p>I subdivide this branch into 3 main parts :</p><p>(1) IDEs: IDE, acronym of Integrated Development Environment, enables programmers to consolidate the different aspects of writing a computer program. It increases programmer productivity by combining common activities of writing software into a single application such as editing source code, compiling, building executables, and debugging. In the following table, I present some of the IDEs evoked in the mental map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*piHeQ_SoToKcw-nQfgejxw.png" /></figure><p>(2) Source code editors: are lightened versions of IDEs since they offer fewer tools. They are programming language sensitive so that they highlight the syntax elements of your programs; and provide many features that aid in your program development such as auto-complete, compile, build and run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jci569nm0m45EtlWg5imDw.png" /></figure><p>(3) Notebooks: suitable for beginners since they combine the IDE features and an ergonomic, interactive and easy-to-use educational tool. They also combine live code, narrative text, equations, result visualization, images, and several other media. In the table below, I present 5 open source notebooks according to 6 features that I have chosen :</p><p><em>Supported kernels: </em>a kernel is the computational engine/backend that executes the code contained in the notebook. What I mean by supported kernels is the range of languages that are supported by the notebook environment.</p><p><em>Type: </em>this feature indicates either the notebook is a web-based or a desktop-based application. The very trivial definition of a web application is that it is stored at a remote server that requires a web browser as a client to run, and internet for data and resource transfer. A desktop application is designed to serve standalone machines that do not require the internet for its operation. A notebook that is desktop-based application can be used as web-based one if an appropriate package is installed (e.g. nteract).</p><p><em>Multi-language:</em> is the capability to create multi-language support in a single notebook so that to allow interoperability between code executed in different languages. On the contrary, a single-language notebook allows you to create a notebook in one of its supported languages simultaneously.</p><p><em>Multi-user: </em>means that multiple users are allowed to edit the notebook simultaneously without having their contributions collide, clobber and overwrite each other. Some notebooks can be shared with multiple users but they do not have the multi-user capability. <em>Jupyter</em> is a single-user application by nature. But, you can use <a href="https://github.com/jupyterhub/jupyterhub">JupyterHub</a> for creating multi-user hub which manages and proxies multiple instances of the single user Jupyter notebook server.</p><p><em>Supported by cloud platforms: </em>You can work on your personal computer. However, it becomes difficult to manage real-world problems that require very large data. Moving on to a higher computing scale is necessary to benefit from higher material resources such as GPUs. I picked this feature since it is important to know if a notebook environment is supported or not by the big cloud platforms, i.e. all that you need to create your notebook is pre-installed on the cloud.</p><p><em>Community: </em>if you are starting the use of a particular notebook, you would want to connect with other developers and experts. They can speed up your progress and help you solve some encountered problems. Moreover, documentation should be largely available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZB5WvCaKHyRrk5xIJC9mOw.png" /></figure><p><strong>Branch 4: Datasets</strong></p><p>The key to getting better models in deep learning is the data. That is why I dedicate a branch for datasets in the proposed mental map. All the evoked datasets are open and are largely used for numerous deep learning projects. Some of them even have their specific classes and functions implemented within the market leaders frameworks; and are very used for competitions globally such as <a href="https://www.kaggle.com/">Kaggle</a>, <a href="https://codalab.org/">Codalab</a> and <a href="https://www.drivendata.org/">DataDriven</a>. Datasets that I choose to add to my mental map belong to different contexts, namely image processing (e.g. MNIST and ImageNet), Natural Language Processing (NLP) (e.g. Yelp and WordNet) and speech recognition (e.g. LibriSpeech and AudioSet)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*3N57iLTMZaPxTgtXwX7FqQ.png" /><figcaption>Samples from open deep learning datasets for image processing</figcaption></figure><p>Facing the pandemic of COVID-19 caused by the new coronavirus, researchers around the world are trying to find other diagnosis alternatives to the time-consuming RT-PCR. Deep learning applied to chest radiography images, e.g. Chest X-Rays (CXR) and Computed Tomography (CT), of positive COVID-19 cases has been showing a lot of promise for the coronavirus diagnosis. In this context, I have noticed a lot of people, particularly those that are deep learning practitioners but not medical imaging knowers, asking about available COVID-19 CXR and CT images. Hence, I enumerate open datasets currently used in this context as well as their GitHub links. I also mention existing CXR and CT images datasets, e.g. RSNA and ChestX-ray14, that have been already explored for the detection and classification of lungs diseases. This will help you to merge them with the new COVID-19 datasets in order to (1) differentiate it from other types of pneumonia, (2) decide who should be prioritized for PCR testing for COVID-19 cases and (3) select treatment since COVID-19, and non-COVID-19 infections require different treatment plans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*Epl7ffa7fql_jZkSo03iJQ.png" /><figcaption>Chest X-ray images from open deep learning COVID-19 and non-COVID-19 datasets</figcaption></figure><p>Here, I have to mention that I do not indicate the number of images in the COVID-19 databases since they are substantially varying. They are being expanded by the scientific community and medical societies. These latter are working continuously to grow these bases as new data become available. Moreover, COVID-19 datasets are still incipient, limited and not mature. You can have recourse to some techniques, such as transfer learning and data augmentation, to improve the training process. You can look for others datasets, challenges, projects and papers, that are largely preprints, in the websites of <a href="https://ai-against-covid.ca/datasets/">AI Against COVID-19 Canada</a> task force and <a href="https://www.who.int/emergencies/diseases/novel-coronavirus-2019/global-research-on-novel-coronavirus-2019-ncov">World Health Organization (WHO)</a>. Hope it will all go away!</p><p><strong>Branch 5: Implementations</strong></p><p>Deep learning is arising in multiple and several fields, including but not limited to computer vision, online recommendation engine, voice assistants, medical diagnosis, chatbots, predictive marketing analytics, physical robotics and autonomous cars. The implementations that I mention in the mental map are illustrative, not exhaustive. These are but to mention only a few. I picked for you the links below that present 3 real-world implementations of deep learning related to medical imaging processing, NLP and speech recognition:</p><p><a href="https://www.youtube.com/watch?v=Rp7qqjlBeRY&amp;list=LLVfQ-2TcVc3jJt4VkBVDUoQ">Pie &amp; AI: Real-world AI Applications in Medicine</a></p><p><a href="https://www.youtube.com/watch?v=Rk6xQjhga2c">Use case for Natural Language Processing and Machine Learning</a></p><p><a href="https://www.youtube.com/watch?v=9Fl2Z8-Cf3Q">Automatic speech recognition for real-world applications</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*x5XmLJaj1_yyzK3fpF3JRA.png" /></figure><p>Well! This was it!</p><p>Please note that I do not claim to enumerate all of the tools, datasets and use cases related to deep learning. I rather tried to gather in a single mental map a large part of these latter. It remains open to discussion. I welcome and value any questions and comments you might have in this context. Furthermore, the aim of this article is not to judge which of the tools is better than the others. I do not know if you have noticed that no personal opinion is formulated. It was just an objective enumeration of the main deep learning tools along with their characteristics.</p><p>In case you have missed my previous articles :</p><ul><li><a href="https://towardsdatascience.com/frequently-asked-questions-on-learning-rate-6defb4e45d2e">Frequently asked questions on Learning Rate</a></li><li><a href="https://medium.com/analytics-vidhya/comprehensive-synthesis-of-the-main-activation-functions-pros-and-cons-dab105fe4b3b">Comprehensive synthesis of the main activation functions pros and cons</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6647b1767e5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/deep-learning-in-practice-mental-map-cheat-sheet-6647b1767e5c">Deep learning in practice : Mental map cheat sheet</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Frequently asked questions on Learning Rate]]></title>
            <link>https://medium.com/data-science/frequently-asked-questions-on-learning-rate-6defb4e45d2e?source=rss-e7bee293e4ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/6defb4e45d2e</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[gradient-descent]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[learning-rate]]></category>
            <category><![CDATA[optimizer]]></category>
            <dc:creator><![CDATA[Sebai Dorsaf]]></dc:creator>
            <pubDate>Sat, 11 Apr 2020 10:17:04 GMT</pubDate>
            <atom:updated>2020-04-16T09:09:04.297Z</atom:updated>
            <content:encoded><![CDATA[<h3>Frequently asked questions on learning rate</h3><h4>Learning rate questions &amp; answers</h4><p>This article is aimed to address common questions about learning rate, also known as step size, that are frequently asked by my students. So, I find it useful to gather them in the form of questions and answers! You should be able to find everything you want to know about learning rates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fZ0vji0Qq_noFV1u" /><figcaption>Photo by <a href="https://unsplash.com/@eberhardgross?utm_source=medium&amp;utm_medium=referral">eberhard grossgasteiger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>What is a learning rate and what is it for?</strong></p><p>The neural network computes the weighted sum of its inputs and passes it through an activation function to get the outputs. In order to obtain an accurate prediction, a learning algorithm, known as Gradient Descent (GD), updates the weights while moving backward from outputs towards inputs. When the update is carried out for each sample of the training set, we talk about Stochastic Gradient Descent (SGD).</p><p>The gradient descent optimizer estimates the good values of the model weights in many iterations by minimizing a loss function (L). That is where the learning rate comes into the picture. It controls the speed at which the model learns, or in other words, the speed at which the weights are updated to reach the minimum point of L. The relation between the new (after update) and old (before update) weight values is expressed as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*ROD48O74TBEZcrLNdZ-W4Q.png" /></figure><p><strong>Does the learning rate take negative values?</strong></p><p>The gradient ∂L/∂w is a vector in the increasing direction of the loss function. So, -∂L/∂w is a vector in the decreasing direction of L. Since η is greater than 0, and thus is a positive value, -η∂L/∂w is taking steps in the decreasing direction of L towards its minimum point. If η is a negative value, you are moving away from the minimum instead. It is moving to reverse what the gradient descent does and makes even the non-learning of the neural network. If you consider a negeative learning rate value, you have to make a small, but essential, change in the above equation so that you keep minimizing the loss function :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*aO38aTFdx15KQU7pEvfUVw.png" /></figure><p><strong>What are the typical values of the learning rate ?</strong></p><p>The typical values of the learning rate range from 10 E-6 and 1. Here, you have to know that it has already been established for GD, GD with momentum and SGD, that for any optimization problem, gradient descent converges to a local minimizer if the learning rate is less than 1/L, where L is the Lipschitz smoothness of the loss function with respect to the parameters.</p><p><strong>What is the problem with an ill-chosen learning rate on a gradient?</strong></p><p>The size of steps taken to reach the minimum of the gradient directly affects the performance of your model :</p><ul><li>Small learning rates consume a lot of time to converge or will not be able to converge because of the vanishing gradient, i.e. the gradient goes to 0.</li><li>Large learning rates puts the model at risk of overshooting the minima so it will not be able to converge: what is known as exploding gradient.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hyN0AY_jZ4SLom7eCkE2cA.png" /><figcaption>Vanishing (left) and exploding (right) gradient (<a href="https://cs231n.github.io/neural-networks-3/">Image Credit</a>)</figcaption></figure><p>Hence, your goal is to tune the learning rate so that gradient descent optimizer reaches the minimum point of L in the fewest number of steps. Typically, you should choose a desirable learning rate that is low enough so that the network converges to something useful without causing the vanishing gradient, and high enough so that the model can be trained in a reasonable amount of time without causing the exploding gradient.</p><p>Besides your choice for the learning rate, the shape of the loss function, as well as your choice for the optimizer, determine how fast and if you can converge to the target minimum.</p><p><strong>What is the problem with an ill-chosen learning rate on weights?</strong></p><p>When our inputs are images, a poorly set learning rate leads to noisy features as visualized in the figure below. Quite the contrary, smooth, clean and diverse features are the result of a well tuned learning rate. Properly and improperly set learning rates determine the prediction quality of your model : either a well proceeding training or an unconverged network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X1niEMDbzMSPiagRuksbLg.png" /><figcaption>Plotted features produced by the first layer of a neural network : Cases of improperly (left) and properly (right) set learning rate(<a href="https://cs231n.github.io/neural-networks-3/">Image Credit</a>)</figcaption></figure><p><strong>Can we calculate the best learning rate a priori ?</strong></p><p>It can be possible for the simple models. For complicated ones, it would not be feasible to calculate the optimal learning rate, that results in the most accurate predictions, from theoretical deduction. Observations and experiences must be conducted in order to discover the optimal learning rate value for a given model on a given dataset. The aim of the next question is to know what are the different alternatives that you can use to set the learning rate.</p><p><strong>How do we set the learning rate?</strong></p><p>By referring to what I have read in literature, I distinguish 4 main approaches that you can opt for to tune the learning rate of your model. Here is a walkthrough of everything you need to know to configure the value of η.</p><ul><li><em>Use of a fixed learning rate :</em></li></ul><p>You fix a value for learning rate that you will use during all the learning process. Here, two ways are possible. The first is trivial and simple and does not require any effort. It consists of using the usual values that are commonly used in practise, i.e. 0.1 or 0.01. The second way is much more relevant since you have to look for the right learning rate that fits your specific problem and neural network architecture. As already mentioned, the typical values of the learning rate range from 10 E-6 and 1. So, you coarsely search in this range across various orders of 10 to find an optimal subrange for your learning rate. Then, you refine your search with small increments in the subrange found by the coarse one. One heuristic you may see in practice is to watch the loss while training to find the best learning rate.</p><ul><li><em>Use of a learning rate schedule :</em></li></ul><p>Unlike the fixed learning rate, this alternative requires the variation of η value over the training epochs according to a schedule. Here, you start with a large learning rate and gradually decrease it during the training of the model. It is logical! At the beginning of the learning process, weights are randomly initialized and are far from being optimized so that large change steps are adequate. As you move towards the end of the learning process, more refined weights updates are required. It is common to reduce the Learning step every few epochs. The learning rate can also be decayed over a fixed number of training epochs, then kept constant at a small value for the remaining ones.</p><p>The two popular schedule schemes that I have drawn from my readings are drop learning rate on Plateau and learning rate Decay. In the first scheme, the learning rate is decreased each time loss plateaus, i.e. stagnates, for a fixed number of training epochs. As regards the second scheme, the learning rate is reduced until it reaches a small value close to 0. Here, I distinguish three ways to decay the learning rate, namely step decay, exponential decay and 1/t decay.</p><ul><li><em>Adding of momentum to SGD :</em></li></ul><p>It consists of the addition of a term to the classical SGD equation :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*GmsHYvzizfixwdCbRz6spg.png" /></figure><p>This added term takes into account the history of the weight updates thanks to Vt-1, which is the accumulation of an exponentially moving average of past gradients. This smooths the progression of SGD, lessens its oscillations and thus accelerates the convergence. However, this requires the setting of a new hyperparameter γ. Besides the challenging tuning of the learning rate η, the choice of the momentum γ has to be considered too. γ is set to a value greater than 0 and less than 1. Its common values are 0.5, 0.9 and 0.99. I will not go into detail of momentum. It will be handled in an article aside.</p><ul><li><em>Use of adaptive learning rates :</em></li></ul><p>Unlike the above approaches, no manual tuning of the learning rate is required. η is adjusted by the optimizer to perform larger or smaller updates depending on the weights importance. Furthermore, a learning rate is ensured for each of the weights in the model. Adaptive Gradient (Adagrad), Adadelta, Root Mean Square Propagation (RMSProp) and Adaptive Moment Estimation (Adam) are examples of adaptive gradient descent variants. Here, you should know that there is no single algorithm that works best for all problems.</p><p>Here is an overview of the main approaches used for the learning rate configuration. It presents a brief and concise graphical representation that eases your comprehension!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLvl9LOhWsmZk0rHuQJhEA.png" /></figure><p><strong>What are the practical rules of thumb for the learning rate ?</strong></p><ul><li>The learning rate is the most important hyperparameter upon which your model relies. So, if you are compelled to set one and only one hyperparameter, you have to give priority to the learning rate. You can refer to one of my previous articles to take an idea about another important neural networks hyperparameters : <em>Activation functions</em>.</li></ul><p><a href="https://medium.com/analytics-vidhya/comprehensive-synthesis-of-the-main-activation-functions-pros-and-cons-dab105fe4b3b">Comprehensive synthesis of the main activation functions pros and cons</a></p><ul><li>The tuning of a model learning rate is time-consuming. Thus, it is not necessary to perform a grid search to find the optimal learning rate. To reach successful model, it is enough to find a learning rate large enough that gradient descent converges efficiently, but not so large that it never converges.</li><li>If you opt for one of the non-adaptive learning rate setting approaches, you should be aware that the model will have hundreds, not to say, thousands of weights each with its own loss curve. So, you have to set a learning rate that can fit all of them. Moreover, loss functions are not in practice with clear U-shapes. They tend to have more complex shapes with several local minima.</li><li>The adaptive approach highly eases the challenging task of the appropriate learning rate configuration, which makes them more commonly used. Furthermore, it often converges much faster and outperforms a model having its learning rate improperly tuned by non-adaptive methods.</li><li>SGD with momentum, RMSProp and Adam are the most commonly used algorithms thanks to their robustness over several neural networks architectures and problem types.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*x5XmLJaj1_yyzK3fpF3JRA.png" /></figure><p>I hope it was useful and clear enough for new Deep Learning practitioners. If a new question, that was not addressed in this article, pops into your head, feel free to ask it ! Maybe it would be useful to make the above Q&amp;A more exhaustive.</p><p>An article about momentum is under way. Stay tuned !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6defb4e45d2e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/frequently-asked-questions-on-learning-rate-6defb4e45d2e">Frequently asked questions on Learning Rate</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comprehensive synthesis of the main activation functions pros and cons]]></title>
            <link>https://medium.com/analytics-vidhya/comprehensive-synthesis-of-the-main-activation-functions-pros-and-cons-dab105fe4b3b?source=rss-e7bee293e4ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/dab105fe4b3b</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[relu]]></category>
            <category><![CDATA[activation-functions]]></category>
            <category><![CDATA[sigmoid]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Sebai Dorsaf]]></dc:creator>
            <pubDate>Thu, 02 Apr 2020 11:18:38 GMT</pubDate>
            <atom:updated>2020-04-12T15:16:41.424Z</atom:updated>
            <content:encoded><![CDATA[<h4>Activation functions are one of the most important hyperparameters of Neural Networks that must be carefully chosen</h4><h4>Introduction</h4><p>Neural networks are the common used algorithms to find the parameters, i.e. weights and biases, that best map inputs to outputs. To achieve such model, you have to pay attention to the choice of one of the most important neural network hyperparameters : the <em>activation functions</em>. To have an idea on how to handle them, let’s examine some of them.</p><p>At the end of this article, the reader would be able to answer the following questions :</p><ol><li>What is an activation function ?</li></ol><p>2. What would we use activation functions in a neural network ?</p><p>3. What are the types of activation functions ?</p><p>4. What are the pros and cons of each of them ?</p><p>It is assumed that the reader is familiar with the concept of the neural network as well as forward propagation and backpropagation. To make you more comfortable to understand the essential topic of the article, you can keep in mind the following trivial and very simple presentation of the neural networks working principle. Having inputs, the neural network computes their weighted sum and passes it through an activation function in order to get the outputs. In order to obtain an accurate prediction, a learning algorithm updates the weights while moving backward from outputs towards inputs.</p><p>Good read !</p><h4>What is an activation function ?</h4><p>An activation function is a mathematical equation attached to each hidden and output neuron in the network. Its role is to determine whether the neuron should be activated or not. This is typically based on whether the neuron input is important for the output prediction. Apart from neurons of the input layer, the weighted sum of each neuron inputs, having a bias added to it, is passed through an activation function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*2bQepV444wcrSd5qtYa7wA.png" /><figcaption>Example of a hidden node (green) : its value is the sum of weighted inputs (blue) and bias (red) passed through an activation function.</figcaption></figure><p>There is a bit of confusion between activation and transfer functions. Some authors consider that the transfer function calculates the neuron weighted sum of its inputs, while the activation function decides whether to fire or not the neuron. Others consider that both activation and transfer functions designate the same think, namely the function through which we pass our weigthed sum in order to have a significant output.</p><p>As far as I am concerned, they are used interchangeably by all books and articles I have read. In machine learning, the activation function appellation is more frequently used, not to say exclusively used nowadays. Transfer function appellation was principally employed earlier, when deep learning was uncommon and the main part of the community had a signal and electrical engineering background.</p><h4>Why would we use activation functions in a neural network ?</h4><p>Referring to the above example, the relation between weights and neuron inputs is always linear if we do not make use of an activation function. Thus, the output is a simple linear transformation of these latters. When only linear relationship between variables are addressed, the predicted model will be unsuitable for complex problems such as computer vision and nature language processing.</p><p>Here, the use of an activation function that provides the non-linearity becomes a must. This enables us to build more complex models that fit the real-world problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*1RLAp-3itbi1WhQjaCN6WQ.png" /><figcaption>Linearity vs. non-linearity</figcaption></figure><h4>What are the types of activation functions as well as their advantages and issues ?</h4><p>There are 3 main types of activation functions, namely binary step, linear and non-linear. For each of these types, I will present the equation of the function as well as its plot and range. Its derivative is also specified since it is used during the backpropagation process while minimizing the loss function.</p><p><strong>1- <em>Binary step function</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*YiXk2ElGvlwpHBGCvByqAw.png" /><figcaption>Equation, range, derivative and plot of binary step activation function</figcaption></figure><ul><li>It is a threshold-based activation function.</li><li>It only supports binary classification. In other terms, it does not allow multi-value outputs.</li></ul><p><strong>2. <em>Linear function</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Oxnjm1D0mUHBLpuQhOPhsA.png" /><figcaption>Equation, range, derivative and plot of linear activation function</figcaption></figure><ul><li>It is used for simple linear regression model.</li><li>Since the derivative is a constant, it is not possible to use backpropagation to train the model and understand which weights can provide a better prediction.</li><li>It is unable to capture complex patterns no matter the depth of the neural network. Typically, all layers collapse into one as if the network turns into just one layer : the output layer is a linear function of the input one.</li></ul><p><strong>3. <em>Non-linear function</em></strong></p><p>This type of activation functions is the most commonly used one in neural networks since it introduces, as its name indicates, the non-linearity that we search to better capture the patterns in the data. The major non-linear activation functions are as described below :</p><p><em>3.1. Sigmoid/Logistic</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*3mpTl-kLfp-knSWqwEa3QQ.png" /><figcaption>Equation, range, derivative and plot of Sigmoid activation function</figcaption></figure><ul><li>It normalizes the output of the neuron to a range between 0 and 1, giving the probability of the input value. This makes the sigmoid useful for output neurons of classification-aimed neural networks.</li><li>It is highly compute-intensive since it requires computation of an exponent, which makes the convergence of the network slower.</li><li>It suffers from saturation problem. A neuron is considered as saturated if it reaches its maximum or minimum value (Ex. Sigmoid : <em>f(x) = 0 or 1</em>), so that its derivative (Ex. Sigmoid : <em>f(x)(1- f(x)) = 0</em>)<strong> </strong>is equal to 0. In that case, there is no update in weights. The gradient of the loss function with respect to weights consequently vanishes till it goes down to 0. This phenomenon is known as vanishing gradient that causes poor learning for deep networks.</li><li>It is not a zero-centered function. So, the gradient of all the weights connected to the same neuron is either positive or negative. During update process, these weights are only allowed to move in one direction, i.e. positive or negative, at a time. This makes the loss function optimization harder.</li></ul><p><em>3.2. Tanh (Hyperbolic tangent)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*fRPcst3-fAvpHtRKh2TY_g.png" /></figure><ul><li>It normalizes the output of the neuron to a range between -1 and 1.</li><li>Unlike Sigmoid, it is a zero-centered function so that the optimization of the loss function becomes easier.</li><li>As for Sigmoid, Tanh is highly compute-intensive and suffers from saturation problem and thus vanishing gradient. In fact, when the neuron reaches the minimum or maximum value of its range, that respectively correspond to -1 and 1, its derivative is equal to 0.</li></ul><p><em>3.3. ReLu (Rectified Linear Unit)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*JL4pQZMJgYhkrm0faleYqg.png" /><figcaption>Equation, range, derivative and plot of ReLu activation function</figcaption></figure><ul><li>It is the most used activation function.</li><li>It is easy to compute so that the neural network converges very quickly.</li><li>As its derivative is not 0 for the positive values of the neuron (<em>f’(x)=1 for x ≥ 0</em>), ReLu does not saturate and no dead neurons are reported. Saturation and vanishing gradient only occur for negative values that, given to ReLu, are turned into 0.</li><li>It is not a zero-centered function.</li></ul><p><em>3.4. Leaky ReLu</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*nkCtKD0NIP03D8oMSdIhcw.png" /><figcaption>Equation, range, derivative and plot of Leaky ReLu activation function</figcaption></figure><ul><li>In an attempt to solve the dying ReLu at negative values, Leaky ReLu introduces a small slope. Having the negative values scaled by α enables their corresponding neurons to “stay alive”. The Leaky ReLu is the appellation of the activation function when α = 0.01. It is known as Randomized ReLu if α is equal to any small value other than 0.01.</li><li>It is easy to compute.</li><li>It is close to zero-centered function.</li></ul><h4>Synthesis</h4><p>In the table below, I summarize the common activation function in terms of 5 criteria. These latters are mandatory to know in order to make the right choice of the function to use for a particular neural network, layer and problem to solve :</p><ul><li><em>Range : </em>specifies the range of the function outputs.</li><li><em>0-centered : </em>indicates whether the function is 0-centered or not.</li><li><em>Saturation : </em>indicates whether the function suffers from saturation or not. If yes, the neurons values for which the saturation takes place are mentioned.</li><li><em>Vanishing Gradient : </em>specifies if the activation function causes the vanishing gradient problem or not.</li><li><em>Computation :</em> indicates if the function is easy to compute or rather compute-intensive.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*xDzygf8IYn6OyRRN9qf0xQ.png" /></figure><p>To finish, here are a few good practices that can help you manage when to use the abovementioned functions. Binary step and linear functions are respectively used for binary classification and linear regression problems. Regarding the non-linear activation functions, ReLu is the most commonly used one in hidden layers insofar as it does not cause a spoiling vanishing gradient. Otherwise, Leaky ReLu is preferred. S-shaped Sigmoid and Tanh are generally used in output layers especially for classification problems in Convolutional Neural Networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*x5XmLJaj1_yyzK3fpF3JRA.png" /></figure><p>Thanks for reading !</p><p>Soon, I will talk about the main differences between the Sigmoid and Softmax : the two activation functions used at the end of the neural network to transfer the raw outpout, i.e. logits, to probabilities. Stay tuned !</p><p>Read these articles for more information :</p><p><a href="https://towardsdatascience.com/the-vanishing-gradient-problem-69bf08b15484">https://towardsdatascience.com/gradient-descent-in-python-a0d07285742f</a></p><p><a href="https://towardsdatascience.com/gradient-descent-in-python-a0d07285742f">https://towardsdatascience.com/the-vanishing-gradient-problem-69bf08b15484</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dab105fe4b3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/comprehensive-synthesis-of-the-main-activation-functions-pros-and-cons-dab105fe4b3b">Comprehensive synthesis of the main activation functions pros and cons</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>