我像这样使用 Conv1D
X_train_t = X_train.reshape(X_train.shape[0], 1,12)
X_test_t = X_test.reshape(X_test.shape[0], 1,12)
print(X_train_t.shape)
print(X_train_t)
K.clear_session()
model = Sequential()
model.add(Conv1D(12,1, activation='relu', input_shape=(1,12)))
#model.add(MaxPooling1D(pool_size = (6)))
model.add(LSTM(3))
model.add(Dense(1))
我在 model.add(Conv1D..
model.add(MaxPooling1D(pool_size = (6)))
但它显示这样的错误
ValueError: Negative dimension size caused by subtracting 6 from 1 for 'max_pooling1d_1/MaxPool' (op: 'MaxPool') with input shapes: [?,1,1,12].
如果我设置 pool_size = (1) ,它会起作用,但它会增加更多的损失值。如果我想将 pool_size 更改为另一个值而不是 1. 如何编辑模型?
墨色风雨
噜噜哒
相关分类