MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _after_inference

Method _after_inference

tensorpack/callbacks/inference.py:122–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120 self.stats.append(output)
121
122 def _after_inference(self):
123 if len(self.stats):
124 self.stats = np.mean(self.stats, axis=0)
125 assert len(self.stats) == len(self.names)
126
127 ret = {}
128 for stat, name in zip(self.stats, self.names):
129 opname, _ = get_op_tensor_name(name)
130 name = '{}_{}'.format(self.prefix, opname) if self.prefix else opname
131 ret[name] = stat
132 return ret
133
134
135class ClassificationError(Inferencer):

Callers

nothing calls this directly

Calls 3

get_op_tensor_nameFunction · 0.85
meanMethod · 0.80
formatMethod · 0.80

Tested by

no test coverage detected