ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::train::losses_functions::MSE Struct Reference

#include <MSE.h>

Static Public Member Functions

static void calculateErrorBackpropagation (const uint32_t flat_size, const float *calculated_data, const float *target_data, float *output_grad)
 

Detailed Description

Definition at line 32 of file MSE.h.

Member Function Documentation

◆ calculateErrorBackpropagation()

void MSE::calculateErrorBackpropagation ( const uint32_t  flat_size,
const float *  calculated_data,
const float *  target_data,
float *  output_grad 
)
static

Definition at line 29 of file MSE.cpp.

31{
32 for (uint32_t i = 0; i < flat_size; ++i)
33 {
34 output_grad[i] = (2 * (calculated_data[i] - target_data[i])) / static_cast<float>(flat_size);
35 }
36}

Referenced by onert_micro::core::train::OMTrainingHandler::handleError().


The documentation for this struct was generated from the following files: