Created
May 29, 2018 18:17
-
-
Save coreyauger/7a6cd59b5318d9c8dca85fc6d93ab74b 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
################################################################################################# | |
## TRAIN FUTURE ENCODER | |
################################################################################################# | |
x_train_future = data[hold_out:,20:2420] | |
print("training on: " + str(x_train_future.shape)) | |
input_future = Input(shape=(x_train_future.shape[1],)) | |
encoded_future = Dense(encoding_dim, activation='relu')(input_future) | |
decoded_future = Dense(x_train_future.shape[1], activation='linear')(encoded_future) | |
autoencoder_future = Model(input_future, decoded_future) | |
autoencoder_future.compile(optimizer='adadelta', loss='mean_squared_error', metrics=['accuracy']) | |
modelPath_future= savePath+"/models/autoencoder-future-"+str(encoding_dim)+".hdf5" | |
checkpoint_future = ModelCheckpoint(modelPath_future, monitor='acc', verbose=2, save_best_only=True, mode='max') | |
history_future = autoencoder_future.fit(x_train_future, x_train_future, | |
batch_size=batch_size, | |
epochs=epochs, | |
verbose=2, | |
callbacks=[checkpoint_future], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment