【发布时间】:2021-02-14 07:01:23
【问题描述】:
我正在尝试将输入分类。
形状是:
df_train.shape: (17980, 380)
df_validation.shape: (17980, 380)
但是,当我运行我的代码时,我收到以下错误
ValueError: Input 0 of layer conv1d is incompatible with the layer: : expected min_ndim=3, found ndim=2. Full shape received: [32, 380]
我们如何解决这个错误?
【问题讨论】:
-
另一个帐户也提出了相同的问题,例如stackoverflow.com/questions/64612084/… 是你吗,如果是,你为什么要创建新帐户?
-
好的,您仍然应该考虑为什么您的朋友问题已关闭。你有完全相同的问题,你使用了错误的模型。您当前的模型旨在处理一维向量的序列,而您似乎有图像(不是序列)。您应该重新考虑模型,例如不需要 TimeDistributed。
标签: python python-3.x tensorflow machine-learning keras