python - Autokeras ValueError:期望 StructuredDataInput 的数据具有形状
问题描述
我有两个具有以下形状的数据框:
x_train:
(223307, 60, 10)
y_train:
(223307,)
我想使用以下几行创建一个模型:
reg = ak.StructuredDataRegressor(max_trials=500, overwrite=False)
reg.fit(x_train, y_train,epochs=100)
但我收到以下错误:
ValueError: Expect the data to StructuredDataInput to have shape (batch_size, num_features), but got input shape [32, 60, 10].
我知道这是因为批量大小是 32。但是模型不应该考虑给定的形状进行回归吗?
解决方案
推荐阅读
- python - 使用open cv python在flutter中进行人脸识别
- ios - 如何获取集合视图动态行数?
- c# - 忽略 Designer 文件的自动嵌套
- css - 在添加的图标上修改按钮填充以实现下拉
- python - 使用 Python 代码在 redshift 中运行并发过程时已经存在“准备好的语句”错误
- angular - Angular 9 反应形式;带有嵌套 FormArray 的 FormGroup 的 PatchValue
- google-cloud-platform - 对于在 Cloud SQL 中创建的实例,如何将 SQL Server 日志与堆栈驱动程序控制台集成?
- c++ - 我在以下代码(指针)上收到 SIGSEGV 错误并且不知道我哪里出错了
- javascript - JavaScript:当函数传入参数时,它返回 ```NaN```
- node.js - 使用 Node.js 从 Google Drive 下载或读取上传的 Excel 文件