用法
@abc.abstractmethod
get_next()
返回下一個元素。
dataset = tf.data.Dataset.from_tensors(42)
iterator = iter(dataset)
print(iterator.get_next())
tf.Tensor(42, shape=(), dtype=int32)
相關用法
- Python tf.data.Iterator.get_next_as_optional用法及代碼示例
- Python tf.data.IteratorSpec用法及代碼示例
- Python tf.data.Dataset.take_while用法及代碼示例
- Python tf.data.experimental.RandomDataset.group_by_window用法及代碼示例
- Python tf.data.TFRecordDataset.filter用法及代碼示例
- Python tf.data.TextLineDataset.reduce用法及代碼示例
- Python tf.data.TextLineDataset.with_options用法及代碼示例
- Python tf.data.experimental.SqlDataset.enumerate用法及代碼示例
- Python tf.data.TextLineDataset.as_numpy_iterator用法及代碼示例
- Python tf.data.experimental.make_saveable_from_iterator用法及代碼示例
- Python tf.data.TextLineDataset.random用法及代碼示例
- Python tf.data.FixedLengthRecordDataset.repeat用法及代碼示例
- Python tf.data.TFRecordDataset.random用法及代碼示例
- Python tf.data.Dataset.cardinality用法及代碼示例
- Python tf.data.FixedLengthRecordDataset.cardinality用法及代碼示例
- Python tf.data.TextLineDataset.take_while用法及代碼示例
- Python tf.data.experimental.SqlDataset.zip用法及代碼示例
- Python tf.data.experimental.Counter用法及代碼示例
- Python tf.data.experimental.SqlDataset.shard用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.data.Iterator.get_next。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。