I'm currently trying to embed this tutorial code in my own convnet.py file, but am getting an error. Textbook
This is a complete error:
Traceback (most recent call last):
File "convnet.py", line 6, in <module>
model.add(Conv2D(32, (3, 3), input_shape=(3, 150, 150)))
TypeError: __init__() missing 1 required positional argument: 'nb_col'
Here are the first 10 lines where the program goes wrong:
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
model = Sequential()
model.add(Conv2D(32, (3, 3), input_shape=(3, 150, 150)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
The code is in the convnet.py file, and I run the file as follows: python convnet.py
source
share