nnlib
GPU-accelerated, C/C++ neural network library.
Functions
binary_cross_entropy.cpp File Reference

Source file defining the methods of the BinaryCrossEntropy class. More...

#include <exceptions/unsupported_operation_exception.h>
#include <loss.h>

Functions

void checkValidShape (const Tensor &targets, const Tensor &predictions)
 Check if the shape is valid for Binary Cross Entropy. More...
 

Detailed Description

Source file defining the methods of the BinaryCrossEntropy class.

Author
Jan Warchocki
Date
24 December 2022

Function Documentation

◆ checkValidShape()

void checkValidShape ( const Tensor targets,
const Tensor predictions 
)

Check if the shape is valid for Binary Cross Entropy.

The shape should be (n, 1) for both targets and predictions.

Parameters
targetsThe expected outputs of the network.
predictionsThe actual outputs of the network.