MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / test

Method test

models/base_model.py:97–105  ·  view source on GitHub ↗

Forward function used in test time. This function wraps function in no_grad() so we don't save intermediate steps for backprop It also calls to produce additional visualization results

(self)

Source from the content-addressed store, hash-verified

95 net.eval()
96
97 def test(self):
98 """Forward function used in test time.
99
100 This function wraps <forward> function in no_grad() so we don&#x27;t save intermediate steps for backprop
101 It also calls <compute_visuals> to produce additional visualization results
102 """
103 with torch.no_grad():
104 self.forward()
105 self.compute_visuals()
106
107 def compute_visuals(self):
108 """Calculate additional output images for visdom and HTML visualization"""

Callers 1

evaluateModelFunction · 0.80

Calls 2

forwardMethod · 0.95
compute_visualsMethod · 0.95

Tested by

no test coverage detected