我正在阅读以下教程:
https://www.tensorflow.org/tutorials/structured_data/time_series
有趣的是,当我运行代码时出现错误:
AttributeError: module 'tensorflow_core.keras.preprocessing' has no attribute 'timeseries_dataset_from_array'
我尝试显式导入方法,如:
from tensorflow.keras.preprocessing import timeseries_dataset_from_array
但是之后:
ImportError: cannot import name 'timeseries_dataset_from_array'
我使用的是 Spyder 4、Python 3.6.9、TensorFlow 2.1.0 和 Keras 2.2.4-tf。任何人都可以向我澄清这一点吗?