Fixed saving loss history

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-02-07 17:55:24 +01:00
parent abf52a88b0
commit ebfa67abb0

View File

@ -250,15 +250,15 @@ def train_mnist(folding_id: int, inlier_classes: Sequence[int], total_classes: i
decoder.save_weights("./weights/decoder") decoder.save_weights("./weights/decoder")
z_discriminator.save_weights("./weights/z_discriminator") z_discriminator.save_weights("./weights/z_discriminator")
x_discriminator.save_weights("./weights/x_discriminator") x_discriminator.save_weights("./weights/x_discriminator")
with open("./results0/losses/encoder_loss.txt", "w") as file: with open("./results0/losses/encoder_loss.txt", "wb") as file:
pickle.dump(encoder_loss_history, file) pickle.dump(encoder_loss_history, file)
with open("./results0/losses/decoder_loss.txt", "w") as file: with open("./results0/losses/decoder_loss.txt", "wb") as file:
pickle.dump(decoder_loss_history, file) pickle.dump(decoder_loss_history, file)
with open("./results0/losses/enc_dec_loss.txt", "w") as file: with open("./results0/losses/enc_dec_loss.txt", "wb") as file:
pickle.dump(enc_dec_loss_history, file) pickle.dump(enc_dec_loss_history, file)
with open("./results0/losses/xd_loss.txt", "w") as file: with open("./results0/losses/xd_loss.txt", "wb") as file:
pickle.dump(xd_loss_history, file) pickle.dump(xd_loss_history, file)
with open("./results0/losses/zd_loss.txt", "w") as file: with open("./results0/losses/zd_loss.txt", "wb") as file:
pickle.dump(zd_loss_history, file) pickle.dump(zd_loss_history, file)