Commit 20504167 by Paktalin

Trained three different models nonstop

parent 355e205f
Showing with 48 additions and 0 deletions
No preview for this file type
import matplotlib.pyplot as plt
import numpy as np
from util import read_list
def plot(loss, label=None):
x = np.arange(0, len(loss))
plt.plot(loss, label=label)
plt.xlabel('Epochs')
plt.ylabel('Loss')
def plot_best_model():
loss = [2.6129, 2.4543, 2.3803, 2.3188, 2.2835, 2.2500, 2.2371, 2.2178, 2.2071, 2.1918, 2.1795, 2.1839, 2.1855, 2.1756, 2.1869, 2.0661, 2.08390, 2.0756, 2.0439, 2.0376, 2.0501, 2.0166, 1.9766, 1.9441, 1.9409, 1.9263 , 1.9020, 1.8844, 1.8782, 1.8675, 1.8649, 1.8323, 1.8085, 1.7909, 1.7810, 1.7713, 1.7688, 1.7230, 1.7030, 1.6947, 1.6947, 1.6292, 1.5968, 1.5830]
plot(loss, 'Best model')
def plot_lstm_50_model():
loss = [2.6357, 2.5246, 2.4718, 2.4106, 2.3716, 2.3487, 2.3232, 2.3089, 2.2949, 2.2901, 2.2137, 2.2068, 2.2021, 2.1978, 2.1933, 2.2126, 2.2105, 2.2200]
plot(loss)
def plot_rnn_val_loss():
loss = [2.5573, 2.4642, 2.4089, 2.3709, 2.3442, 2.3265, 2.3136, 2.3000, 2.2965, 2.2883, 2.2848, 2.2210, 2.1682, 2.1604, 2.1587, 2.1231, 2.0898, 2.0942, 2.1014, 2.1023, 2.1073, 2.1093, 2.1107, 2.1167, 2.1199, 2.1216, 2.1240]
plot(loss, 'Validation')
def plot_rnn_train_loss():
loss = [2.7632, 2.5124, 2.4267, 2.3725, 2.3330, 2.3032, 2.2820, 2.2667, 2.2471, 2.2353, 2.2209, 2.1950, 2.1639, 2.1431, 2.1302, 2.1260, 2.1147, 2.1086, 2.1036, 2.0993, 2.0946, 2.0899, 2.0858, 2.0806, 2.0766, 2.0717, 2.0675]
plot(loss, 'Training')
def plot_lstm_nonstop():
hist100 = read_list('lstm_30_epochs_nonstop_dropout/history_69')
hist50 = read_list('lstm_70_epochs_50_units_nonstop_dropout/history_69')
hist_RNN = read_list('rnn_50_epochs_nonstop_dropout/history_69')
plot(hist100['val_loss'], 'Validation LSTM 100')
plot(hist100['loss'], 'Training LSTM 100')
plot(hist50['val_loss'], 'Validation LSTM 50')
plot(hist50['loss'], 'Training LSTM 50')
plot(hist_RNN['val_loss'], 'Validation RNN 100')
plot(hist_RNN['loss'], 'Training RNN 100')
# plot_best_model()
# # plot_lstm_50_model()
# plot_rnn_val_loss()
# plot_rnn_train_loss()
plot_lstm_nonstop()
plt.legend()
plt.show()
\ No newline at end of file
File deleted
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment