{"id":3384,"date":"2023-08-31T10:59:22","date_gmt":"2023-08-31T10:59:22","guid":{"rendered":"https:\/\/neuraldesigner.com\/blog\/energy-consumption-comparison\/"},"modified":"2025-11-28T10:57:39","modified_gmt":"2025-11-28T09:57:39","slug":"energy-consumption-comparison","status":"publish","type":"blog","link":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/","title":{"rendered":"Energy consumption of TensorFlow and Neural Designer"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3384\" class=\"elementor elementor-3384\" data-elementor-post-type=\"blog\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-68f74912 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"68f74912\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-10aa776a\" data-id=\"10aa776a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6e46a42b elementor-widget elementor-widget-text-editor\" data-id=\"6e46a42b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<section><style>\n            .flex-row {<br \/>                display: flex;<br \/>                justify-content: space-between;<br \/>                flex-wrap: wrap;<br \/>            }<\/p>\n<p>            .flex-column {<br \/>            }<\/p>\n<p>            .flex-column2 {<br \/>                width: 70%<br \/>            }<\/p>\n<p>            .Titulo {<br \/>                position: relative;<br \/>                font-size: 1.30em;<br \/>                font-family: 'Roboto', sans-serif;<br \/>                color: black;<br \/>                margin-bottom: 1em;<br \/>                font-weight: 900;<br \/>                text-align: center;<br \/>            }<\/p>\n<p>            #line-container {<br \/>                width: 350px;<br \/>                height: 40px;<br \/>                left: 0;<br \/>            }<\/p>\n<p>            #line-container2 {<br \/>                width: 350px;<br \/>                height: 40px;<br \/>                left: 0;<br \/>            }<\/p>\n<p>            .progress-text {<br \/>                font-size: 1.25em;<br \/>                font-family: 'Roboto', sans-serif;<br \/>                color: black;<br \/>                margin-bottom: 1em;<br \/>                font-weight: 500;<br \/>            }<\/p>\n<p>            .contenedor {<br \/>                position: relative;<br \/>                display: inline-block;<br \/>                text-align: left;<br \/>            }<\/p>\n<p>            .TensorFlow {<br \/>                position: relative;<br \/>                top: 25px;<br \/>                font-size: 1.25em;<br \/>                font-family: 'Roboto', sans-serif;<br \/>                color: black;<br \/>                margin-bottom: 1em;<br \/>                font-weight: 500;<br \/>                text-align:left;<br \/>            }<\/p>\n<p>            .Neural {<br \/>                position: relative;<br \/>                font-size: 1.25em;<br \/>                font-family: 'Roboto', sans-serif;<br \/>                color: black;<br \/>                top: 25px;<br \/>                margin-bottom: 1em;<br \/>                font-weight: 500;<br \/>                text-align:left;<br \/>            }<br \/>        <\/style><p><script>\n\n\n            var lineBar = new ProgressBar.Line(\"#line-container\", {\n                strokeWidth: 4,\n                trailWidth: 0.5,\n                color: '#f6be37',\n                text: {\n                    value: '34',\n                    className: 'progress-text',\n                    style: {\n                        color: 'black',\n                        position: 'absolute',\n                        right: '0',\n                        top: '-30 px',\n                        padding: 0,\n                        margin: 0,\n                        transform: null\n                    }\n                },\n\n                step: (state, shape) => {\n                    shape.setText((shape.value() * 4.5).toFixed(2) + ' kWh');\n                },\n            });\n\n\n            lineBar.animate(1, {\n                duration: 4000\n            });\n            var lineBar = new ProgressBar.Line(\"#line-container2\", {\n                strokeWidth: 4,\n                trailWidth: 0.5,\n                color: '#55a1c8',\n                text: {\n                    value: '34',\n                    className: 'progress-text',\n                    style: {\n                        color: 'black',\n                        position: 'absolute',\n                        right: '0',\n                        top: '-30 px',\n                        padding: 0,\n                        margin: 0,\n                        transform: null\n                    }\n                },\n\n                step: (state, shape) => {\n                    shape.setText((shape.value() * 4.5).toFixed(2) + ' kWh');\n                },\n\n            });\n\n            lineBar.animate(0.5777, {\n                duration: 4000\n            });\n\n        <\/script><\/p><p><a href=\"https:\/\/tensorflow.org\/\">TensorFlow<\/a> and <a href=\"https:\/\/www.neuraldesigner.com\/\">Neural Designer<\/a>\u00a0are popular machine learning platforms developed by\u00a0<a href=\"https:\/\/research.google\/teams\/brain\/\">Google<\/a> and\u00a0<a href=\"https:\/\/www.artelnics.com\/\">Artelnics<\/a>, respectively.<\/p><p>Although all those frameworks are based on neural networks, they present essential differences in functionality, usability, performance, consumption, etc.<\/p><p>This post compares the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.<\/p><p>As we will see, Neural Designer consumes <b>42<\/b>% less than its competitor machine learning platform.<\/p><p data-start=\"50\" data-end=\"154\">In this article, we outline all the steps required to reproduce the results using Neural Designer (<a href=\"https:\/\/www.neuraldesigner.com\/downloads\/\">download<\/a>)<\/p><p><b>Contents:<\/b><\/p><ul><li><a href=\"#Introduction\">Introduction<\/a>.<\/li><li><a href=\"#BenchmarkApplication\">Benchmark application<\/a>.<\/li><li><a href=\"#ReferenceComputer\">Reference computer<\/a>.<\/li><li><a href=\"#Referenceelectricityconsumptionmeter\">Reference electricity consumption meter<\/a>.<\/li><li><a href=\"#Results\">Results<\/a>.<\/li><li><a href=\"#Conclusions\">Conclusions<\/a>.<\/li><\/ul><\/section><section id=\"Introduction\"><h2>Introduction<\/h2><p>Two of the most essential features of machine learning platforms are their training speed and the total amount of energy consumed during this process.<\/p><p>In most cases, modeling huge data sets is very expensive in computational terms, which leads to a high economic cost of neural network training and a high environmental impact.<\/p><p>Thus, this article aims to measure the GPU energy consumption of TensorFlow and Neural Designer for a benchmark application. Also, a couple of instructions are given to enable anyone to repeat this one or a similar benchmark and check on their own the fantastic results obtained when Neural Designer is used.<\/p><p>The following table summarizes the technical features of these tools that might impact their GPU performance.<\/p><div style=\"overflow-x: auto;\"><table><thead><tr><th>\u00a0<\/th><th>TensorFlow<\/th><th>Neural Designer<\/th><\/tr><\/thead><tbody><tr><th>Written in<\/th><td>C++, CUDA, Python<\/td><td>C++, CUDA<\/td><\/tr><tr><th>Interface<\/th><td>Python<\/td><td>Graphical User Interface<\/td><\/tr><tr><th>Differentiation<\/th><td>Automatic<\/td><td>Analytical<\/td><\/tr><\/tbody><\/table><\/div><p>The above table shows that TensorFlow is programmed in C++ and Python, whereas Neural Designer is entirely programmed in C++.<\/p><p>Interpreted languages like Python have advantages over compiled languages like C ++, such as their ease of use.<\/p><p>However, the performance of Python is generally lower than that of C++. Indeed, Python takes significant time to interpret sentences during the program&#8217;s execution.<\/p><p>On the other hand, TensorFlow uses automatic differentiation, while Neural Designer uses analytical differentiation.<\/p><p>As before, automatic differentiation has some advantages over analytical differentiation. Indeed, it simplifies obtaining the gradient for new architectures or loss indices.<\/p><p>However, the performance of automatic differentiation is, in general, lower than that of analytical differentiation:<br \/>The first derives the gradient during the program&#8217;s execution, while the second has that formula pre-calculated.<\/p><p>Next, we use TensorFlow and Neural Designer to measure the energy consumption for a benchmark problem on a reference computer. The results produced by these platforms are then compared.<\/p><\/section><section id=\"BenchmarkApplication\"><h2>Benchmark application<\/h2><p>The first step is to choose a benchmark application that is general enough to conclude the performance of the machine learning platforms. As previously stated, we will train a neural network that approximates a set of input-target samples.<\/p><p>In this regard, an approximation application is defined by a data set, a neural network, and an associated training strategy.<br \/>The following table uniquely defines these three components.<\/p><div style=\"overflow-x: auto;\"><table><tbody><tr><th>Data set<br \/><img decoding=\"async\" class=\"small_left\" src=\"https:\/\/www.neuraldesigner.com\/images\/data_set.svg\" \/><\/th><td><ul><li>Benchmark: Rosenbrock<\/li><li>Inputs number: 1000<\/li><li>Targets number: 1<\/li><li>Samples number: 1000000<\/li><\/ul><\/td><\/tr><tr><th>Neural network<br \/><img decoding=\"async\" class=\"small_left\" src=\"https:\/\/www.neuraldesigner.com\/images\/neural_network.svg\" \/><\/th><td><ul><li>Layers number: 2<\/li><li>Layer 1:<br \/><ul style=\"list-style-type: none;\"><li>-Type: Perceptron (Dense)<\/li><li>-Inputs number: 1000<\/li><li>-Neurons number: 1000<\/li><li>-Activation function: Hyperbolic tangent (tanh)<\/li><\/ul><\/li><li>Layer 2:<br \/><ul style=\"list-style-type: none;\"><li>-Type: Perceptron (Dense)<\/li><li>-Inputs number: 1000<\/li><li>-Neurons number: 1<\/li><li>-Activation function: Linear<\/li><\/ul><\/li><li>Initialization: Random uniform [-1,1]<\/li><\/ul><\/td><\/tr><tr><th>Training strategy<br \/><img decoding=\"async\" class=\"small_left\" src=\"https:\/\/www.neuraldesigner.com\/images\/training_strategy.svg\" \/><\/th><td><ul><li>Loss index:<br \/><ul style=\"list-style-type: none;\"><li>-Error: Mean Squared Error (MSE)<\/li><li>-Regularization: None<\/li><\/ul><\/li><li>Optimization algorithm:<br \/><ul style=\"list-style-type: none;\"><li>-Algorithm: Adaptive Moment Estimation (Adam)<\/li><li>-Batch size: 1000<\/li><li>-Maximum epochs: 20000<\/li><\/ul><\/li><\/ul><\/td><\/tr><\/tbody><\/table><\/div><p>Once the TensorFlow and Neural Designer applications have been created, we must run them.<\/p><\/section><section id=\"ReferenceComputer\"><h2>Reference computer<\/h2><p>The next step is to choose the computer in which the neural network will be trained with TensorFlow and Neural Designer.<br \/>The table below shows the features of the computer used for this instance.<\/p><div style=\"overflow-x: auto;\"><table><tbody><tr><th>Operating system:<\/th><td>Windows 11 Home 64-bit<\/td><\/tr><tr><th>Processor:<\/th><td>Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, 3192 Mhz, 6 Core(s), 12 Logical Processor(s)<\/td><\/tr><tr><th>Physical RAM:<\/th><td>31.9 GB<\/td><\/tr><tr><th>Device (GPU):<\/th><td>NVIDIA GeForce GTX 1050 Ti<\/td><\/tr><\/tbody><\/table><\/div><p>Once the computer has been selected, we install TensorFlow (2.1.0) and Neural Designer (5.9.9) on it.<\/p><p>Below, the TensorFlow code used is shown.<\/p><p><!-- HTML generated using hilite.me --><\/p><div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\"><pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">tensorflow<\/span> <span style=\"color: #008800; font-weight: bold;\">as<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">tf<\/span>\n<span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">pandas<\/span> <span style=\"color: #008800; font-weight: bold;\">as<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">pd<\/span>\n<span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">time<\/span>\n<span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">numpy<\/span> <span style=\"color: #008800; font-weight: bold;\">as<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">np<\/span>\n<span style=\"color: #008800; font-weight: bold;\">from<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">tensorflow.keras.utils<\/span> <span style=\"color: #008800; font-weight: bold;\">import<\/span> Sequence\n\n<span style=\"color: #888888;\">#read data float32<\/span>\n\n\nfilename <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"C:\/Users\/Usuario\/Downloads\/rosenbrock.csv\"<\/span>\ndf_test <span style=\"color: #333333;\">=<\/span> pd<span style=\"color: #333333;\">.<\/span>read_csv(filename, nrows<span style=\"color: #333333;\">=<\/span><span style=\"color: #0000dd; font-weight: bold;\">100<\/span>)\nfloat_cols <span style=\"color: #333333;\">=<\/span> [c <span style=\"color: #008800; font-weight: bold;\">for<\/span> c <span style=\"color: #000000; font-weight: bold;\">in<\/span> df_test <span style=\"color: #008800; font-weight: bold;\">if<\/span> df_test[c]<span style=\"color: #333333;\">.<\/span>dtype <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">\"float64\"<\/span>]\nfloat32_cols <span style=\"color: #333333;\">=<\/span> {c: np<span style=\"color: #333333;\">.<\/span>float32 <span style=\"color: #008800; font-weight: bold;\">for<\/span> c <span style=\"color: #000000; font-weight: bold;\">in<\/span> float_cols}\ndata <span style=\"color: #333333;\">=<\/span> pd<span style=\"color: #333333;\">.<\/span>read_csv(filename, engine<span style=\"color: #333333;\">=<\/span><span style=\"background-color: #fff0f0;\">'c'<\/span>, dtype<span style=\"color: #333333;\">=<\/span>float32_cols)\n\n    \nx <span style=\"color: #333333;\">=<\/span> data<span style=\"color: #333333;\">.<\/span>iloc[:,:<span style=\"color: #333333;\">-<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>]<span style=\"color: #333333;\">.<\/span>values\ny <span style=\"color: #333333;\">=<\/span> data<span style=\"color: #333333;\">.<\/span>iloc[:,[<span style=\"color: #333333;\">-<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>]]<span style=\"color: #333333;\">.<\/span>values\n\ninitializer <span style=\"color: #333333;\">=<\/span> tf<span style=\"color: #333333;\">.<\/span>keras<span style=\"color: #333333;\">.<\/span>initializers<span style=\"color: #333333;\">.<\/span>RandomUniform(minval<span style=\"color: #333333;\">=-<\/span><span style=\"color: #6600ee; font-weight: bold;\">1.<\/span>, maxval<span style=\"color: #333333;\">=<\/span><span style=\"color: #6600ee; font-weight: bold;\">1.<\/span>)\n\n\n<span style=\"color: #888888;\">#build model<\/span>\n\nmodel <span style=\"color: #333333;\">=<\/span> tf<span style=\"color: #333333;\">.<\/span>keras<span style=\"color: #333333;\">.<\/span>models<span style=\"color: #333333;\">.<\/span>Sequential([tf<span style=\"color: #333333;\">.<\/span>keras<span style=\"color: #333333;\">.<\/span>layers<span style=\"color: #333333;\">.<\/span>Dense(<span style=\"color: #0000dd; font-weight: bold;\">1000<\/span>,activation <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">'tanh'<\/span>, kernel_initializer <span style=\"color: #333333;\">=<\/span> initializer, bias_initializer<span style=\"color: #333333;\">=<\/span>initializer),\ntf<span style=\"color: #333333;\">.<\/span>keras<span style=\"color: #333333;\">.<\/span>layers<span style=\"color: #333333;\">.<\/span>Dense(<span style=\"color: #0000dd; font-weight: bold;\">1<\/span>, activation <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">'linear'<\/span>, kernel_initializer <span style=\"color: #333333;\">=<\/span> initializer, bias_initializer<span style=\"color: #333333;\">=<\/span>initializer)])\t   \t\n\n\n<span style=\"color: #888888;\">#compile model<\/span>\n\nmodel<span style=\"color: #333333;\">.<\/span>compile(optimizer<span style=\"color: #333333;\">=<\/span><span style=\"background-color: #fff0f0;\">'adam'<\/span>, loss <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">'mean_squared_error'<\/span>)\n\n\t\t\n<span style=\"color: #888888;\">#train model <\/span>\n\n<span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">DataGenerator<\/span>(Sequence):\n                <span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">__init__<\/span>(<span style=\"color: #007020;\">self<\/span>, x_set, y_set, batch_size):\n                <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>x, <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>y <span style=\"color: #333333;\">=<\/span> x_set, y_set\n                <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size <span style=\"color: #333333;\">=<\/span> batch_size\n\n                <span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">__len__<\/span>(<span style=\"color: #007020;\">self<\/span>):\n                <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #007020;\">int<\/span>(np<span style=\"color: #333333;\">.<\/span>ceil(<span style=\"color: #007020;\">len<\/span>(<span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>x) <span style=\"color: #333333;\">\/<\/span> <span style=\"color: #007020;\">float<\/span>(<span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size)))\n\n                <span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">__getitem__<\/span>(<span style=\"color: #007020;\">self<\/span>, idx):\n        batch_x <span style=\"color: #333333;\">=<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>x[idx <span style=\"color: #333333;\">*<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size:(idx <span style=\"color: #333333;\">+<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>) <span style=\"color: #333333;\">*<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size]\n        batch_y <span style=\"color: #333333;\">=<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>y[idx <span style=\"color: #333333;\">*<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size:(idx <span style=\"color: #333333;\">+<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>) <span style=\"color: #333333;\">*<\/span> <span style=\"color: #007020;\">self<\/span><span style=\"color: #333333;\">.<\/span>batch_size]\n                <span style=\"color: #008800; font-weight: bold;\">return<\/span> batch_x, batch_y\n\ntrain_gen <span style=\"color: #333333;\">=<\/span> DataGenerator(x, y, <span style=\"color: #0000dd; font-weight: bold;\">1000<\/span>)\n\nstart_time <span style=\"color: #333333;\">=<\/span> time<span style=\"color: #333333;\">.<\/span>time()\n<span style=\"color: #008800; font-weight: bold;\">with<\/span> tf<span style=\"color: #333333;\">.<\/span>device(<span style=\"background-color: #fff0f0;\">'\/gpu:0'<\/span>):\n    history <span style=\"color: #333333;\">=<\/span> model<span style=\"color: #333333;\">.<\/span>fit(train_gen, epochs<span style=\"color: #333333;\">=<\/span><span style=\"color: #0000dd; font-weight: bold;\">20000<\/span>)\n<span style=\"color: #008800; font-weight: bold;\">print<\/span>(<span style=\"background-color: #fff0f0;\">\"Training time: \"<\/span>, <span style=\"color: #007020;\">round<\/span>(time<span style=\"color: #333333;\">.<\/span>time() <span style=\"color: #333333;\">-<\/span> start_time), <span style=\"background-color: #fff0f0;\">\" seconds\"<\/span>)\n<\/pre><\/div><\/section><section id=\"Reference electricity consumption meter\"><h2>Reference electricity consumption meter<\/h2><p>This section describes the device used for the energy consumption measurements so that the reader can reproduce the results obtained in the following section with maximum accuracy.<\/p><div style=\"overflow-x: auto;\"><table><tbody><tr><th>Device model<\/th><td>Perel E305EM5-G<\/td><\/tr><\/tbody><\/table><\/div><\/section><section id=\"Results\"><h2>Results<\/h2><p>The last step is to run the benchmark application on the selected machine with TensorFlow and Neural Designer and compare the energy consumed by those platforms during training.<\/p><p>The following figure shows the training time with TensorFlow.<\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-15484\" src=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/capturafinalrecortadarosenbrockgputensorflow-1.webp\" alt=\"\" width=\"820\" height=\"423\" srcset=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/capturafinalrecortadarosenbrockgputensorflow-1.webp 1914w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/capturafinalrecortadarosenbrockgputensorflow-1-300x155.webp 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/p><p>As we can see, TensorFlow takes 30:14:30 to train the neural network for 20000 epochs (5.44 seconds\/epoch).<br \/>The final mean squared error is 0.0003. The overall energy consumption of the training process is 4.5 kWh, as shown below.<\/p><p><img decoding=\"async\" class=\"aligncenter size-large wp-image-15486\" src=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-1024x680.webp\" alt=\"\" width=\"800\" height=\"531\" srcset=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-1024x680.webp 1024w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-300x199.webp 300w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-768x510.webp 768w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-1536x1021.webp 1536w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-2048x1361.webp 2048w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrocktensorflow-2-600x399.webp 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p><p>Finally, the following figure shows the training time with Neural Designer.<\/p><p><img decoding=\"async\" class=\"aligncenter wp-image-15487\" src=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/Captura-de-pantalla-rosenbrock-Neural-Designer-recortada-3-653x1024.webp\" alt=\"\" width=\"397\" height=\"623\" srcset=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/Captura-de-pantalla-rosenbrock-Neural-Designer-recortada-3-653x1024.webp 653w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/Captura-de-pantalla-rosenbrock-Neural-Designer-recortada-3-191x300.webp 191w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/Captura-de-pantalla-rosenbrock-Neural-Designer-recortada-3-600x940.webp 600w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/Captura-de-pantalla-rosenbrock-Neural-Designer-recortada-3.webp 656w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/p><p>Neural Designer takes 21:03:43 to train the neural network for 20000 epochs (3.79 seconds\/epoch). During that time, it reaches a mean squared error of 0.023. The overall energy consumption of the training process is 2.6 kWh, as shown below.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15488\" src=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-1024x859.webp\" alt=\"\" width=\"425\" height=\"356\" srcset=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-1024x859.webp 1024w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-300x252.webp 300w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-768x644.webp 768w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-1536x1288.webp 1536w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-2048x1718.webp 2048w, https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2025\/07\/fotoconsumidoresgpurosenbrockneuraldesigner-4-600x503.webp 600w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/p><p>The following table summarizes the the most important metrics the two machine learning platforms yielded.<\/p><div style=\"overflow-x: auto;\"><table><thead><tr><th>\u00a0<\/th><th>TensorFlow<\/th><th>Neural Designer<\/th><\/tr><\/thead><tbody><tr><th>Training time<\/th><td style=\"text-align: right;\">30:14:30<\/td><td style=\"text-align: right;\">21:03:43<\/td><\/tr><tr><th>Epoch time<\/th><td style=\"text-align: right;\">5.44 seconds\/epoch<\/td><td style=\"text-align: right;\">3.79 seconds\/epoch<\/td><\/tr><tr><th>Training speed<\/th><td style=\"text-align: right;\">183,824 samples\/second<\/td><td style=\"text-align: right;\">263.852 samples\/second<\/td><\/tr><tr><th>Total energy consumed<\/th><td style=\"text-align: right;\">4.5kWh<\/td><td style=\"text-align: right;\">2.6 kWh<\/td><\/tr><\/tbody><\/table><\/div><p>The following chart depicts the energy consumed using TensorFlow and Neural Designer graphically in this case.<\/p><p><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-size: var( --e-global-typography-text-font-size );\"><b>Electric energy consumption<\/b><\/span><\/p><div class=\"flex-container\"><div><div class=\"TensorFlow2\">TensorFlow<\/div><div id=\"line-container3\" style=\"position: relative;\">\u00a0<\/div><div class=\"Neural2\"><p>Neural Designer<\/p><\/div><div id=\"line-container4\" style=\"position: relative;\">\u00a0<\/div><\/div><\/div><p><script src=\"https:\/\/cdn.rawgit.com\/kimmobrunfeldt\/progressbar.js\/1.0.0\/dist\/progressbar.js\"><\/script><br \/><script>\n    var lineBar1 = new ProgressBar.Line(\"#line-container3\", {\n        strokeWidth: 4,\n        trailWidth: 0.5,\n        color: '#a3be27',\n        text: {\n            value: '34',\n            className: 'progress-text2',\n            style: {\n                color: 'green',\n                position: 'absolute',\n                right: '0',\n                top: '-30px', \/\/ Fix the typo here\n                padding: 0,\n                margin: 0,\n                transform: null\n            }\n        },\n        step: (state, shape) => {\n            shape.setText((shape.value() * 4.5).toFixed(2) + ' kWh');\n        },\n    });\n\n    lineBar1.animate(1, {\n        duration: 7000\n    });\n\n    var lineBar2 = new ProgressBar.Line(\"#line-container4\", {\n        strokeWidth: 4,\n        trailWidth: 0.5,\n        color: '#55a1c8',\n        text: {\n            value: '34',\n            className: 'progress-text2',\n            style: {\n                color: 'black',\n                position: 'absolute',\n                right: '0',\n                top: '-30px', \/\/ Fix the typo here\n                padding: 10,\n                margin: 0,\n                transform: null\n            }\n        },\n        step: (state, shape) => {\n            shape.setText((shape.value() * 4.5).toFixed(2) + ' kWh');\n        },\n    });\n\n    lineBar2.animate(0.5777, {\n        duration: 7000\n    });\n<\/script><\/p><p>As we can see, the energy consumption of Neural Designer for this application is <b>42<\/b> % lower than that of TensorFlow.<\/p><\/section><section id=\"Conclusions\"><h2>Conclusions<\/h2><p>Neural Designer is entirely written in C ++, uses analytical differentiation, and has been optimized to minimize the number of operations during training.<\/p><p>As a result, its energy consumption during the training process using Neural Designer is <b>42<\/b> % lower than that using TensorFlow.<\/p><p>To reproduce these results, <a href=\"https:\/\/www.neuraldesigner.com\/downloads\/\">download\u00a0<\/a>Neural Designer and follow the steps described in this article.<\/p><h2 style=\"font-family: Outfit, sans-serif; color: #242424;\">Related posts<\/h2><\/section><p><style>\n        .flex-container {<br \/>            display: flex;<br \/>            justify-content: center;<br \/>        }<\/p>\n<p>        .Titulo {<br \/>            font-size: 1.30em;<br \/>            font-family: 'Roboto', sans-serif;<br \/>            color: green;<br \/>            margin-bottom: 1em;<br \/>            font-weight: 900;<br \/>            flex-wrap: wrap;<br \/>            align-content: stretch;<br \/>            text-align: center;<br \/>        }<\/p>\n<p>        #line-container3 {<br \/>            width: 400px;<br \/>            height: 40px;<br \/>            margin: 50px auto;<br \/>        }<\/p>\n<p>        #line-container4 {<br \/>            width: 400px;<br \/>            height: 40px;<br \/>            margin: 50px auto;<br \/>        }<\/p>\n<p>        .progress-text2 {<br \/>            font-size: 1.25em;<br \/>            font-family: 'Roboto', sans-serif;<br \/>            color: green;<br \/>            margin-bottom: 1em;<br \/>            font-weight: 500;<br \/>        }<\/p>\n<p>        .TensorFlow2 {<br \/>            font-size: 1.25em;<br \/>            font-family: 'Roboto', sans-serif;<br \/>            color: black;<br \/>            margin-bottom: 1em;<br \/>            font-weight: 500;<br \/>            text-align: left;<br \/>        }<\/p>\n<p>        .Neural2 {<br \/>            font-size: 1.25em;<br \/>            font-family: 'Roboto', sans-serif;<br \/>            color: black;<br \/>            margin-bottom: 1em;<br \/>            font-weight: 500;<br \/>            text-align: left;<br \/>        }<br \/>    <\/style><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"author":16,"featured_media":2233,"template":"","categories":[],"tags":[37],"class_list":["post-3384","blog","type-blog","status-publish","has-post-thumbnail","hentry","tag-platforms"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Energy consumption of TensorFlow and Neural Designer<\/title>\n<meta name=\"description\" content=\"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Energy consumption of TensorFlow and Neural Designer\" \/>\n<meta property=\"og:description\" content=\"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/\" \/>\n<meta property=\"og:site_name\" content=\"Neural Designer\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-28T09:57:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"669\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@NeuralDesigner\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/\",\"name\":\"Energy consumption of TensorFlow and Neural Designer\",\"isPartOf\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp\",\"datePublished\":\"2023-08-31T10:59:22+00:00\",\"dateModified\":\"2025-11-28T09:57:39+00:00\",\"description\":\"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp\",\"width\":1280,\"height\":669},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.neuraldesigner.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blog\",\"item\":\"https:\/\/www.neuraldesigner.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Energy consumption of TensorFlow and Neural Designer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"name\":\"Neural Designer\",\"description\":\"Explanable AI Platform\",\"publisher\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.neuraldesigner.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\",\"name\":\"Neural Designer\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"width\":1024,\"height\":223,\"caption\":\"Neural Designer\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/NeuralDesigner\",\"https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Energy consumption of TensorFlow and Neural Designer","description":"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.","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:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/","og_locale":"en_US","og_type":"article","og_title":"Energy consumption of TensorFlow and Neural Designer","og_description":"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.","og_url":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/","og_site_name":"Neural Designer","article_modified_time":"2025-11-28T09:57:39+00:00","og_image":[{"width":1280,"height":669,"url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_site":"@NeuralDesigner","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/","url":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/","name":"Energy consumption of TensorFlow and Neural Designer","isPartOf":{"@id":"https:\/\/www.neuraldesigner.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage"},"thumbnailUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp","datePublished":"2023-08-31T10:59:22+00:00","dateModified":"2025-11-28T09:57:39+00:00","description":"Compare the energy consumption of TensorFlow and Neural Designer using the GPU for an approximation benchmark.","breadcrumb":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#primaryimage","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/energy_consumption-test_gpu.webp","width":1280,"height":669},{"@type":"BreadcrumbList","@id":"https:\/\/www.neuraldesigner.com\/blog\/energy-consumption-comparison\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.neuraldesigner.com\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/www.neuraldesigner.com\/blog\/"},{"@type":"ListItem","position":3,"name":"Energy consumption of TensorFlow and Neural Designer"}]},{"@type":"WebSite","@id":"https:\/\/www.neuraldesigner.com\/#website","url":"https:\/\/www.neuraldesigner.com\/","name":"Neural Designer","description":"Explanable AI Platform","publisher":{"@id":"https:\/\/www.neuraldesigner.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.neuraldesigner.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.neuraldesigner.com\/#organization","name":"Neural Designer","url":"https:\/\/www.neuraldesigner.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","width":1024,"height":223,"caption":"Neural Designer"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/NeuralDesigner","https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog\/3384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/users\/16"}],"version-history":[{"count":3,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog\/3384\/revisions"}],"predecessor-version":[{"id":21445,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog\/3384\/revisions\/21445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media\/2233"}],"wp:attachment":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media?parent=3384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/categories?post=3384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/tags?post=3384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}