tf.data.experimental.Counter
Stay organized with collections
Save and categorize content based on your preferences.
Creates a Dataset
that counts from start
in steps of size step
.
tf.data.experimental.Counter(
start=0, step=1, dtype=tf.dtypes.int64
)
For example:
Dataset.count() == [0, 1, 2, ...)
Dataset.count(2) == [2, 3, ...)
Dataset.count(2, 5) == [2, 7, 12, ...)
Dataset.count(0, -1) == [0, -1, -2, ...)
Dataset.count(10, -1) == [10, 9, ...)
Args |
start
|
(Optional.) The starting value for the counter. Defaults to 0.
|
step
|
(Optional.) The step size for the counter. Defaults to 1.
|
dtype
|
(Optional.) The data type for counter elements. Defaults to
tf.int64 .
|
Returns |
A Dataset of scalar dtype elements.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]