Skip to content

Cardinality return wrong number for dataset.map #695

@Esther2013

Description

@Esther2013
var dataset = tf.data.Dataset.range(10);
dataset = dataset.map(x => x + 1);
var cardinality = dataset.dataset_cardinality();

Output:

tf.Tensor: shape=(), dtype=int64, numpy=-2

Should be 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions