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

Method put_scalar

tensorpack/callbacks/monitor.py:163–173  ·  view source on GitHub ↗

Put a scalar.

(self, name, val)

Source from the content-addressed store, hash-verified

161 self._dispatch(lambda m: m.process_summary(summary))
162
163 def put_scalar(self, name, val):
164 """
165 Put a scalar.
166 """
167 if isinstance(val, np.floating):
168 val = float(val)
169 if isinstance(val, np.integer):
170 val = int(val)
171 self._dispatch(lambda m: m.process_scalar(name, val))
172 s = create_scalar_summary(name, val)
173 self._dispatch(lambda m: m.process_summary(s))
174
175 def put_image(self, name, val):
176 """

Callers 11

_trigger_stepMethod · 0.80
_trigger_epochMethod · 0.80
_after_runMethod · 0.80
_triggerMethod · 0.80
_triggerMethod · 0.80
_trigger_epochMethod · 0.80
_triggerMethod · 0.80
get_configFunction · 0.80
_triggerMethod · 0.80
_triggerMethod · 0.80
_evalMethod · 0.80

Calls 4

_dispatchMethod · 0.95
create_scalar_summaryFunction · 0.85
process_scalarMethod · 0.45
process_summaryMethod · 0.45

Tested by

no test coverage detected