Created
March 20, 2020 03:12
-
-
Save emuccino/f9c2a309a19b6ad569210221df2a8ae0 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
#set up MobileNet GlobalMaxPooling and unsepcified input resolution | |
inputs = Input(shape=(None,None,3)) | |
net = MobileNetV2(include_top=False, alpha=0.35, weights='imagenet', input_tensor=inputs, classes=n_classes) | |
net = GlobalMaxPooling2D()(net.output) | |
outputs = Dense(n_classes,activation='softmax')(net) | |
model = Model(inputs=inputs,outputs=outputs) | |
model.compile(optimizer='Adam', loss='sparse_categorical_crossentropy',metrics=['sparse_categorical_accuracy']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment