gpt4 book ai didi

python - Tensorflow 数据适配器错误 : ValueError: Failed to find data adapter that can handle input

转载 作者:行者123 更新时间:2023-11-28 20:12:31 25 4
gpt4 key购买 nike

在运行加密货币 RNN 的 senddex 教程脚本时,链接在这里

YouTube Tutorial: Cryptocurrency-predicting RNN Model ,

但在尝试训练模型时遇到错误。我的 tensorflow 版本是 2.0.0,我运行的是 python 3.6。尝试训练模型时,我收到以下错误:

File "C:\python36-64\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 734, in fit
use_multiprocessing=use_multiprocessing)

File "C:\python36-64\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 224, in fit
distribution_strategy=strategy)

File "C:\python36-64\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 497, in _process_training_inputs
adapter_cls = data_adapter.select_data_adapter(x, y)

File "C:\python36-64\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py", line 628, in select_data_adapter
_type_name(x), _type_name(y)))

ValueError: Failed to find data adapter that can handle input: <class 'numpy.ndarray'>, (<class 'list'> containing values of types {"<class 'numpy.float64'>"})

如有任何建议,我们将不胜感激!

最佳答案

你检查过你的训练/测试数据和训练/测试标签是不是都是numpy数组?可能是您将 numpy 数组与列表混合在一起。

关于python - Tensorflow 数据适配器错误 : ValueError: Failed to find data adapter that can handle input,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57874436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com