Skip to content

Instantly share code, notes, and snippets.

@shyamal18122000
Created September 2, 2021 19:09
Show Gist options
  • Save shyamal18122000/a79c0483a42028308a2bd16fe237e887 to your computer and use it in GitHub Desktop.
Save shyamal18122000/a79c0483a42028308a2bd16fe237e887 to your computer and use it in GitHub Desktop.
model_ckpt = ModelCheckpoint('BrailleNet.h5',save_best_only=True)
reduce_lr = ReduceLROnPlateau(patience=8,verbose=0)
early_stop = EarlyStopping(patience=15,verbose=1)
entry = layers.Input(shape=(28,28,3))
x = layers.SeparableConv2D(64,(3,3),activation='relu')(entry)
x = layers.MaxPooling2D((2,2))(x)
x = layers.SeparableConv2D(128,(3,3),activation='relu')(x)
x = layers.MaxPooling2D((2,2))(x)
x = layers.SeparableConv2D(256,(2,2),activation='relu')(x)
x = layers.GlobalMaxPooling2D()(x)
x = layers.Dense(256)(x)
x = layers.LeakyReLU()(x)
x = layers.Dense(64,kernel_regularizer=l2(2e-4))(x)
x = layers.LeakyReLU()(x)
x = layers.Dense(26,activation='softmax')(x)
model = Model(entry,x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment