Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace functional

Index

Functions

Functions

bce

  • Calculates the binary cross entropy loss, given probabilities x and ground truth y. Returns a tensor of the same shape as x. To use for a loss, you have to sum over the result:

    const loss = bce(x,y).sum();
    

    Type parameters

    Parameters

    • x: Tensor<DTpe>

      Probabilities in [0,1]

    • y: Tensor<DTpe>

      Ground truth labels of the same shape as x.

    Returns Tensor<DTpe>

Generated using TypeDoc