MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / val_fun

Function val_fun

imperative/python/test/integration/test_trace_dump.py:78–82  ·  view source on GitHub ↗
(data, label)

Source from the content-addressed store, hash-verified

76
77 @trace
78 def val_fun(data, label):
79 net.eval()
80 pred = net(data)
81 loss = F.nn.cross_entropy(pred, label)
82 return pred, loss
83
84 @trace(symbolic=True, capture_as_const=True)
85 def pred_fun(data):

Callers 1

test_xornet_trace_dumpFunction · 0.70

Calls 1

evalMethod · 0.45

Tested by

no test coverage detected