{"id":5020,"date":"2024-10-01T08:21:15","date_gmt":"2024-10-01T06:21:15","guid":{"rendered":"https:\/\/neogeo.fr\/simple-neural-network-optimization\/"},"modified":"2026-10-23T16:28:06","modified_gmt":"2026-10-23T14:28:06","slug":"simple-neural-network-optimization","status":"publish","type":"post","link":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/","title":{"rendered":"Simple neural network optimization"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u00a0<\/h2>\n\n<p class=\"wp-block-paragraph\">Now that we have learned how to train a neural network (a model) and how to retrieve\/create training data, let us review the theory behind <strong>optimizing<\/strong> the training of our <strong>model<\/strong>.<\/p>\n\n<p class=\"wp-block-paragraph\">Training a model is an iterative process: at each iteration, the model estimates the output, computes the error in its estimate (<em>loss<\/em>), collects the derivatives of the error with respect to its parameters, and <strong>optimizes<\/strong> these <strong>parameters<\/strong> using <strong>gradient descent<\/strong>.<\/p>\n\n<h2 class=\"wp-block-heading\">Gradient descent (reminder)<\/h2>\n\n<p class=\"wp-block-paragraph\">Gradient descent is an <strong>algorithm<\/strong> used to <strong>find<\/strong> the <strong>minimum<\/strong> of a <strong>function<\/strong>.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Intuitive approach:<\/strong><\/p>\n\n<ul class=\"wp-block-list\">\n<li>Intuitively, you can imagine being a skier on a mountain. You are trying to find the lowest point in altitude (i.e., a minimum altitude). <\/li>\n\n\n\n<li>The approach to find this minimum is to face downhill and simply move forward for 5 minutes.<\/li>\n\n\n\n<li>So, 5 minutes later, you are at another point and you repeat the previous step.<\/li>\n\n\n\n<li>And so on until you reach the lowest point.<\/li>\n<\/ul>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"617\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_1.png\" alt=\"\" class=\"wp-image-1371\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_1.png 778w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_1-300x238.png 300w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_1-768x609.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\"><strong>Mathematical approach:<\/strong><\/p>\n\n<ul class=\"wp-block-list\">\n<li>The slope of the mountain corresponds to the derivative. And the derivative value corresponds to the steepness of the slope at a given point. <\/li>\n\n\n\n<li>Therefore, a large derivative indicates a steep slope. Likewise, if the derivative is small, then the slope is gentle. Finally, a zero derivative corresponds to flat ground.  <\/li>\n\n\n\n<li>As for the sign of the derivative, you move in the opposite direction of the slope. More concretely, a positive derivative indicates a slope that goes down to the left, and a negative derivative indicates a slope that goes down to the right. <\/li>\n\n\n\n<li>Once the direction has been determined (left or right), it remains to determine the step size (do we move for 5 minutes, 10 minutes, \u2026?). Ideally, the step should be as small as possible to determine whether we have found the minimum as reliably as possible. The issue with this approach is the computational cost: the computation will be very slow. Conversely, a step that is too large will cause us to miss the minimum. We therefore need to find a balance, which is done by specifying a learning rate (<strong>learning_rate<\/strong>), which we will cover later.    <\/li>\n<\/ul>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"590\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_2.png\" alt=\"\" class=\"wp-image-1372\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_2.png 752w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_2-300x235.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\"><strong>Combined approaches:<\/strong><\/p>\n\n<ul class=\"wp-block-list\">\n<li>We can represent the mountain described in the intuitive approach with the following function: <strong>f(x) = 2x\u00b2cos(x) &#8211; 5x<\/strong>. We will limit our study to the interval <strong>[-5,5]<\/strong>. <\/li>\n<\/ul>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_3.png\" alt=\"\" class=\"wp-image-1373\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_3.png 600w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_3-300x300.png 300w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_3-150x150.png 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n<ul class=\"wp-block-list\">\n<li>Visually, the minimum is located around <strong>x \u2248 3.8<\/strong>, for a minimum value of approximately <strong>y \u2248 -42<\/strong>.<\/li>\n\n\n\n<li>We will therefore apply gradient descent to find this minimum.<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">To do so, we start by taking an initial x (<strong>x0<\/strong>) at random. <em>x0 = -1<\/em> -&gt; <em>f(x0) = 6.08)<\/em><\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_4.png\" alt=\"\" class=\"wp-image-1375\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_4.png 600w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_4-300x300.png 300w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_4-150x150.png 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">We then compute the slope value at this point (the derivative <strong>f'(x0)<\/strong>). <em>f'(-1) = -2sin(-1)-4cos(-1)-5 \u2248 -5.47827<\/em><\/p>\n\n<p class=\"wp-block-paragraph\">We &#8220;move&#8221; in the direction opposite to the slope: <strong>x1 = x0 \u2212 \u03b1f'(x0)<\/strong> (with \u03b1 = learning_rate = 0.05). <em>x1 \u2248 -0.72609<\/em><\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_5.png\" alt=\"\" class=\"wp-image-1376\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_5.png 600w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_5-300x300.png 300w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_5-150x150.png 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">We then repeat the operation until we find <strong>xmin<\/strong>. <em>xmin = 3.8<\/em><\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_6.png\" alt=\"\" class=\"wp-image-1378\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_6.png 600w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_6-300x300.png 300w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/DG_6-150x150.png 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n<h2 class=\"wp-block-heading\">Hyperparameters<\/h2>\n\n<p class=\"wp-block-paragraph\">This optimization process can be directly influenced by the developer through <strong>hyperparameters<\/strong>. These hyperparameters are adjustable parameters that impact model training and its convergence rate. The convergence rate corresponds to how many iterations the model needs to obtain an optimal result.  <\/p>\n\n<p class=\"wp-block-paragraph\">To train the model, we have 3 hyperparameters:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Number of epochs <strong>epochs_number<\/strong>: the number of times the entire dataset is processed<\/li>\n\n\n\n<li>Training batch size <strong>batch_size<\/strong>: the number of data samples propagated through the network before updating the parameters<\/li>\n\n\n\n<li>Learning rate <strong>learning_rate<\/strong>: how much the model parameters should be updated at each batch\/epoch. Smaller values result in a slow learning speed, while larger values can lead to unpredictable behavior during learning. (see &#8220;Gradient descent&#8221;)  <\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">Explanation of hyperparameters<\/h3>\n\n<p class=\"wp-block-paragraph\">More concretely, we initially have 2 things:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>the model<\/li>\n\n\n\n<li>a dataset<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">We start by splitting the <em>dataset<\/em> into <em>subsets<\/em>, all of the same size. These <em>subsets<\/em> are called <strong>batches<\/strong>, each of size <strong>batch_size<\/strong>. <\/p>\n\n<p class=\"wp-block-paragraph\">Next, each <strong>batch<\/strong> is propagated through the network (passed as input to it). When all <strong>batches<\/strong> have been passed through the model, we have completed 1 <strong>epoch<\/strong>. The process is then repeated <strong>epochs_number<\/strong> times.  <\/p>\n\n<p class=\"wp-block-paragraph\">These steps can be visualized in the following image.<\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"591\" src=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/hyperparameters_sketch.png\" alt=\"\" class=\"wp-image-1379\" srcset=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/hyperparameters_sketch.png 502w, https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/hyperparameters_sketch-255x300.png 255w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/figure>\n\n<h2 class=\"wp-block-heading\">Model training loop<\/h2>\n\n<p class=\"wp-block-paragraph\">First of all, the hyperparameters must be defined. For example: <\/p>\n\n<ul class=\"wp-block-list\">\n<li>learning_rate = 1e-3<\/li>\n\n\n\n<li>batch_size = 64<\/li>\n\n\n\n<li>epochs = 5<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">Once the hyperparameters have been defined, the model training and optimization loop can begin. As a reminder, each iteration of this loop is therefore an <strong>epoch<\/strong>. <\/p>\n\n<p class=\"wp-block-paragraph\">More precisely, each <strong>epoch<\/strong> consists of 2 phases:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><strong>training<\/strong>: <em>iterating<\/em> over the <em>training dataset<\/em> in order to try to <strong>converge<\/strong> towards <strong>optimal parameters<\/strong>.<\/li>\n\n\n\n<li><strong>validation<\/strong>: <em>iterating<\/em> over the <em>validation dataset<\/em> to verify that the model performs better and improves.<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">In the first loop, since our network has not yet been trained, it is very unlikely to produce a good answer\/result. We then need to measure the <strong>distance<\/strong> between the <strong>obtained result<\/strong> and the <strong>expected result<\/strong>. This distance is computed using the loss function (<strong>loss_function<\/strong>).  <\/p>\n\n<p class=\"wp-block-paragraph\">The goal is therefore, as the loop iterations progress, to <strong>minimize<\/strong> this <strong>loss_function<\/strong> in order to obtain a result as close as possible to the expected result. We note here the usefulness of <strong>gradient descent<\/strong> which, as explained earlier, is an algorithm used to find the minimum of a function\u2014here, the <strong>loss_function<\/strong>. <\/p>\n\n<p class=\"wp-block-paragraph\">Optimization therefore consists in updating the parameters at each loop to minimize this loss function. This optimization is encapsulated in an <strong>optimizer<\/strong> object that is applied to the model. The latter therefore takes the model hyperparameters as input. In the training loop, optimization is more specifically carried out in 3 steps:   <\/p>\n\n<ul class=\"wp-block-list\">\n<li>Call to <strong>optimizer.zero_grad()<\/strong>: <strong>resetting<\/strong> the model parameter <strong>gradients<\/strong>. By default, gradients accumulate; to avoid double counting, we explicitly set them to zero at each iteration. <\/li>\n\n\n\n<li>Call to <strong>loss.backward()<\/strong>: <strong>backpropagation<\/strong> of the <strong>loss<\/strong> <strong>prediction<\/strong> (<em>loss<\/em>).<\/li>\n\n\n\n<li>Call to <strong>optimizer.step()<\/strong>: <strong>adjusting<\/strong> the <strong>parameters<\/strong> using the gradients collected during backpropagation.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n<p class=\"wp-block-paragraph\">We have reviewed how to train a data model by introducing the concepts of hyperparameters and highlighting the importance of a good optimizer.<\/p>\n\n<p class=\"wp-block-paragraph\">Next time, we will offer you a practical session to code our optimizer and study some of the optimizers provided in PyTorch.<\/p>\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<p class=\"wp-block-paragraph\"><em>Authors: Mathilde Pommier and S\u00e9bastien<\/em> <em>Da Rocha<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Now that we have learned how to train a neural network (a model) and how to retrieve\/create training data, let us review the theory behind optimizing the training of our model. Training a model is an iterative process: at each iteration, the model estimates the output, computes the error in its estimate (loss), collects &#8230; <a title=\"Simple neural network optimization\" class=\"read-more\" href=\"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/\" aria-label=\"Read more about Simple neural network optimization\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":5021,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[],"class_list":["post-5020","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Neural network optimization: the basics | NEOGEO<\/title>\n<meta name=\"description\" content=\"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Neural network optimization: the basics | NEOGEO\" \/>\n<meta property=\"og:description\" content=\"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/\" \/>\n<meta property=\"og:site_name\" content=\"NEOGEO\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-01T06:21:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-23T14:28:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"2560\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Philippe DESTR\u00c9\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philippe DESTR\u00c9\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/\"},\"author\":{\"name\":\"Philippe DESTR\u00c9\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#\\\/schema\\\/person\\\/69685e84302b110f77d59dc8ee6e2d40\"},\"headline\":\"Simple neural network optimization\",\"datePublished\":\"2024-10-01T06:21:15+00:00\",\"dateModified\":\"2026-10-23T14:28:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/\"},\"wordCount\":1010,\"publisher\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/20943761-scaled-1.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/\",\"url\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/\",\"name\":\"Neural network optimization: the basics | NEOGEO\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/20943761-scaled-1.jpg\",\"datePublished\":\"2024-10-01T06:21:15+00:00\",\"dateModified\":\"2026-10-23T14:28:06+00:00\",\"description\":\"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#primaryimage\",\"url\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/20943761-scaled-1.jpg\",\"contentUrl\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/20943761-scaled-1.jpg\",\"width\":2560,\"height\":2560,\"caption\":\"Custom style script. Website optimization, coding, software development. Female programmer cartoon character working, adding JavaScript, CSS code. Vector isolated concept metaphor illustration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/simple-neural-network-optimization\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simple neural network optimization\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/\",\"name\":\"NEOGEO\",\"description\":\"Optimisez,\u00a0valorisez,\\u2028partagez\u00a0vos\u00a0donn\u00e9es\u00a0spatiales\",\"publisher\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#organization\",\"name\":\"NEOGEO\",\"url\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/NEOGEO-LOGO.svg\",\"contentUrl\":\"https:\\\/\\\/neogeo.fr\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/NEOGEO-LOGO.svg\",\"width\":145,\"height\":42,\"caption\":\"NEOGEO\"},\"image\":{\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/#\\\/schema\\\/person\\\/69685e84302b110f77d59dc8ee6e2d40\",\"name\":\"Philippe DESTR\u00c9\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g\",\"caption\":\"Philippe DESTR\u00c9\"},\"url\":\"https:\\\/\\\/neogeo.fr\\\/en\\\/author\\\/pdestreneogeo\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Neural network optimization: the basics | NEOGEO","description":"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/","og_locale":"en_US","og_type":"article","og_title":"Neural network optimization: the basics | NEOGEO","og_description":"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.","og_url":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/","og_site_name":"NEOGEO","article_published_time":"2024-10-01T06:21:15+00:00","article_modified_time":"2026-10-23T14:28:06+00:00","og_image":[{"width":2560,"height":2560,"url":"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg","type":"image\/jpeg"}],"author":"Philippe DESTR\u00c9","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Philippe DESTR\u00c9","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#article","isPartOf":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/"},"author":{"name":"Philippe DESTR\u00c9","@id":"https:\/\/neogeo.fr\/en\/#\/schema\/person\/69685e84302b110f77d59dc8ee6e2d40"},"headline":"Simple neural network optimization","datePublished":"2024-10-01T06:21:15+00:00","dateModified":"2026-10-23T14:28:06+00:00","mainEntityOfPage":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/"},"wordCount":1010,"publisher":{"@id":"https:\/\/neogeo.fr\/en\/#organization"},"image":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#primaryimage"},"thumbnailUrl":"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/","url":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/","name":"Neural network optimization: the basics | NEOGEO","isPartOf":{"@id":"https:\/\/neogeo.fr\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#primaryimage"},"image":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#primaryimage"},"thumbnailUrl":"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg","datePublished":"2024-10-01T06:21:15+00:00","dateModified":"2026-10-23T14:28:06+00:00","description":"Gradient descent, epochs, batch size, learning rate: the theoretical overview to understand how a neural network is optimized.","breadcrumb":{"@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#primaryimage","url":"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg","contentUrl":"https:\/\/neogeo.fr\/wp-content\/uploads\/2024\/10\/20943761-scaled-1.jpg","width":2560,"height":2560,"caption":"Custom style script. Website optimization, coding, software development. Female programmer cartoon character working, adding JavaScript, CSS code. Vector isolated concept metaphor illustration"},{"@type":"BreadcrumbList","@id":"https:\/\/neogeo.fr\/en\/simple-neural-network-optimization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/neogeo.fr\/en\/"},{"@type":"ListItem","position":2,"name":"Simple neural network optimization"}]},{"@type":"WebSite","@id":"https:\/\/neogeo.fr\/en\/#website","url":"https:\/\/neogeo.fr\/en\/","name":"NEOGEO","description":"Optimisez,\u00a0valorisez,\u2028partagez\u00a0vos\u00a0donn\u00e9es\u00a0spatiales","publisher":{"@id":"https:\/\/neogeo.fr\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/neogeo.fr\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/neogeo.fr\/en\/#organization","name":"NEOGEO","url":"https:\/\/neogeo.fr\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/neogeo.fr\/en\/#\/schema\/logo\/image\/","url":"https:\/\/neogeo.fr\/wp-content\/uploads\/2026\/06\/NEOGEO-LOGO.svg","contentUrl":"https:\/\/neogeo.fr\/wp-content\/uploads\/2026\/06\/NEOGEO-LOGO.svg","width":145,"height":42,"caption":"NEOGEO"},"image":{"@id":"https:\/\/neogeo.fr\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/neogeo.fr\/en\/#\/schema\/person\/69685e84302b110f77d59dc8ee6e2d40","name":"Philippe DESTR\u00c9","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?s=96&d=mm&r=g","caption":"Philippe DESTR\u00c9"},"url":"https:\/\/neogeo.fr\/en\/author\/pdestreneogeo\/"}]}},"_links":{"self":[{"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/posts\/5020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/comments?post=5020"}],"version-history":[{"count":1,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/posts\/5020\/revisions"}],"predecessor-version":[{"id":5022,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/posts\/5020\/revisions\/5022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/media\/5021"}],"wp:attachment":[{"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/media?parent=5020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/categories?post=5020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neogeo.fr\/en\/wp-json\/wp\/v2\/tags?post=5020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}