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)
| 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.") |
no outgoing calls