MCPcopy
hub / github.com/tensorflow/tfjs / calcLog

Function calcLog

tfjs-layers/src/losses_test.ts:79–79  ·  view source on GitHub ↗
(val: number)

Source from the content-addressed store, hash-verified

77describeMathCPUAndGPU('meanSquaredLogarithmicError', () => {
78 function meanSquaredLogErrorFor1DArray(x: number[], y: number[]): number {
79 const calcLog = (val: number) => Math.log(Math.max(val, epsilon()) + 1);
80 const logX = x.map(calcLog);
81 const logY = y.map(calcLog);
82 let acc = 0.0;

Callers

nothing calls this directly

Calls 3

epsilonFunction · 0.90
maxMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…