View source: R/dataset_methods.R
length.tf_dataset | R Documentation |
Returns the length of the dataset.
## S3 method for class 'tf_dataset'
length(x)
## S3 method for class 'tensorflow.python.data.ops.dataset_ops.DatasetV2'
length(x)
x |
a |
Either Inf
if the dataset is infinite, NA
if the dataset length
is unknown, or an R numeric if it is known.
## Not run:
range_dataset(0, 42) %>% length()
# 42
range_dataset(0, 42) %>% dataset_repeat() %>% length()
# Inf
range_dataset(0, 42) %>% dataset_repeat() %>%
dataset_filter(function(x) TRUE) %>% length()
# NA
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.