Last active
February 4, 2018 06:20
-
-
Save Akaame/154d4f2c6b35d7b69ec04c6d7df063eb 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
# Keras modelimizi olusturalim | |
from keras.models import Sequential | |
from keras.layers import Dense, Flatten, Dropout, Conv1D, BatchNormalization | |
def get_model(no_inputs, no_outputs): | |
m = Sequential() | |
m.add(Conv1D(32,kernel_size=(5,),strides=(1,),activation='relu',input_shape=no_inputs)) | |
m.add(BatchNormalization()) | |
m.add(Conv1D(32,kernel_size=(5,),strides=(1,),activation='relu')) | |
m.add(BatchNormalization()) | |
m.add(Conv1D(32,kernel_size=(5,),strides=(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