wepe/MachineLearning

The first layer in a Sequential model must get an `input_shape` or `batch_input_shape` argument.

Opened this issue · 2 comments

Traceback (most recent call last):
File "D:/cliff/Programmer-related/GPU_related/kerasѧϰ/dive_into_keras/cnn.py", line 62, in
model = create_model()
File "D:/cliff/Programmer-related/GPU_related/kerasѧϰ/dive_into_keras/cnn.py", line 38, in create_model
model.add(Convolution2D(4, 1, 5, 5, border_mode='valid')) # cliff, add "input_shape"
File "C:\Anaconda2\lib\site-packages\keras\models.py", line 106, in add
raise Exception('The first layer in a Sequential model must '
Exception: The first layer in a Sequential model must get an input_shape or batch_input_shape argument.

wepe commented

最新版本keras的函数接口有一些变化,已更新

then what should to fix the code !