MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/kernels/loss_test.cc:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52TEST(LogisticLoss, ComputePrimalLoss) {
53 LogisticLossUpdater loss_updater;
54 EXPECT_NEAR(0.693147,
55 loss_updater.ComputePrimalLoss(0 /* wx */, 1 /* label */,
56 1 /* example weight */),
57 1e-3);
58 EXPECT_NEAR(0.0,
59 loss_updater.ComputePrimalLoss(70 /* wx */, 1 /* label */,
60 1 /* example weight */),
61 1e-3);
62 EXPECT_NEAR(0.0,
63 loss_updater.ComputePrimalLoss(-70 /* wx */, -1 /* label */,
64 1 /* example weight */),
65 1e-3);
66}
67
68TEST(LogisticLoss, ComputeDualLoss) {
69 LogisticLossUpdater loss_updater;

Callers

nothing calls this directly

Calls 7

TestComputeUpdatedDualFunction · 0.85
maxFunction · 0.50
ComputePrimalLossMethod · 0.45
ComputeDualLossMethod · 0.45
ConvertLabelMethod · 0.45
okMethod · 0.45
ComputeUpdatedDualMethod · 0.45

Tested by

no test coverage detected