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

#include <CrossEntropy.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 CrossEntropy.h.

Member Function Documentation

◆ calculateErrorBackpropagation()

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

Definition at line 29 of file CrossEntropy.cpp.

32{
33 for (uint32_t i = 0; i < flat_size; ++i)
34 {
35 output_grad[i] = -1.f * target_data[i] / (calculated_data[i] + float(10.0e-32));
36 }
37}

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


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