MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CounterCell

Class CounterCell

tensorflow/python/eager/monitoring.py:142–163  ·  view source on GitHub ↗

CounterCell stores each value of a Counter.

Source from the content-addressed store, hash-verified

140
141
142class CounterCell(object):
143 """CounterCell stores each value of a Counter."""
144
145 def __init__(self, cell):
146 """Creates a new CounterCell.
147
148 Args:
149 cell: A c pointer of TFE_MonitoringCounterCell.
150 """
151 self._cell = cell
152
153 def increase_by(self, value):
154 """Atomically increments the value.
155
156 Args:
157 value: non-negative value.
158 """
159 pywrap_tensorflow.TFE_MonitoringCounterCellIncrementBy(self._cell, value)
160
161 def value(self):
162 """Retrieves the current value."""
163 return pywrap_tensorflow.TFE_MonitoringCounterCellValue(self._cell)
164
165
166class Counter(Metric):

Callers 1

get_cellMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected