kerasによるcnnの実装でエラーが出ました
python
1from tensorflow.python.keras.datasets import cifar10 2(x_train,y_train),(x_test,y_test) = cifar10.load_data() 3 4#data大きさ確認 5print('x_train.shape :',x_train.shape) 6print('x_test.shape :',x_test.shape) 7print('y_train.shape :',y_train.shape) 8print('y_test.shape :',y_test.shape) 9 10from tensorflow.python.keras.utils import to_categorical 11 12#特徴量の正規化 13x_train = x_train/255. 14x_test = x_test/255. 15 16#クラスラベルの1-hotベクトル化 17y_train = to_categorical(y_train, 10) 18y_test = to_categorical(y_test,10) 19 20from tensorflow.python.keras.models import Sequential 21 22model = Sequential() 23 24from tensorflow.python.keras.layers import Conv2D 25 26model.add( 27 Conv2D( 28 filters=32, 29 input_shape=(32, 32, 3), 30 kernel_size=(3, 3), 31 strides=(1, 1), 32 padding='same', 33 activation='relu' 34 ) 35 ) 36model.add( 37 Conv2D( 38 filters=32, 39 kernel_size=(3, 3), 40 strides=(1, 1), 41 padding='same', 42 activation='relu', 43 ) 44 ) 45from tensorflow.python.keras.layers import MaxPooling2D 46 47model.add(MaxPooling2D(pool_size=(2, 2))) 48 49from tensorflow.python.keras.layers import Dropout 50 51model.add(Dropout(0.25)) 52model.add( 53 Conv2D( 54 filers=64, 55 kernel_size=(3, 3), 56 strides=(1, 1), 57 padding='same', 58 activation='relu', 59 ) 60 ) 61model.add( 62 Conv2D( 63 filers=64, 64 kernel_size=(3, 3), 65 strides=(1, 1), 66 padding='same', 67 activation='relu', 68 ) 69 ) 70model.add(MaxPooling2D(pool_size=(2, 2))) 71model.add(Dropout(0.25)) 72 73from tensorflow.python.keras.layers import Flatten 74 75model.add(Flatten()) 76model.output_shape 77 78from tensorflow.python.keeras.callbacks import TensorBord 79 80model.compile( 81 optimizer='adam', 82 loss='categorical_crossentropy', 83 metrics=['accuracy'] 84 ) 85tsb = TensorBord(log_dir='logs') 86histry_model1 = model.fit( 87 x_train, 88 y_train, 89 batch_size=32, 90 epochs=20, 91 validation_split=0.2, 92 callbacks=[tsb] 93 )
エラー
python
1 2TypeError: __init__() missing 1 required positional argument: 'filters' 3