<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":2038353,"date":"2021-11-20T16:11:00","date_gmt":"2021-11-20T14:11:00","guid":{"rendered":"http:\/\/nhub.news\/?p=2038353"},"modified":"2021-11-20T18:03:20","modified_gmt":"2021-11-20T16:03:20","slug":"4-keys-to-designing-a-neural-network-model","status":"publish","type":"post","link":"http:\/\/nhub.news\/fr\/2021\/11\/4-keys-to-designing-a-neural-network-model\/","title":{"rendered":"4 Keys to Designing a Neural Network Model"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>Learn how layout, activation functions, loss functions, and optimization rules play a role in designing a neural network model.<\/b><br \/>\nJoin the DZone community and get the full member experience. Artificial neural networks (ANNs) are a commonly used tool in deep learning. In this tutorial, you can learn what they are, learn their basic structure, and code a simple neural network with only one neuron. When you design your own neural networks, there are a number of considerations to take into account. This article will describe a few. Rarely if ever are neural networks as simple as one neuron. For example, the majority of neural networks have at least several layers. You will need hidden layers, layers of artificial neurons between the input and output neuron layers if the data are to be separated in a non-linear fashion. You might want to think about each hidden neuron as a linear classifier. The number of neurons in the first hidden layer should equal the number of lines you would need to draw to classify your data. The later hidden layers and the output layer connect the various linear classifiers. In neural networks, an activation function is a function that determines the artificial neuron\u2019s output, given specific inputs. In my earlier tutorial, we used a sigmoid function, which has the advantage of forcing outputs to be within a specific range. Another advantage is that a sigmoid function is monotonic \u2014 in other words, the value order of inputs is the same as the value order of outputs. A disadvantage of sigmoid functions is that especially where the sigmoid curve is relatively flat, learning can be slow. Another popular type of activation function is called the rectified linear unit (ReLU). The value of this function is simply 0 if x is less than 0. Otherwise, it is x. ReLUs enable a faster learning process, even if they create an arbitrary distinction between negative and positive values of x. In their advantages and disadvantages, hyperbolic tangent or tanh activation functions tend to be a happy medium between sigmoid and ReLU. Loss is merely the prediction error of the neural network, determined in each pass-through. Ideally, it should be minimized. The loss function, or the function of loss against output and predicted value, is used to update the weights of the neural network for the next pass-through. The calculation of the new weights is based in some way on the gradient, a function representing the slope of the loss function at each point. Different types of loss functions should be used for different types of regression or classification tasks, as described in more detail here. An optimizer is an algorithm or other method which will update the attributes of the neural network, in order to minimize the losses. For example, it can account for the history of gradient updates, rather than only updating the gradient from a single set \u2014 or batch \u2014 of data samples. It may incorporate momentum \u2014 in other words, the newest update will be the weighted average of all previous updates, with the older weights decayed exponentially. These are some of the many considerations you will need to have when developing your neural network model. Fortunately, many of the most common neural network features are supported by the major machine learning libraries, such as TensorFlow and PyTorch. So, as long as you are not doing anything too unusual, implementability should not be a concern. Published at DZone with permission of Rebecca Sealfon. See the original article here. Opinions expressed by DZone contributors are their own.<\/p>\n<script>jQuery(function(){jQuery(\".vc_icon_element-icon\").css(\"top\", \"0px\");});<\/script><script>jQuery(function(){jQuery(\"#td_post_ranks\").css(\"height\", \"10px\");});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>Learn how layout, activation functions, loss functions, and optimization rules play a role in designing a neural network model. Join the DZone community and get the full member experience. Artificial neural networks (ANNs) are a commonly used tool in deep learning. In this tutorial, you can learn what they are, learn their basic structure, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2038352,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/2038353"}],"collection":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/comments?post=2038353"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/2038353\/revisions"}],"predecessor-version":[{"id":2038354,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/2038353\/revisions\/2038354"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media\/2038352"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media?parent=2038353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/categories?post=2038353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/tags?post=2038353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}