انا احاول ان اقوم بعمل تبديل لطبقة Con2D باخري ممثالة لكن بدون bias. كذلك احاول اضافة BatchNormalization قبل اول طبقة activation.
def keras_simple_model():from keras.models importModelfrom keras.layers importInput,Dense,GlobalAveragePooling2Dfrom keras.layers importConv2D,MaxPooling2D,Activation
inputs1 =Input((28,28,1))
x =Conv2D(4,(3,3), activation=None, padding='same', name='conv1')(inputs1)
x =Activation('relu')(x)
x =Conv2D(4,(3,3), activation=None, padding='same', name='conv2')(x)
x =Activation('relu')(x)
x =MaxPooling2D((2,2), strides=(2,2), name='pool1')(x)
x =Conv2D(8,(3,3), activation=None, padding='same', name='conv3')(x)
x =Activation('relu')(x)
x =Conv2D(8,(3,3), activation=None, padding='same', name='conv4')(x)
x =Activation('relu')(x)
x =MaxPooling2D((2,2), strides=(2,2), name='pool2')(x)
x =GlobalAveragePooling2D()(x)
x =Dense(10, activation=None)(x)
x =Activation('softmax')(x)
model =Model(inputs=inputs1, outputs=x)return model
if __name__ =='__main__':
model = keras_simple_model()print(model.summary())
السؤال
Moatasm Elshahry
انا احاول ان اقوم بعمل تبديل لطبقة Con2D باخري ممثالة لكن بدون bias. كذلك احاول اضافة BatchNormalization قبل اول طبقة activation.
كيف استطيع ان اقوم بهذا؟
رابط هذا التعليق
شارك على الشبكات الإجتماعية
2 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.