我曾尝试构建CNN 1D,但口译员说:
AttributeError:“ ProgbarLogger”对象没有属性“ log_values”
这是代码片段:
model = Sequential()
model.add(Conv1D(200, 20, activation='relu', padding='same',input_shape=(1154,1024))
print(model.summary())
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
history=model.fit(X, y,batch_size=10, epochs=25,validation_split=0.7)
Run Code Online (Sandbox Code Playgroud)
这是错误:
Layer (type) Output Shape Param #
=================================================================
conv1d_1 (Conv1D) (None, 1154, 200) 4096200
=================================================================
Total params: 4,096,200
Trainable params: 4,096,200
Non-trainable params: 0
_________________________________________________________________
None
Train on 0 samples, validate on 1 samples
Epoch 1/25
Traceback (most recent call last):
File "binary_classification.py", line 59, in <module>
history=model.fit(X, y,batch_size=10, epochs=25,validation_split=0.7)
File "/home/isabella/.local/lib/python3.6/site-packages/keras/engine/training.py",
line 1039, in fit
validation_steps=validation_steps)
File "/home/isabella/.local/lib/python3.6/site-packages/keras/engine/training_arrays.py",
line …Run Code Online (Sandbox Code Playgroud) python machine-learning progress-bar conv-neural-network keras