首页 > 解决方案 > 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。但是模型不应该考虑给定的形状进行回归吗?

标签: pythonauto-keras

解决方案


推荐阅读