Last active
April 21, 2020 02:04
-
-
Save StrikingLoo/0ed729fbd2ff712e7a8e1a168b3fc874 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
| fc_layer_size = 256 | |
| img_size = IMG_SIZE | |
| conv_inputs = keras.Input(shape=(img_size[1], img_size[0],3), name='ani_image') | |
| #first convolutional layer. | |
| conv_layer = layers.Conv2D(48, kernel_size=3, activation='relu')(conv_inputs) | |
| conv_layer = layers.MaxPool2D(pool_size=(2,2))(conv_layer) | |
| #second convolutional layer. | |
| conv_layer = layers.Conv2D(48, kernel_size=3, activation='relu')(conv_layer) | |
| conv_layer = layers.MaxPool2D(pool_size=(2,2))(conv_layer) | |
| conv_x = layers.Flatten(name = 'flattened_features')(conv_layer) #turn image to vector. | |
| conv_x = layers.Dense(fc_layer_size, activation='relu', name='first_layer')(conv_x) | |
| conv_x = layers.Dense(fc_layer_size, activation='relu', name='second_layer')(conv_x) | |
| conv_outputs = layers.Dense(1, activation='sigmoid', name='class')(conv_x) | |
| conv_model = keras.Model(inputs=conv_inputs, outputs=conv_outputs) | |
| #Epoch 15/15 | |
| #4096/4096 [==============================] - 154s 38ms/sample - | |
| #loss: 0.8806 - binary_crossentropy: 0.8806 - mean_squared_error: 0.2402 | |
| #val_loss: 1.5379 - val_binary_crossentropy: 1.5379 - val_mean_squared_error: 0.3302 | |
| #Labels vs predictions correlation coefficient 0.2188213 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Downloaded from strikingloo GitHub site