Skip to content

type object 'IteratorBase' has no attribute 'from_structure' #189

Description

@Fran0727

Is from_structure is not usable in TF2.X ? How can I solve it? I can't degrade TF2.X to 1.X

2024-08-20 16:10:54.724103: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "E:\transformer-master-GE\transformer-master\train.py", line 39, in
iter = tf.data.Iterator.from_structure(train_batches.output_types, train_batches.output_shapes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'IteratorBase' has no attribute 'from_structure'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions