Created
January 15, 2020 17:14
-
-
Save iCorv/9ccdda8c57702f5659498ac486935ce7 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
# compile the model with adam optimizer and mean squeared error as its loss function | |
autoencoder.compile(optimizer='adam', loss='mse', metrics=['mse']) | |
# some constants for training | |
BATCH_SIZE = 32 | |
SHUFFLE_BUFFER_SIZE = 100 | |
# shuffle and batch the examples | |
train_dataset = train_dataset.shuffle(SHUFFLE_BUFFER_SIZE).batch(BATCH_SIZE) | |
eval_dataset = eval_dataset.batch(BATCH_SIZE) | |
# train the model | |
autoencoder.fit(train_dataset, epochs=100, validation_data=eval_dataset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment