Last active
February 4, 2018 06:08
-
-
Save Akaame/d2fd71957aff9cf22da6e64e66973544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2 Boyutlu bir model olusturalim | |
from keras.models import Sequential | |
from keras.layers import Conv2D, Dense, Flatten, Dropout, BatchNormalization, MaxPooling2D | |
def get_model(no_inputs, no_outputs): | |
m = Sequential() | |
m.add(Conv2D(32,kernel_size=(5,5),strides=(1,1),activation='relu',input_shape=no_inputs)) | |
m.add(BatchNormalization()) | |
m.add(MaxPooling2D()) | |
m.add(Conv2D(32,kernel_size=(5,5),strides=(1,1),activation='relu')) | |
m.add(BatchNormalization()) | |
m.add(MaxPooling2D()) | |
m.add(Conv2D(32,kernel_size=(5,5),strides=(1,1),activation='relu')) | |
m.add(BatchNormalization()) | |
m.add(Conv2D(32,kernel_size=(5,5),strides=(1,1),activation='relu')) | |
m.add(BatchNormalization()) | |
m.add(Conv2D(32,kernel_size=(5,5),strides=(1,1),activation='relu')) | |
m.add(BatchNormalization()) | |
m.add(Flatten()) | |
m.add(Dense(256,activation='relu')) | |
m.add(Dropout(0.2)) | |
m.add(Dense(no_outputs, activation="softmax")) | |
return m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment