Tensorflow数据适配器错误:ValueError:未能找到可以处理输入的数据适配器 [英] Tensorflow Data Adapter Error: ValueError: Failed to find data adapter that can handle input

查看:250
本文介绍了Tensorflow数据适配器错误:ValueError:未能找到可以处理输入的数据适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行加密货币RNN的senddex教程脚本时,请在此处链接

While running a sentdex tutorial script of a cryptocurrency RNN, link here

YouTube教程:加密货币预测RNN模型

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

but have encountered an error when attempting to train the model. My tensorflow version is 2.0.0 and I'm running python 3.6. When attempting to train the model I receive the following error:

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数组与列表混合在一起.

Have you checked whether your training/testing data and training/testing labels are all numpy arrays? It might be that you're mixing numpy arrays with lists.

这篇关于Tensorflow数据适配器错误:ValueError:未能找到可以处理输入的数据适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆