2017-03-20 9 views
1

次のモデルを実行すると:とValueError: "フラット化" への入力の形状が完全に定義されていません(GOT(0、3、16)

l0 = Input(shape=(1, height, width), name='l0') 

l1 = Convolution2D(9, 5, 5, border_mode='same', activation='relu', name='l1')(l0) 
l1_mp = MaxPooling2D(pool_size=(2, 2), name='l1_mp')(l1) 

l2 = Convolution2D(9, 5, 5, border_mode='same', activation='relu', name='l2')(l1_mp) 
l2_mp = MaxPooling2D(pool_size=(2, 2), name='l2_mp')(l2) 

l3 = Convolution2D(16, 3, 3, border_mode='same', activation='relu', name='l3')(l2_mp) 
l3_mp = MaxPooling2D(pool_size=(2, 2), name='l3_mp')(l3) 

flat = Flatten(name='flat')(l3_mp) 

l4 = Dense(25, activation='relu', name='l4')(flat) 

l5 = Dense(n_classes, activation='softmax', name='l5')(l4) 

model = Model(input=l0, output=l5) 
model.summary() 

を私は次のエラーを取得する:

/home/imad/anaconda2/lib/python2.7/site-packages/keras/legacy/interfaces.py:86: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(9, (5, 5), padding="same", activation="relu", name="l1") '` call to the Keras 2 API: ' + signature)

助けてください。Keras 2.0で

答えて

関連する問題