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

Method count_up_to

tensorflow/python/ops/variables.py:1172–1192  ·  view source on GitHub ↗

Increments this variable until it reaches `limit`. When that Op is run it tries to increment the variable by `1`. If incrementing the variable would bring it above `limit` then the Op raises the exception `OutOfRangeError`. If no error is raised, the Op outputs the value of the var

(self, limit)

Source from the content-addressed store, hash-verified

1170
1171 @deprecated(None, "Prefer Dataset.range instead.")
1172 def count_up_to(self, limit):
1173 """Increments this variable until it reaches `limit`.
1174
1175 When that Op is run it tries to increment the variable by `1`. If
1176 incrementing the variable would bring it above `limit` then the Op raises
1177 the exception `OutOfRangeError`.
1178
1179 If no error is raised, the Op outputs the value of the variable before
1180 the increment.
1181
1182 This is essentially a shortcut for `count_up_to(self, limit)`.
1183
1184 Args:
1185 limit: value at which incrementing the variable raises an error.
1186
1187 Returns:
1188 A `Tensor` that will hold the variable value before the increment. If no
1189 other Op modifies this variable, the values produced will all be
1190 distinct.
1191 """
1192 raise NotImplementedError
1193
1194 @deprecated(None,
1195 "Prefer Variable.assign which has equivalent behavior in 2.X.")

Callers 15

testOneThreadMethod · 0.95
testMultiThreadMethod · 0.95
testMultipleDequeueMethod · 0.95
testDynamicPadMethod · 0.95
_countUpToTestMethod · 0.95
_testOneThreadHelperMethod · 0.95
testManyThreadsMethod · 0.95
testSharedNameMethod · 0.95

Calls

no outgoing calls

Tested by 15

testOneThreadMethod · 0.76
testMultiThreadMethod · 0.76
testMultipleDequeueMethod · 0.76
testDynamicPadMethod · 0.76
_countUpToTestMethod · 0.76
_testOneThreadHelperMethod · 0.76
testManyThreadsMethod · 0.76
testSharedNameMethod · 0.76