Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Fran0727 opened this issue Aug 20, 2024 · 1 comment
Open

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

Fran0727 opened this issue Aug 20, 2024 · 1 comment

Comments

@Fran0727
Copy link

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'

@Fran0727
Copy link
Author

I already run prepro.py, it seems ok. And this issue comes up when I try to run train.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant