MCPcopy
hub / github.com/ddbourgin/numpy-ml / err_fmt

Function err_fmt

numpy_ml/tests/test_nn.py:64–76  ·  view source on GitHub ↗
(params, golds, ix, warn_str="")

Source from the content-addressed store, hash-verified

62
63
64def err_fmt(params, golds, ix, warn_str=""):
65 mine, label = params[ix]
66 err_msg = "-" * 25 + " DEBUG " + "-" * 25 + "\n"
67 prev_mine, prev_label = params[max(ix - 1, 0)]
68 err_msg += "Mine (prev) [{}]:\n{}\n\nTheirs (prev) [{}]:\n{}".format(
69 prev_label, prev_mine, prev_label, golds[prev_label]
70 )
71 err_msg += "\n\nMine [{}]:\n{}\n\nTheirs [{}]:\n{}".format(
72 label, mine, label, golds[label]
73 )
74 err_msg += warn_str
75 err_msg += "\n" + "-" * 23 + " END DEBUG " + "-" * 23
76 return err_msg
77
78
79#######################################################################

Callers 15

test_VAE_lossFunction · 0.70
test_WGAN_GP_lossFunction · 0.70
test_FullyConnectedFunction · 0.70
test_EmbeddingFunction · 0.70
test_BatchNorm1DFunction · 0.70
test_LayerNorm1DFunction · 0.70
test_LayerNorm2DFunction · 0.70
test_MultiplyLayerFunction · 0.70
test_AddLayerFunction · 0.70
test_BatchNorm2DFunction · 0.70
test_RNNCellFunction · 0.70
test_Conv2DFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected