Created
April 24, 2018 08:04
-
-
Save CVxTz/b2062891205ab6453b6ff69b495cc5e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def get_model_mel(): | |
| nclass = len(list_labels) | |
| inp = Input(shape=(157, 320, 1)) | |
| incep_res = InceptionResNetV2(input_shape=(157, 320, 1), weights=None, include_top=False) | |
| x = incep_res(inp) | |
| x = GlobalMaxPool2D()(x) | |
| x = Dropout(rate=0.1)(x) | |
| x = Dense(128, activation=activations.relu)(x) | |
| x = Dense(nclass, activation=activations.softmax)(x) | |
| model = models.Model(inputs=inp, outputs=x) | |
| opt = optimizers.Adam() | |
| model.compile(optimizer=opt, loss=losses.sparse_categorical_crossentropy, metrics=['acc']) | |
| model.summary() | |
| return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment