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'
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'