Skip to content

Commit

Permalink
(#2) Victim: Modify layer structure to improve accuracy of CIFAR10 cl…
Browse files Browse the repository at this point in the history
…assifier
  • Loading branch information
betarixm committed Apr 17, 2022
1 parent 0218c03 commit 2777d6b
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/victim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,27 @@ class Classifier(Model):
def _model(self) -> keras.Model:
return keras.Sequential(
[
keras.layers.Conv2D(32, (3, 3), activation="relu"),
keras.layers.Conv2D(32, (3, 3), activation="relu"),
keras.layers.Conv2D(32, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.Conv2D(32, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Conv2D(64, (3, 3), activation="relu"),
keras.layers.Conv2D(64, (3, 3), activation="relu"),
keras.layers.Dropout(0.2),
keras.layers.Conv2D(64, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.Conv2D(64, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Dropout(0.3),
keras.layers.Conv2D(128, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.Conv2D(128, (3, 3), activation="relu", padding="same"),
keras.layers.BatchNormalization(),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Dropout(0.4),
keras.layers.Flatten(),
keras.layers.Dense(512, activation="relu"),
keras.layers.Dense(256, activation="relu"),
keras.layers.Dropout(0.5),
keras.layers.Dense(10, activation="softmax"),
],
)
Expand Down

0 comments on commit 2777d6b

Please sign in to comment.