Added multiple results and created working grid settings and scripts

This commit is contained in:
2017-08-29 20:06:59 +02:00
parent e79ae5c205
commit 7180550b0d
4 changed files with 65 additions and 42 deletions
+21 -7
View File
@@ -27,7 +27,11 @@ from prepare_data import *
# save_inputs('../../internal_representations/inputs/shuffeled_matrix_validate_inputs_other_features_output_11.h5', X_validate, y_validate, other_features = X_other_features_validate)
# X_train, X_other_features_train, y_train = load_inputs('cnn/internal_representations/inputs/shuffeled_matrix_train_inputs_other_features_output_11.h5', other_features=True)
# X_validate, X_other_features_validate, y_validate = load_inputs('cnn/internal_representations/inputs/shuffeled_matrix_validate_inputs_other_features_output_11.h5', other_features=True)
data = Data('l', save_generated_data=False, number_of_syllables=True)
# letters
# data = Data('l', save_generated_data=False, number_of_syllables=True)
# syllabled letters
data = Data('l', save_generated_data=False, accent_classification=True)
data.generate_data('letters_word_accetuation_train',
'letters_word_accetuation_test',
'letters_word_accetuation_validate', content_name='SlovarIJS_BESEDE_utf8.lex',
@@ -36,7 +40,7 @@ data.generate_data('letters_word_accetuation_train',
num_examples = len(data.x_train) # training set size
nn_output_dim = 10
nn_output_dim = 13
nn_hdim = 516
batch_size = 16
# actual_epoch = 1
@@ -46,13 +50,23 @@ num_fake_epoch = 20
# letters
conv_input_shape=(23, 36)
othr_input = (141, )
# syllabled letters
# conv_input_shape=(10, 5168)
# othr_input = (140, )
othr_input = (150, )
conv_input = Input(shape=conv_input_shape, name='conv_input')
# letters
x_conv = Conv1D(115, (3), padding='same', activation='relu')(conv_input)
x_conv = Conv1D(46, (3), padding='same', activation='relu')(x_conv)
# syllabled letters
# x_conv = Conv1D(200, (2), padding='same', activation='relu')(conv_input)
x_conv = MaxPooling1D(pool_size=2)(x_conv)
x_conv = Flatten()(x_conv)
@@ -62,10 +76,10 @@ x = concatenate([x_conv, othr_input])
# x = Dense(1024, input_dim=(516 + 256), activation='relu')(x)
x = Dense(256, activation='relu')(x)
x = Dropout(0.3)(x)
x = Dense(256, activation='relu')(x)
x = Dense(512, activation='relu')(x)
x = Dropout(0.3)(x)
x = Dense(512, activation='relu')(x)
x = Dropout(0.3)(x)
x = Dense(256, activation='relu')(x)
x = Dropout(0.2)(x)
x = Dense(nn_output_dim, activation='sigmoid')(x)