Deadline: June 11, 11:59pm
Late Penalty: There is a penalty-free grace period of one hour past the deadline. Any work that is submitted between 1 hour and 24 hours past the deadline will receive a 20% grade deduction. No other late work is accepted. Quercus submission time will be used, not your local computer time. You can submit your labs as many times as you want before the deadline, so please submit often and early.
In this lab, you will build and train an autoencoder to impute (or "fill in") missing data.
We will be using the Adult Data Set provided by the UCI Machine Learning Repository [1], available at https://archive.ics.uci.edu/ml/datasets/adult. The data set contains census record files of adults, including their age, martial status, the type of work they do, and other features.
Normally, people use this data set to build a supervised classification model to classify whether a person is a high income earner. We will not use the dataset for this original intended purpose.
Instead, we will perform the task of imputing (or "filling in") missing values in the dataset. For example, we may be missing one person's martial status, and another person's age, and a third person's level of education. Our model will predict the missing features based on the information that we do have about each person.
We will use a variation of a denoising autoencoder to solve this data imputation problem. Our autoencoder will be trained using inputs that have one categorical feature artificially removed, and the goal of the autoencoder is to correctly reconstruct all features, including the one removed from the input.
In the process, you are expected to learn to:
[1] Dua, D. and Karra Taniskidou, E. (2017). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.
Submit a PDF file containing all your code, outputs, and write-up. You can produce a PDF of your Google Colab file by going to File > Print and then save as PDF. The Colab instructions have more information (.html files are also acceptable).
Do not submit any other files produced by your code.
Include a link to your colab file in your submission.
Include a link to your Colab file here. If you would like the TA to look at your Colab file in case your solutions are cut off, please make sure that your Colab file is publicly accessible at the time of submission.
Colab Link: https://drive.google.com/file/d/14siiGm5gAhLp9rs4D3HDoa3OfXdcsVIC/view?usp=sharing
import csv
import numpy as np
import random
import torch
import torch.utils.data
import time
import matplotlib.pyplot as plt
We will be using a package called pandas
for this assignment.
If you are using Colab, pandas
should already be available.
If you are using your own computer,
installation instructions for pandas
are available here:
https://pandas.pydata.org/pandas-docs/stable/install.html
import pandas as pd
The adult.data file is available at https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data
The function pd.read_csv
loads the adult.data file into a pandas dataframe.
You can read about the pandas documentation for pd.read_csv
at
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
header = ['age', 'work', 'fnlwgt', 'edu', 'yredu', 'marriage', 'occupation',
'relationship', 'race', 'sex', 'capgain', 'caploss', 'workhr', 'country']
df = pd.read_csv(
"https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data",
names=header,
index_col=False)
df.shape # there are 32561 rows (records) in the data frame, and 14 columns (features)
(32561, 14)
For each of the columns ["age", "yredu", "capgain", "caploss", "workhr"]
, report the minimum, maximum, and average value across the dataset.
Then, normalize each of the features ["age", "yredu", "capgain", "caploss", "workhr"]
so that their values are always between 0 and 1.
Make sure that you are actually modifying the dataframe df
.
Like numpy arrays and torch tensors, pandas data frames can be sliced. For example, we can display the first 3 rows of the data frame (3 records) below.
df[:3] # show the first 3 records
age | work | fnlwgt | edu | yredu | marriage | occupation | relationship | race | sex | capgain | caploss | workhr | country | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 39 | State-gov | 77516 | Bachelors | 13 | Never-married | Adm-clerical | Not-in-family | White | Male | 2174 | 0 | 40 | United-States |
1 | 50 | Self-emp-not-inc | 83311 | Bachelors | 13 | Married-civ-spouse | Exec-managerial | Husband | White | Male | 0 | 0 | 13 | United-States |
2 | 38 | Private | 215646 | HS-grad | 9 | Divorced | Handlers-cleaners | Not-in-family | White | Male | 0 | 0 | 40 | United-States |
Alternatively, we can slice based on column names,
for example df["race"]
, df["hr"]
, or even index multiple columns
like below.
subdf = df[["age", "yredu", "capgain", "caploss", "workhr"]]
subdf[:3] # show the first 3 records
age | yredu | capgain | caploss | workhr | |
---|---|---|---|---|---|
0 | 39 | 13 | 2174 | 0 | 40 |
1 | 50 | 13 | 0 | 0 | 13 |
2 | 38 | 9 | 0 | 0 | 40 |
Numpy works nicely with pandas, like below:
np.sum(subdf["caploss"])
2842700
Just like numpy arrays, you can modify entire columns of data rather than one scalar element at a time. For example, the code
df["age"] = df["age"] + 1
would increment everyone's age by 1.
print("The minimum values of each column are:")
subdf.min()
The minimum values of each column are:
age 17 yredu 1 capgain 0 caploss 0 workhr 1 dtype: int64
print("The maximum values of each column are:")
subdf.max()
The maximum values of each column are:
age 90 yredu 16 capgain 99999 caploss 4356 workhr 99 dtype: int64
print("The average values of each column are:")
subdf.mean()
The average values of each column are:
age 38.581647 yredu 10.080679 capgain 1077.648844 caploss 87.303830 workhr 40.437456 dtype: float64
df[["age", "yredu", "capgain", "caploss", "workhr"]] = (subdf - subdf.min())/(subdf.max() - subdf.min())
print("The first 3 records of the normalized data set are:")
df[:3] # show the first 3 records
The first 3 records of the normalized data set are:
age | work | fnlwgt | edu | yredu | marriage | occupation | relationship | race | sex | capgain | caploss | workhr | country | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0.301370 | State-gov | 77516 | Bachelors | 0.800000 | Never-married | Adm-clerical | Not-in-family | White | Male | 0.02174 | 0.0 | 0.397959 | United-States |
1 | 0.452055 | Self-emp-not-inc | 83311 | Bachelors | 0.800000 | Married-civ-spouse | Exec-managerial | Husband | White | Male | 0.00000 | 0.0 | 0.122449 | United-States |
2 | 0.287671 | Private | 215646 | HS-grad | 0.533333 | Divorced | Handlers-cleaners | Not-in-family | White | Male | 0.00000 | 0.0 | 0.397959 | United-States |
What percentage of people in our data set are male? Note that the data labels all have an unfortunate space in the beginning, e.g. " Male" instead of "Male".
What percentage of people in our data set are female?
# hint: you can do something like this in pandas
male_size = sum(df["sex"] == " Male")
female_size = sum(df["sex"] == " Female")
sex_size = df["sex"].size
print(male_size/sex_size*100, "% of people in the data set are male.")
print(female_size/sex_size*100, "% of people in the data set are female.")
66.92054912318419 % of people in the data set are male. 33.07945087681583 % of people in the data set are female.
Before proceeding, we will modify our data frame in a couple more ways:
Both of these steps are done for you, below.
How many records contained missing features? What percentage of records were removed?
contcols = ["age", "yredu", "capgain", "caploss", "workhr"]
catcols = ["work", "marriage", "occupation", "edu", "relationship", "sex"]
features = contcols + catcols
df = df[features]
missing = pd.concat([df[c] == " ?" for c in catcols], axis=1).any(axis=1)
df_with_missing = df[missing]
df_not_missing = df[~missing]
missing_size = df_with_missing.shape[0]
total_size = df.shape[0]
print(missing_size, "records contained missing features.")
print(missing_size/total_size*100, "% of records were removed.")
1843 records contained missing features. 5.660145572924664 % of records were removed.
What are all the possible values of the feature "work" in df_not_missing
? You may find the Python function set
useful.
work_values = set(df_not_missing["work"])
print("The possible values of the feature \"work\" are:")
for work in work_values:
print(work)
The possible values of the feature "work" are: Local-gov Without-pay Private State-gov Self-emp-not-inc Self-emp-inc Federal-gov
We will be using a one-hot encoding to represent each of the categorical variables. Our autoencoder will be trained using these one-hot encodings.
We will use the pandas function get_dummies
to produce one-hot encodings
for all of the categorical variables in df_not_missing
.
data = pd.get_dummies(df_not_missing)
data[:3]
age | yredu | capgain | caploss | workhr | work_ Federal-gov | work_ Local-gov | work_ Private | work_ Self-emp-inc | work_ Self-emp-not-inc | work_ State-gov | work_ Without-pay | marriage_ Divorced | marriage_ Married-AF-spouse | marriage_ Married-civ-spouse | marriage_ Married-spouse-absent | marriage_ Never-married | marriage_ Separated | marriage_ Widowed | occupation_ Adm-clerical | occupation_ Armed-Forces | occupation_ Craft-repair | occupation_ Exec-managerial | occupation_ Farming-fishing | occupation_ Handlers-cleaners | occupation_ Machine-op-inspct | occupation_ Other-service | occupation_ Priv-house-serv | occupation_ Prof-specialty | occupation_ Protective-serv | occupation_ Sales | occupation_ Tech-support | occupation_ Transport-moving | edu_ 10th | edu_ 11th | edu_ 12th | edu_ 1st-4th | edu_ 5th-6th | edu_ 7th-8th | edu_ 9th | edu_ Assoc-acdm | edu_ Assoc-voc | edu_ Bachelors | edu_ Doctorate | edu_ HS-grad | edu_ Masters | edu_ Preschool | edu_ Prof-school | edu_ Some-college | relationship_ Husband | relationship_ Not-in-family | relationship_ Other-relative | relationship_ Own-child | relationship_ Unmarried | relationship_ Wife | sex_ Female | sex_ Male | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0.301370 | 0.800000 | 0.02174 | 0.0 | 0.397959 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
1 | 0.452055 | 0.800000 | 0.00000 | 0.0 | 0.122449 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
2 | 0.287671 | 0.533333 | 0.00000 | 0.0 | 0.397959 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
The dataframe data
contains the cleaned and normalized data that we will use to train our denoising autoencoder.
How many columns (features) are in the dataframe data
?
Briefly explain where that number come from.
data.shape[1]
57
total_cols = 0
for feature in catcols:
total_cols += len(set(df_not_missing[feature]))
total_cols += len(contcols)
total_cols
57
Answer:
As shown in the code above, 57 columns (features) are in the dataframe data
. The number comes from the sum of all continuous features and all possible values of each categorical feature.
We will convert the pandas data frame data
into numpy, so that
it can be further converted into a PyTorch tensor.
However, in doing so, we lose the column label information that
a panda data frame automatically stores.
Complete the function get_categorical_value
that will return
the named value of a feature given a one-hot embedding.
You may find the global variables cat_index
and cat_values
useful. (Display them and figure out what they are first.)
We will need this function in the next part of the lab
to interpret our autoencoder outputs. So, the input
to our function get_categorical_values
might not
actually be "one-hot" -- the input may instead
contain real-valued predictions from our neural network.
datanp = data.values.astype(np.float32)
cat_index = {} # Mapping of feature -> start index of feature in a record
cat_values = {} # Mapping of feature -> list of categorical values the feature can take
# build up the cat_index and cat_values dictionary
for i, header in enumerate(data.keys()):
if "_" in header: # categorical header
feature, value = header.split()
feature = feature[:-1] # remove the last char; it is always an underscore
if feature not in cat_index:
cat_index[feature] = i
cat_values[feature] = [value]
else:
cat_values[feature].append(value)
cat_index
{'edu': 33, 'marriage': 12, 'occupation': 19, 'relationship': 49, 'sex': 55, 'work': 5}
cat_values
{'edu': ['10th', '11th', '12th', '1st-4th', '5th-6th', '7th-8th', '9th', 'Assoc-acdm', 'Assoc-voc', 'Bachelors', 'Doctorate', 'HS-grad', 'Masters', 'Preschool', 'Prof-school', 'Some-college'], 'marriage': ['Divorced', 'Married-AF-spouse', 'Married-civ-spouse', 'Married-spouse-absent', 'Never-married', 'Separated', 'Widowed'], 'occupation': ['Adm-clerical', 'Armed-Forces', 'Craft-repair', 'Exec-managerial', 'Farming-fishing', 'Handlers-cleaners', 'Machine-op-inspct', 'Other-service', 'Priv-house-serv', 'Prof-specialty', 'Protective-serv', 'Sales', 'Tech-support', 'Transport-moving'], 'relationship': ['Husband', 'Not-in-family', 'Other-relative', 'Own-child', 'Unmarried', 'Wife'], 'sex': ['Female', 'Male'], 'work': ['Federal-gov', 'Local-gov', 'Private', 'Self-emp-inc', 'Self-emp-not-inc', 'State-gov', 'Without-pay']}
def get_onehot(record, feature):
"""
Return the portion of `record` that is the one-hot encoding
of `feature`. For example, since the feature "work" is stored
in the indices [5:12] in each record, calling `get_range(record, "work")`
is equivalent to accessing `record[5:12]`.
Args:
- record: a numpy array representing one record, formatted
the same way as a row in `data.np`
- feature: a string, should be an element of `catcols`
"""
start_index = cat_index[feature]
stop_index = cat_index[feature] + len(cat_values[feature])
return record[start_index:stop_index]
def get_categorical_value(onehot, feature):
"""
Return the categorical value name of a feature given
a one-hot vector representing the feature.
Args:
- onehot: a numpy array one-hot representation of the feature
- feature: a string, should be an element of `catcols`
Examples:
>>> get_categorical_value(np.array([0., 0., 0., 0., 0., 1., 0.]), "work")
'State-gov'
>>> get_categorical_value(np.array([0.1, 0., 1.1, 0.2, 0., 1., 0.]), "work")
'Private'
"""
return cat_values[feature][np.argmax(onehot)]
get_categorical_value(np.array([0., 0., 0., 0., 0., 1., 0.]), "work")
'State-gov'
get_categorical_value(np.array([0.1, 0., 1.1, 0.2, 0., 1., 0.]), "work")
'Private'
# more useful code, used during training, that depends on the function
# you write above
def get_feature(record, feature):
"""
Return the categorical feature value of a record
"""
onehot = get_onehot(record, feature)
return get_categorical_value(onehot, feature)
def get_features(record):
"""
Return a dictionary of all categorical feature values of a record
"""
return { f: get_feature(record, f) for f in catcols }
Randomly split the data into approximately 70% training, 15% validation and 15% test.
Report the number of items in your training, validation, and test set.
# set the numpy seed for reproducibility
# https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.seed.html
np.random.seed(50)
np.random.shuffle(datanp)
train_split = int(len(datanp) * 0.7) #split at 70%
train_data, val_data = datanp[:train_split], datanp[train_split:]
val_split = int(len(val_data) * 0.5)
val_data, test_data = val_data[:val_split], val_data[val_split:]
print("The number of entries in the training set is", train_data.shape[0])
print("The number of entries in the validation set is", val_data.shape[0])
print("The number of entries in the test set is", test_data.shape[0])
The number of entries in the training set is 21502 The number of entries in the validation set is 4608 The number of entries in the test set is 4608
Design a fully-connected autoencoder by modifying the encoder
and decoder
below.
The input to this autoencoder will be the features of the data
, with
one categorical feature recorded as "missing". The output of the autoencoder
should be the reconstruction of the same features, but with the missing
value filled in.
Note: Do not reduce the dimensionality of the input too much! The output of your embedding is expected to contain information about ~11 features.
from torch import nn
class AutoEncoder(nn.Module):
def __init__(self):
super(AutoEncoder, self).__init__()
self.name = "autoencoder"
self.encoder = nn.Sequential(
nn.Linear(57, 30),
nn.ReLU(),
nn.Linear(30, 15)
)
self.decoder = nn.Sequential(
nn.Linear(15, 30),
nn.ReLU(),
nn.Linear(30, 57),
nn.Sigmoid() # get to the range (0, 1)
)
def forward(self, x):
x = self.encoder(x)
x = self.decoder(x)
return x
Explain why there is a sigmoid activation in the last step of the decoder.
(Note: the values inside the data frame data
and the training code in Part 3 might be helpful.)
Answer:
Since the values inside the data frame data
are all between 0 and 1, the sigmoid activation function is applied to the output layer to scale the output from 0 to 1.
We will train our autoencoder in the following way:
zero_out_random_features
functionComplete the code to train the autoencoder, and plot the training and validation loss every few iterations. You may also want to plot training and validation "accuracy" every few iterations, as we will define in part (b). You may also want to checkpoint your model every few iterations or epochs.
Use nn.MSELoss()
as your loss function. (Side note: you might recognize that this loss function is not
ideal for this problem, but we will use it anyway.)
def zero_out_feature(records, feature):
""" Set the feature missing in records, by setting the appropriate
columns of records to 0
"""
start_index = cat_index[feature]
stop_index = cat_index[feature] + len(cat_values[feature])
records[:, start_index:stop_index] = 0
return records
def zero_out_random_feature(records):
""" Set one random feature missing in records, by setting the
appropriate columns of records to 0
"""
return zero_out_feature(records, random.choice(catcols))
def get_model_name(name, learning_rate, epoch):
path = "model_{0}_lr{1}_epoch{2}".format(name, learning_rate, epoch)
return path
def get_val_loss(model, valid_loader, criterion):
total_val_loss = 0.0
i = 0
for data in valid_loader:
datam = zero_out_random_feature(data.clone()) # zero out one categorical feature
recon = model(datam)
loss = criterion(recon, data)
total_val_loss += loss.item()
i += 1
val_loss = float(total_val_loss)/(i + 1)
return val_loss
def train(model, train_loader, valid_loader, num_epochs=5, learning_rate=1e-4):
""" Training loop. You should update this."""
torch.manual_seed(42)
criterion = nn.MSELoss()
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
train_acc = np.zeros(num_epochs)
train_loss = np.zeros(num_epochs)
val_acc = np.zeros(num_epochs)
val_loss = np.zeros(num_epochs)
start_time = time.time()
for epoch in range(num_epochs):
total_train_loss = 0.0
i = 0
for data in train_loader:
datam = zero_out_random_feature(data.clone()) # zero out one categorical feature
recon = model(datam)
loss = criterion(recon, data)
loss.backward()
optimizer.step()
optimizer.zero_grad()
total_train_loss += loss.item()
i += 1
train_acc[epoch] = get_accuracy(model, train_loader)
train_loss[epoch] = float(total_train_loss)/(i + 1)
val_acc[epoch] = get_accuracy(model, valid_loader)
val_loss[epoch] = get_val_loss(model, valid_loader, criterion)
print(("Epoch {}: Train acc: {}, Train loss: {} |"+
"Validation acc: {}, Validation loss: {}").format(
epoch + 1,
train_acc[epoch],
train_loss[epoch],
val_acc[epoch],
val_loss[epoch]))
# Save the current model (checkpoint) to a file
model_path = get_model_name(model.name, learning_rate, epoch)
torch.save(model.state_dict(), model_path)
print('Finished Training')
end_time = time.time()
elapsed_time = end_time - start_time
print("Total time elapsed: {:.2f} seconds".format(elapsed_time))
# Plotting
plt.title("Train vs Validation Loss")
plt.plot(range(1 ,num_epochs+1), train_loss, label="Train")
plt.plot(range(1 ,num_epochs+1), val_loss, label="Validation")
plt.xlabel("Epochs")
plt.ylabel("Loss")
plt.legend(loc='best')
plt.show()
plt.title("Train vs Validation Accuracy")
plt.plot(range(1 ,num_epochs+1), train_acc, label="Train")
plt.plot(range(1 ,num_epochs+1), val_acc, label="Validation")
plt.xlabel("Epochs")
plt.ylabel("Training Accuracy")
plt.legend(loc='best')
plt.show()
print("Final Training Accuracy: {}".format(train_acc[-1]))
print("Final Validation Accuracy: {}".format(val_acc[-1]))
While plotting training and validation loss is valuable, loss values are harder to compare than accuracy percentages. It would be nice to have a measure of "accuracy" in this problem.
Since we will only be imputing missing categorical values, we will define an accuracy measure. For each record and for each categorical feature, we determine whether the model can predict the categorical feature given all the other features of the record.
A function get_accuracy
is written for you. It is up to you to figure out how to
use the function. You don't need to submit anything in this part.
To earn the marks, correctly plot the training and validation accuracy every few
iterations as part of your training curve.
def get_accuracy(model, data_loader):
"""Return the "accuracy" of the autoencoder model across a data set.
That is, for each record and for each categorical feature,
we determine whether the model can successfully predict the value
of the categorical feature given all the other features of the
record. The returned "accuracy" measure is the percentage of times
that our model is successful.
Args:
- model: the autoencoder model, an instance of nn.Module
- data_loader: an instance of torch.utils.data.DataLoader
Example (to illustrate how get_accuracy is intended to be called.
Depending on your variable naming this code might require
modification.)
>>> model = AutoEncoder()
>>> vdl = torch.utils.data.DataLoader(data_valid, batch_size=256, shuffle=True)
>>> get_accuracy(model, vdl)
"""
total = 0
acc = 0
for col in catcols:
for item in data_loader: # minibatches
inp = item.detach().numpy()
out = model(zero_out_feature(item.clone(), col)).detach().numpy()
for i in range(out.shape[0]): # record in minibatch
acc += int(get_feature(out[i], col) == get_feature(inp[i], col))
total += 1
return acc / total
Run your updated training code, using reasonable initial hyperparameters.
Include your training curve in your submission.
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model = AutoEncoder()
train(model, train_loader, valid_loader, num_epochs=30)
Epoch 1: Train acc: 0.38208073667565806, Train loss: 0.20862779812749133 |Validation acc: 0.3844401041666667, Validation loss: 0.1374495572435396 Epoch 2: Train acc: 0.45940687687967013, Train loss: 0.08729150771917858 |Validation acc: 0.4583333333333333, Validation loss: 0.07259809625962367 Epoch 3: Train acc: 0.4596781694726072, Train loss: 0.07142292164288218 |Validation acc: 0.45829716435185186, Validation loss: 0.07073208499556126 Epoch 4: Train acc: 0.4588487892599138, Train loss: 0.0703882221298331 |Validation acc: 0.4575737847222222, Validation loss: 0.07007463002240269 Epoch 5: Train acc: 0.45833720894180385, Train loss: 0.06974058709928119 |Validation acc: 0.45703125, Validation loss: 0.06936035490973413 Epoch 6: Train acc: 0.45749232629522835, Train loss: 0.06884427061332085 |Validation acc: 0.4564525462962963, Validation loss: 0.06809887365169978 Epoch 7: Train acc: 0.47432796949121014, Train loss: 0.0666355416289246 |Validation acc: 0.4722945601851852, Validation loss: 0.0646185653079688 Epoch 8: Train acc: 0.516998418751744, Train loss: 0.061786324128464354 |Validation acc: 0.5159866898148148, Validation loss: 0.05902343006799058 Epoch 9: Train acc: 0.525423991566676, Train loss: 0.05730416851245331 |Validation acc: 0.5253544560185185, Validation loss: 0.05590584302647177 Epoch 10: Train acc: 0.5350975103091186, Train loss: 0.05517897751591326 |Validation acc: 0.5360604745370371, Validation loss: 0.05459686182992041 Epoch 11: Train acc: 0.5480342913837473, Train loss: 0.05403128961648361 |Validation acc: 0.5491898148148148, Validation loss: 0.05364152264037896 Epoch 12: Train acc: 0.5581418782748891, Train loss: 0.05309944977923034 |Validation acc: 0.5600405092592593, Validation loss: 0.052431881328276427 Epoch 13: Train acc: 0.561870213623539, Train loss: 0.05191222589341399 |Validation acc: 0.5613064236111112, Validation loss: 0.05103880689874601 Epoch 14: Train acc: 0.5684354943726165, Train loss: 0.05007020992058321 |Validation acc: 0.5684317129629629, Validation loss: 0.04920812065019452 Epoch 15: Train acc: 0.577450159675069, Train loss: 0.048046773481970374 |Validation acc: 0.5770399305555556, Validation loss: 0.04686735155895485 Epoch 16: Train acc: 0.5738613462313583, Train loss: 0.045652775950619305 |Validation acc: 0.5738932291666666, Validation loss: 0.04458768722167355 Epoch 17: Train acc: 0.5785430812637584, Train loss: 0.04365983642969358 |Validation acc: 0.5787760416666666, Validation loss: 0.042735877339051105 Epoch 18: Train acc: 0.5785740861315226, Train loss: 0.041951423505381946 |Validation acc: 0.5786313657407407, Validation loss: 0.041136742345657125 Epoch 19: Train acc: 0.5808529439121942, Train loss: 0.04027368076344626 |Validation acc: 0.5819227430555556, Validation loss: 0.039731567509980865 Epoch 20: Train acc: 0.5819536167178248, Train loss: 0.03917394729900431 |Validation acc: 0.5828269675925926, Validation loss: 0.03851173579339104 Epoch 21: Train acc: 0.5833178308994512, Train loss: 0.038091417855254266 |Validation acc: 0.5845269097222222, Validation loss: 0.03745902534187371 Epoch 22: Train acc: 0.5852866400024804, Train loss: 0.03733723253586526 |Validation acc: 0.5882884837962963, Validation loss: 0.03667053050231686 Epoch 23: Train acc: 0.5874802343968003, Train loss: 0.03644546204818639 |Validation acc: 0.5901331018518519, Validation loss: 0.03604809307556831 Epoch 24: Train acc: 0.593022354509658, Train loss: 0.03565637931470878 |Validation acc: 0.5937861689814815, Validation loss: 0.03535149658225941 Epoch 25: Train acc: 0.5956577682696184, Train loss: 0.034933784213856706 |Validation acc: 0.5963903356481481, Validation loss: 0.03456755483230073 Epoch 26: Train acc: 0.5980994016060521, Train loss: 0.03432839913763526 |Validation acc: 0.5978009259259259, Validation loss: 0.033998312461756455 Epoch 27: Train acc: 0.5998434254177906, Train loss: 0.03353790844892889 |Validation acc: 0.59765625, Validation loss: 0.03314605205477345 Epoch 28: Train acc: 0.6011378786469476, Train loss: 0.03288430454712416 |Validation acc: 0.6000434027777778, Validation loss: 0.032791547344594045 Epoch 29: Train acc: 0.602486590394692, Train loss: 0.0323814817590954 |Validation acc: 0.5998987268518519, Validation loss: 0.031933274529100525 Epoch 30: Train acc: 0.6038585557932595, Train loss: 0.0316823019538329 |Validation acc: 0.6009114583333334, Validation loss: 0.03148753964825801 Finished Training Total time elapsed: 95.35 seconds
Final Training Accuracy: 0.6038585557932595 Final Validation Accuracy: 0.6009114583333334
Tune your hyperparameters, training at least 4 different models (4 sets of hyperparameters).
Do not include all your training curves. Instead, explain what hyperparameters you tried, what their effect was, and what your thought process was as you chose the next set of hyperparameters to try.
# Since the training accuracy of the model in Part (c) was still increasing near the end, num_epochs is increased from 30 to 150
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model_1 = AutoEncoder()
train(model_1, train_loader, valid_loader, num_epochs=150)
# Results:
# Increasing num_epochs increased the training and validation accuracies
# Final Training Accuracy: 0.6297321179425169
# Final Validation Accuracy: 0.6265552662037037
# Since the training accuracy of model_1 still seems to increase near the end, num_epochs is increased from 150 to 300
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model_2 = AutoEncoder()
train(model_2, train_loader, valid_loader, num_epochs=300)
# Results:
# Increasing num_epochs increased the training and validation accuracies
# Final Training Accuracy: 0.6311195857749666
# Final Validation Accuracy: 0.6269169560185185
# Since the previous two models were trained at a very slow rate, learning_rate is increased from 1e-4 to 5e-4
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model_3 = AutoEncoder()
train(model_3, train_loader, valid_loader, num_epochs=300, learning_rate=5e-4)
# Results:
# Increasing learning_rate increased the training and validation accuracies, but it also made the training curves
# more noisy with more fluctuations.
# Final Training Accuracy: 0.6833007782221809
# Final Validation Accuracy: 0.6796151620370371
# Since increasing the learning_rate significantly improved the training and validation accuracies,
# learning_rate is further increased from 5e-4 to 0.00075 so the model can learn even faster
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model_4 = AutoEncoder()
train(model_4, train_loader, valid_loader, num_epochs=300, learning_rate=0.00075)
# Results:
# Increasing learning_rate increased the training and validation accuracies, but it also made the training curves
# even more noisy with more fluctuations compared to model_3.
# Final Training Accuracy: 0.6957182277617586
# Final Validation Accuracy: 0.6915509259259259
# Since the training curves are starting to become more and more noisy due to the increase in
# learning_rate, it will not be further increased. However, training accuracy of model_4 still
# seems to increase near the end, so num_epochs is increased from 300 to 600
train_loader = torch.utils.data.DataLoader(train_data, batch_size=64, shuffle=True)
valid_loader = torch.utils.data.DataLoader(val_data, batch_size=64, shuffle=True)
model_5 = AutoEncoder()
train(model_5, train_loader, valid_loader, num_epochs=600, learning_rate=0.00075)
# Results:
# This set of hyperparameters produces the best learned model
# Final Training Accuracy: 0.7151427774160544
# Final Validation Accuracy: 0.7076099537037037
Epoch 1: Train acc: 0.5309816141134158, Train loss: 0.09496343219846222 |Validation acc: 0.5297309027777778, Validation loss: 0.055621624910424654 Epoch 2: Train acc: 0.5799460515300903, Train loss: 0.05101048515263934 |Validation acc: 0.5782696759259259, Validation loss: 0.04634870735801292 Epoch 3: Train acc: 0.5998434254177906, Train loss: 0.04141154051799802 |Validation acc: 0.5967520254629629, Validation loss: 0.0373355060848974 Epoch 4: Train acc: 0.6134468111493504, Train loss: 0.03475015092563735 |Validation acc: 0.6093026620370371, Validation loss: 0.03262321443714268 Epoch 5: Train acc: 0.6129739869159458, Train loss: 0.031112549351169024 |Validation acc: 0.6084346064814815, Validation loss: 0.029488086015074473 Epoch 6: Train acc: 0.6100285244783431, Train loss: 0.028163398049484374 |Validation acc: 0.6053602430555556, Validation loss: 0.02715853609432099 Epoch 7: Train acc: 0.6107571388708027, Train loss: 0.025897714798545978 |Validation acc: 0.6090133101851852, Validation loss: 0.024493559078487517 Epoch 8: Train acc: 0.611695036120671, Train loss: 0.023902389903494796 |Validation acc: 0.6085069444444444, Validation loss: 0.02297352886142469 Epoch 9: Train acc: 0.614415713266983, Train loss: 0.02256955552669325 |Validation acc: 0.6119068287037037, Validation loss: 0.021935903215753217 Epoch 10: Train acc: 0.6227870275633275, Train loss: 0.02176760871637646 |Validation acc: 0.6203703703703703, Validation loss: 0.021333424681217274 Epoch 11: Train acc: 0.6162915077667194, Train loss: 0.02104854257086441 |Validation acc: 0.6108579282407407, Validation loss: 0.020768934764100643 Epoch 12: Train acc: 0.6243837782531857, Train loss: 0.02057666969913934 |Validation acc: 0.6201895254629629, Validation loss: 0.019839456766423732 Epoch 13: Train acc: 0.623515641955787, Train loss: 0.019612456262885464 |Validation acc: 0.6177662037037037, Validation loss: 0.01917563683079771 Epoch 14: Train acc: 0.6277478064056057, Train loss: 0.019007412946122515 |Validation acc: 0.6253978587962963, Validation loss: 0.018658459252879598 Epoch 15: Train acc: 0.6267246457693858, Train loss: 0.018425075674446116 |Validation acc: 0.6220341435185185, Validation loss: 0.01784237236536221 Epoch 16: Train acc: 0.6271509627011441, Train loss: 0.018083317318616177 |Validation acc: 0.6213831018518519, Validation loss: 0.017786949049427177 Epoch 17: Train acc: 0.6272439773044368, Train loss: 0.01761365145478033 |Validation acc: 0.6189959490740741, Validation loss: 0.01712106692795407 Epoch 18: Train acc: 0.6344681114935045, Train loss: 0.016729918576622222 |Validation acc: 0.6270254629629629, Validation loss: 0.016685595970810874 Epoch 19: Train acc: 0.6302436982606269, Train loss: 0.01659342707950036 |Validation acc: 0.6231553819444444, Validation loss: 0.016227395613663983 Epoch 20: Train acc: 0.6308017858803833, Train loss: 0.01617400275504642 |Validation acc: 0.6247106481481481, Validation loss: 0.015797270660893852 Epoch 21: Train acc: 0.6312048491613184, Train loss: 0.015907581906644104 |Validation acc: 0.6257595486111112, Validation loss: 0.015886073885070996 Epoch 22: Train acc: 0.6338170092704555, Train loss: 0.015384846389050476 |Validation acc: 0.6276765046296297, Validation loss: 0.015430769838879123 Epoch 23: Train acc: 0.6308637956159117, Train loss: 0.01508915513472007 |Validation acc: 0.6243489583333334, Validation loss: 0.015383969829348676 Epoch 24: Train acc: 0.6347471553033827, Train loss: 0.015098830850833602 |Validation acc: 0.6282913773148148, Validation loss: 0.015387267670221074 Epoch 25: Train acc: 0.6399249682200105, Train loss: 0.015119063557410276 |Validation acc: 0.6337167245370371, Validation loss: 0.014592083766559023 Epoch 26: Train acc: 0.6388475490652032, Train loss: 0.014761345427848111 |Validation acc: 0.6331380208333334, Validation loss: 0.014710551889154518 Epoch 27: Train acc: 0.6410566458934053, Train loss: 0.014797429883029057 |Validation acc: 0.6368272569444444, Validation loss: 0.014106971713319112 Epoch 28: Train acc: 0.6415914798623383, Train loss: 0.013995484755725464 |Validation acc: 0.6354528356481481, Validation loss: 0.014168128391965473 Epoch 29: Train acc: 0.6394909000713112, Train loss: 0.014105835269020112 |Validation acc: 0.6334635416666666, Validation loss: 0.014032459804008905 Epoch 30: Train acc: 0.6391963538275509, Train loss: 0.013901810666120637 |Validation acc: 0.6334997106481481, Validation loss: 0.013675414074145987 Epoch 31: Train acc: 0.6391498465259046, Train loss: 0.013900610923667601 |Validation acc: 0.6329210069444444, Validation loss: 0.013767591464811334 Epoch 32: Train acc: 0.6380259200694509, Train loss: 0.013690488146291908 |Validation acc: 0.6325593171296297, Validation loss: 0.013793715925262661 Epoch 33: Train acc: 0.6395761634576629, Train loss: 0.013445496955715142 |Validation acc: 0.6323061342592593, Validation loss: 0.013235098298207942 Epoch 34: Train acc: 0.6413279384863424, Train loss: 0.013368393265495757 |Validation acc: 0.6356698495370371, Validation loss: 0.013413160258644323 Epoch 35: Train acc: 0.6422348308684463, Train loss: 0.01335069065836178 |Validation acc: 0.6362485532407407, Validation loss: 0.013248763316606644 Epoch 36: Train acc: 0.6416147335131616, Train loss: 0.013114999596980188 |Validation acc: 0.6365017361111112, Validation loss: 0.013253296713015889 Epoch 37: Train acc: 0.6408241093851734, Train loss: 0.013128362264406787 |Validation acc: 0.6346209490740741, Validation loss: 0.012767125665865154 Epoch 38: Train acc: 0.6449322543639351, Train loss: 0.013304881703174875 |Validation acc: 0.6397207754629629, Validation loss: 0.012841789719292158 Epoch 39: Train acc: 0.6391653489597867, Train loss: 0.013057169367667033 |Validation acc: 0.6344039351851852, Validation loss: 0.01305564308334529 Epoch 40: Train acc: 0.6423123430378569, Train loss: 0.012819482520697997 |Validation acc: 0.6377676504629629, Validation loss: 0.013146825065664969 Epoch 41: Train acc: 0.6472653706631941, Train loss: 0.013004667533268649 |Validation acc: 0.6415292245370371, Validation loss: 0.013060201882475916 Epoch 42: Train acc: 0.6473506340495457, Train loss: 0.012874107813401817 |Validation acc: 0.640625, Validation loss: 0.012829759369607053 Epoch 43: Train acc: 0.6466297708740272, Train loss: 0.012762113287768573 |Validation acc: 0.6415292245370371, Validation loss: 0.012967459498199935 Epoch 44: Train acc: 0.6446609617709981, Train loss: 0.012500098918893482 |Validation acc: 0.6389612268518519, Validation loss: 0.012532798259709727 Epoch 45: Train acc: 0.6485133165907048, Train loss: 0.012366675482979957 |Validation acc: 0.6420717592592593, Validation loss: 0.012540450862688993 Epoch 46: Train acc: 0.6458158930952159, Train loss: 0.012203120822722551 |Validation acc: 0.6405164930555556, Validation loss: 0.012574433940476587 Epoch 47: Train acc: 0.6482807800824729, Train loss: 0.012390315532684326 |Validation acc: 0.6423972800925926, Validation loss: 0.012921470431583306 Epoch 48: Train acc: 0.6525206957492327, Train loss: 0.012338390513060708 |Validation acc: 0.6464482060185185, Validation loss: 0.012566418023586538 Epoch 49: Train acc: 0.6515052863299537, Train loss: 0.012361503076305728 |Validation acc: 0.6461950231481481, Validation loss: 0.012346644251599068 Epoch 50: Train acc: 0.6513270083403094, Train loss: 0.012289697927552709 |Validation acc: 0.6447844328703703, Validation loss: 0.012281576765684593 Epoch 51: Train acc: 0.6437695718227762, Train loss: 0.012673492420420537 |Validation acc: 0.6367549189814815, Validation loss: 0.012755094708194983 Epoch 52: Train acc: 0.6491179115121074, Train loss: 0.01237554738480454 |Validation acc: 0.6424334490740741, Validation loss: 0.012133593063038782 Epoch 53: Train acc: 0.648807862834465, Train loss: 0.012191568911683577 |Validation acc: 0.6431929976851852, Validation loss: 0.012001043558673442 Epoch 54: Train acc: 0.6533113198772207, Train loss: 0.012483162976779287 |Validation acc: 0.6476779513888888, Validation loss: 0.012001129299767028 Epoch 55: Train acc: 0.6507844231544353, Train loss: 0.012545109488821702 |Validation acc: 0.6459056712962963, Validation loss: 0.012505300746517648 Epoch 56: Train acc: 0.6548770656993148, Train loss: 0.012091659564933898 |Validation acc: 0.6471715856481481, Validation loss: 0.01216996735713558 Epoch 57: Train acc: 0.6514665302452485, Train loss: 0.012214930629971208 |Validation acc: 0.6453631365740741, Validation loss: 0.012149226531187399 Epoch 58: Train acc: 0.6527377298235824, Train loss: 0.012079597283596897 |Validation acc: 0.6458333333333334, Validation loss: 0.012144526893698585 Epoch 59: Train acc: 0.6522106470715903, Train loss: 0.012275310434975857 |Validation acc: 0.6469184027777778, Validation loss: 0.01196321103036492 Epoch 60: Train acc: 0.6525284469661737, Train loss: 0.012306465935901647 |Validation acc: 0.6470992476851852, Validation loss: 0.01210632160836582 Epoch 61: Train acc: 0.65089294019161, Train loss: 0.011635144552055646 |Validation acc: 0.6452546296296297, Validation loss: 0.011964260168008794 Epoch 62: Train acc: 0.6536833782903916, Train loss: 0.011935401069503334 |Validation acc: 0.6477141203703703, Validation loss: 0.011942367027969672 Epoch 63: Train acc: 0.6517300716212445, Train loss: 0.011890787292736132 |Validation acc: 0.6450014467592593, Validation loss: 0.011876699398617185 Epoch 64: Train acc: 0.6544584999844976, Train loss: 0.0120757882986273 |Validation acc: 0.6489438657407407, Validation loss: 0.011833555783623228 Epoch 65: Train acc: 0.6559777385049452, Train loss: 0.011706073490698278 |Validation acc: 0.6494502314814815, Validation loss: 0.012150479922795155 Epoch 66: Train acc: 0.654388739032028, Train loss: 0.011841084097874094 |Validation acc: 0.6491608796296297, Validation loss: 0.01192004394438394 Epoch 67: Train acc: 0.6520168666480638, Train loss: 0.0122171903626015 |Validation acc: 0.6452184606481481, Validation loss: 0.012103708788409873 Epoch 68: Train acc: 0.6573884599882182, Train loss: 0.012024033865794672 |Validation acc: 0.6530309606481481, Validation loss: 0.01195804419504473 Epoch 69: Train acc: 0.6549700803026075, Train loss: 0.012078400789718599 |Validation acc: 0.6490162037037037, Validation loss: 0.012157839989615742 Epoch 70: Train acc: 0.6544584999844976, Train loss: 0.011874735580608028 |Validation acc: 0.6494140625, Validation loss: 0.01224815835402477 Epoch 71: Train acc: 0.6553653923666015, Train loss: 0.01173395703571575 |Validation acc: 0.6503182870370371, Validation loss: 0.011474799945154601 Epoch 72: Train acc: 0.651528539980777, Train loss: 0.011486409755716603 |Validation acc: 0.6456524884259259, Validation loss: 0.011947925958384481 Epoch 73: Train acc: 0.6539314172325055, Train loss: 0.011439336271741004 |Validation acc: 0.6474609375, Validation loss: 0.011584768106315273 Epoch 74: Train acc: 0.6538384026292128, Train loss: 0.011985038542561785 |Validation acc: 0.6485098379629629, Validation loss: 0.011551351174546367 Epoch 75: Train acc: 0.6516448082348929, Train loss: 0.011526895012673356 |Validation acc: 0.6467375578703703, Validation loss: 0.011790262973240026 Epoch 76: Train acc: 0.6576597525811553, Train loss: 0.01159946178431548 |Validation acc: 0.6511501736111112, Validation loss: 0.011469341241077517 Epoch 77: Train acc: 0.6523269153257061, Train loss: 0.011595836453670388 |Validation acc: 0.6471354166666666, Validation loss: 0.011815673468540525 Epoch 78: Train acc: 0.6576054940625679, Train loss: 0.011815025059379173 |Validation acc: 0.6505353009259259, Validation loss: 0.011329469588814573 Epoch 79: Train acc: 0.6530632809351068, Train loss: 0.011630357483551127 |Validation acc: 0.6481481481481481, Validation loss: 0.011740647992865356 Epoch 80: Train acc: 0.6577450159675069, Train loss: 0.011660437942523985 |Validation acc: 0.6513310185185185, Validation loss: 0.011407571470293075 Epoch 81: Train acc: 0.6521951446377081, Train loss: 0.011912781213208459 |Validation acc: 0.6469545717592593, Validation loss: 0.011397102963765227 Epoch 82: Train acc: 0.6588379375561964, Train loss: 0.011631625620178459 |Validation acc: 0.6549117476851852, Validation loss: 0.01169117163446696 Epoch 83: Train acc: 0.6592332496201904, Train loss: 0.011387417544762794 |Validation acc: 0.6553819444444444, Validation loss: 0.01144216137659081 Epoch 84: Train acc: 0.6604966979815831, Train loss: 0.011566253674689138 |Validation acc: 0.6548755787037037, Validation loss: 0.011352437723825964 Epoch 85: Train acc: 0.6610702880352215, Train loss: 0.011623466898651258 |Validation acc: 0.6554904513888888, Validation loss: 0.011673690404367111 Epoch 86: Train acc: 0.6612485660248659, Train loss: 0.01162720992415038 |Validation acc: 0.6545500578703703, Validation loss: 0.011360688577198842 Epoch 87: Train acc: 0.6622794778780269, Train loss: 0.011392747625454332 |Validation acc: 0.6562138310185185, Validation loss: 0.011242817840000023 Epoch 88: Train acc: 0.6569466406225778, Train loss: 0.011398826787961254 |Validation acc: 0.6519097222222222, Validation loss: 0.011167206504390483 Epoch 89: Train acc: 0.6629073264502527, Train loss: 0.011545479104188147 |Validation acc: 0.6581307870370371, Validation loss: 0.011268529638880172 Epoch 90: Train acc: 0.6589774594611354, Train loss: 0.01131169263892517 |Validation acc: 0.6531394675925926, Validation loss: 0.011233286565937963 Epoch 91: Train acc: 0.6588999472917249, Train loss: 0.011338972041621053 |Validation acc: 0.6528501157407407, Validation loss: 0.011289247527210047 Epoch 92: Train acc: 0.6657287694167985, Train loss: 0.011222711645442583 |Validation acc: 0.6602647569444444, Validation loss: 0.011048353943166818 Epoch 93: Train acc: 0.6579775524757386, Train loss: 0.011615836926534197 |Validation acc: 0.6541883680555556, Validation loss: 0.011273739902297096 Epoch 94: Train acc: 0.6666201593650203, Train loss: 0.011180925913962041 |Validation acc: 0.6616030092592593, Validation loss: 0.011332705267359577 Epoch 95: Train acc: 0.6635816823241248, Train loss: 0.011310827474797957 |Validation acc: 0.65625, Validation loss: 0.011278096341890026 Epoch 96: Train acc: 0.6659923107927944, Train loss: 0.01118545603277908 |Validation acc: 0.6598668981481481, Validation loss: 0.011205519452823729 Epoch 97: Train acc: 0.6649613989396336, Train loss: 0.011012764239976686 |Validation acc: 0.6595052083333334, Validation loss: 0.01145361118897442 Epoch 98: Train acc: 0.6651784330139832, Train loss: 0.011097410996375434 |Validation acc: 0.66015625, Validation loss: 0.010998703785329085 Epoch 99: Train acc: 0.6611012929029858, Train loss: 0.011119009006646868 |Validation acc: 0.6561053240740741, Validation loss: 0.010635232156313934 Epoch 100: Train acc: 0.6635429262394196, Train loss: 0.011061536743739504 |Validation acc: 0.6584924768518519, Validation loss: 0.010940944496818572 Epoch 101: Train acc: 0.661651629305801, Train loss: 0.010782694010870968 |Validation acc: 0.6567563657407407, Validation loss: 0.010931896088639335 Epoch 102: Train acc: 0.6599231079279447, Train loss: 0.010871997817477504 |Validation acc: 0.6536820023148148, Validation loss: 0.011005403473973274 Epoch 103: Train acc: 0.6624577558676712, Train loss: 0.011122594848662085 |Validation acc: 0.6580946180555556, Validation loss: 0.011234800328530968 Epoch 104: Train acc: 0.6696121291042694, Train loss: 0.01091994625828519 |Validation acc: 0.6649667245370371, Validation loss: 0.010880861881821906 Epoch 105: Train acc: 0.6687982513254581, Train loss: 0.010971644937505708 |Validation acc: 0.6631944444444444, Validation loss: 0.010939950011504775 Epoch 106: Train acc: 0.6631243605246023, Train loss: 0.010830018630676877 |Validation acc: 0.6595775462962963, Validation loss: 0.01077810318958158 Epoch 107: Train acc: 0.6703252410628469, Train loss: 0.010895160945734833 |Validation acc: 0.6644603587962963, Validation loss: 0.011119479032990575 Epoch 108: Train acc: 0.6677285833875919, Train loss: 0.010900803805724096 |Validation acc: 0.6635561342592593, Validation loss: 0.010665188999487313 Epoch 109: Train acc: 0.6652559451833938, Train loss: 0.010885077304806482 |Validation acc: 0.6607711226851852, Validation loss: 0.010848239290829228 Epoch 110: Train acc: 0.671774718630825, Train loss: 0.011039842348490519 |Validation acc: 0.6671368634259259, Validation loss: 0.010754027676102581 Epoch 111: Train acc: 0.6732164449818622, Train loss: 0.010531396701799303 |Validation acc: 0.6694155092592593, Validation loss: 0.010553690915767003 Epoch 112: Train acc: 0.6636979505782408, Train loss: 0.010823107238869992 |Validation acc: 0.6606626157407407, Validation loss: 0.010810750200156156 Epoch 113: Train acc: 0.6700461972529688, Train loss: 0.010770439758941045 |Validation acc: 0.6663049768518519, Validation loss: 0.010915886341298458 Epoch 114: Train acc: 0.6698136607447369, Train loss: 0.010701525671744736 |Validation acc: 0.6648220486111112, Validation loss: 0.011143943308700617 Epoch 115: Train acc: 0.66749604687936, Train loss: 0.010574539095295996 |Validation acc: 0.6629774305555556, Validation loss: 0.010540712150836292 Epoch 116: Train acc: 0.6750922394815986, Train loss: 0.010725875177837975 |Validation acc: 0.6683666087962963, Validation loss: 0.010469455274722874 Epoch 117: Train acc: 0.6718522308002356, Train loss: 0.010815537121500653 |Validation acc: 0.6678240740740741, Validation loss: 0.010442879873131698 Epoch 118: Train acc: 0.6695423681517998, Train loss: 0.010403837573380162 |Validation acc: 0.6622178819444444, Validation loss: 0.01053342500629694 Epoch 119: Train acc: 0.680990915573745, Train loss: 0.010582950811844197 |Validation acc: 0.6762876157407407, Validation loss: 0.010509603169058569 Epoch 120: Train acc: 0.6745961615973708, Train loss: 0.010531943214045788 |Validation acc: 0.6696686921296297, Validation loss: 0.010309819245395922 Epoch 121: Train acc: 0.6712321334449508, Train loss: 0.010610246103677003 |Validation acc: 0.6657986111111112, Validation loss: 0.010394537878065241 Epoch 122: Train acc: 0.6801382817102285, Train loss: 0.010249323344261603 |Validation acc: 0.6740089699074074, Validation loss: 0.010515938167534879 Epoch 123: Train acc: 0.6714414163023594, Train loss: 0.010241578689580148 |Validation acc: 0.6666304976851852, Validation loss: 0.010321024157250582 Epoch 124: Train acc: 0.6767742535578086, Train loss: 0.010354181997566443 |Validation acc: 0.6712962962962963, Validation loss: 0.010727318135043191 Epoch 125: Train acc: 0.6786345456236629, Train loss: 0.010886685777654545 |Validation acc: 0.6737919560185185, Validation loss: 0.01053187450620647 Epoch 126: Train acc: 0.6707593092115463, Train loss: 0.010393489558437635 |Validation acc: 0.6665943287037037, Validation loss: 0.010535184936515037 Epoch 127: Train acc: 0.6799289988528199, Train loss: 0.010356908445785414 |Validation acc: 0.6753110532407407, Validation loss: 0.010128721773060652 Epoch 128: Train acc: 0.6854556165317955, Train loss: 0.010347546197098158 |Validation acc: 0.6804470486111112, Validation loss: 0.01045056593187087 Epoch 129: Train acc: 0.6826961833007782, Train loss: 0.010235866050868785 |Validation acc: 0.6781322337962963, Validation loss: 0.01030935602295779 Epoch 130: Train acc: 0.6788903357827178, Train loss: 0.010764591066990303 |Validation acc: 0.6744791666666666, Validation loss: 0.010244427346942244 Epoch 131: Train acc: 0.687990264471522, Train loss: 0.010300726433580282 |Validation acc: 0.6839916087962963, Validation loss: 0.010073063142033907 Epoch 132: Train acc: 0.6807738814993954, Train loss: 0.010625220592014867 |Validation acc: 0.6761429398148148, Validation loss: 0.010419460729963923 Epoch 133: Train acc: 0.6814559885902086, Train loss: 0.010292360332493259 |Validation acc: 0.6773003472222222, Validation loss: 0.009856569605605893 Epoch 134: Train acc: 0.67254208910799, Train loss: 0.010196952091237027 |Validation acc: 0.6671368634259259, Validation loss: 0.010422742844059047 Epoch 135: Train acc: 0.6851378166372121, Train loss: 0.010539948990021333 |Validation acc: 0.6794343171296297, Validation loss: 0.010532646654146096 Epoch 136: Train acc: 0.685393606796267, Train loss: 0.010140961082375855 |Validation acc: 0.6826895254629629, Validation loss: 0.010333116124840095 Epoch 137: Train acc: 0.6771850680556848, Train loss: 0.010097512739050017 |Validation acc: 0.6711154513888888, Validation loss: 0.010243059343241089 Epoch 138: Train acc: 0.6859439431990823, Train loss: 0.010279225712664182 |Validation acc: 0.6810619212962963, Validation loss: 0.010085307160469783 Epoch 139: Train acc: 0.6772935850928595, Train loss: 0.010064292688735205 |Validation acc: 0.6713686342592593, Validation loss: 0.010319640468916572 Epoch 140: Train acc: 0.6820528322946703, Train loss: 0.010206375750561054 |Validation acc: 0.6774811921296297, Validation loss: 0.01013607374815276 Epoch 141: Train acc: 0.6838821194927603, Train loss: 0.010081820824191814 |Validation acc: 0.6783130787037037, Validation loss: 0.01025675669953625 Epoch 142: Train acc: 0.6847890118748644, Train loss: 0.01001845526810216 |Validation acc: 0.6802300347222222, Validation loss: 0.010392757244573945 Epoch 143: Train acc: 0.6877112206616439, Train loss: 0.010290772956726901 |Validation acc: 0.681640625, Validation loss: 0.010206846071224804 Epoch 144: Train acc: 0.6894397420395002, Train loss: 0.010376607779501897 |Validation acc: 0.6836299189814815, Validation loss: 0.009941006113860744 Epoch 145: Train acc: 0.6878894986512882, Train loss: 0.010181158403824539 |Validation acc: 0.6823640046296297, Validation loss: 0.010333502374987397 Epoch 146: Train acc: 0.6926177409853347, Train loss: 0.010126122390956394 |Validation acc: 0.6882233796296297, Validation loss: 0.009947388589061598 Epoch 147: Train acc: 0.6907264440517161, Train loss: 0.010055992703951166 |Validation acc: 0.6851851851851852, Validation loss: 0.010076280552009535 Epoch 148: Train acc: 0.6910674975971227, Train loss: 0.010146782806734568 |Validation acc: 0.6855107060185185, Validation loss: 0.009728575009266771 Epoch 149: Train acc: 0.6879825132545809, Train loss: 0.010024964320266106 |Validation acc: 0.6831235532407407, Validation loss: 0.010016181381855945 Epoch 150: Train acc: 0.6920441509316962, Train loss: 0.010309340928346802 |Validation acc: 0.6868127893518519, Validation loss: 0.010224049280809366 Epoch 151: Train acc: 0.6921681704027532, Train loss: 0.010243450106295704 |Validation acc: 0.6884765625, Validation loss: 0.009998738972984188 Epoch 152: Train acc: 0.6894707469072644, Train loss: 0.010280292729905167 |Validation acc: 0.6859447337962963, Validation loss: 0.00997211998300931 Epoch 153: Train acc: 0.676828512076396, Train loss: 0.010399373680717956 |Validation acc: 0.6707537615740741, Validation loss: 0.010198622292532234 Epoch 154: Train acc: 0.6853703531454438, Train loss: 0.009919263194494767 |Validation acc: 0.6813151041666666, Validation loss: 0.009983427731392115 Epoch 155: Train acc: 0.6942377453260162, Train loss: 0.010144311292179879 |Validation acc: 0.6877893518518519, Validation loss: 0.009931427777609414 Epoch 156: Train acc: 0.6794716770532974, Train loss: 0.009606402927666947 |Validation acc: 0.6738642939814815, Validation loss: 0.010145201456929261 Epoch 157: Train acc: 0.6893389762192664, Train loss: 0.00999165681337258 |Validation acc: 0.6846788194444444, Validation loss: 0.009761141147464514 Epoch 158: Train acc: 0.6901683564319598, Train loss: 0.00999138297137282 |Validation acc: 0.6851490162037037, Validation loss: 0.010096596283782882 Epoch 159: Train acc: 0.6896490248969088, Train loss: 0.010078697719608464 |Validation acc: 0.6852936921296297, Validation loss: 0.010108368795293242 Epoch 160: Train acc: 0.6927495116733328, Train loss: 0.009999797302256794 |Validation acc: 0.6872829861111112, Validation loss: 0.010389666950457262 Epoch 161: Train acc: 0.6874941865872942, Train loss: 0.009974265008203089 |Validation acc: 0.6820384837962963, Validation loss: 0.009835938616304794 Epoch 162: Train acc: 0.686036957802375, Train loss: 0.009841431612121245 |Validation acc: 0.6803023726851852, Validation loss: 0.009947584709843471 Epoch 163: Train acc: 0.6877732303971723, Train loss: 0.010024080308601923 |Validation acc: 0.6818938078703703, Validation loss: 0.010089138881317189 Epoch 164: Train acc: 0.6905636684959539, Train loss: 0.010312445955047003 |Validation acc: 0.6846426504629629, Validation loss: 0.009743512963229454 Epoch 165: Train acc: 0.6938114283942579, Train loss: 0.00997262820463285 |Validation acc: 0.6883680555555556, Validation loss: 0.01007673603645595 Epoch 166: Train acc: 0.6917651071218182, Train loss: 0.009584629064624803 |Validation acc: 0.6865596064814815, Validation loss: 0.009807955563477399 Epoch 167: Train acc: 0.6888118934672743, Train loss: 0.009513489299561573 |Validation acc: 0.6850766782407407, Validation loss: 0.009938752256577022 Epoch 168: Train acc: 0.6923619508262797, Train loss: 0.009856006608673478 |Validation acc: 0.6868851273148148, Validation loss: 0.00965232662414408 Epoch 169: Train acc: 0.69097448299383, Train loss: 0.009882574049805675 |Validation acc: 0.6865234375, Validation loss: 0.009654982154359847 Epoch 170: Train acc: 0.6935323845843797, Train loss: 0.010174642054458047 |Validation acc: 0.6861617476851852, Validation loss: 0.009957834978750977 Epoch 171: Train acc: 0.6898428053204353, Train loss: 0.009979414974701334 |Validation acc: 0.6841724537037037, Validation loss: 0.010126307740039262 Epoch 172: Train acc: 0.6918426192912287, Train loss: 0.009898939324703168 |Validation acc: 0.6863787615740741, Validation loss: 0.009804168870832871 Epoch 173: Train acc: 0.6938811893467275, Train loss: 0.009747231719070265 |Validation acc: 0.6876085069444444, Validation loss: 0.00970453436787652 Epoch 174: Train acc: 0.6899590735745512, Train loss: 0.009823124862665681 |Validation acc: 0.685546875, Validation loss: 0.00959841931620143 Epoch 175: Train acc: 0.6917806095557002, Train loss: 0.009673034951908828 |Validation acc: 0.6869212962962963, Validation loss: 0.009728345238584306 Epoch 176: Train acc: 0.6948190865965956, Train loss: 0.00969926249622768 |Validation acc: 0.6887659143518519, Validation loss: 0.009807701118964736 Epoch 177: Train acc: 0.6908659659566552, Train loss: 0.009953537265678939 |Validation acc: 0.6863787615740741, Validation loss: 0.009783040027435349 Epoch 178: Train acc: 0.6900365857439618, Train loss: 0.00998240532643695 |Validation acc: 0.6840639467592593, Validation loss: 0.009815534404050615 Epoch 179: Train acc: 0.6906566830992465, Train loss: 0.009855793462928041 |Validation acc: 0.6847149884259259, Validation loss: 0.009784587124882138 Epoch 180: Train acc: 0.6922611850060459, Train loss: 0.009840521980795556 |Validation acc: 0.6869936342592593, Validation loss: 0.009800102324045377 Epoch 181: Train acc: 0.6897110346324373, Train loss: 0.009925201539370267 |Validation acc: 0.6847873263888888, Validation loss: 0.009928959255999379 Epoch 182: Train acc: 0.6894397420395002, Train loss: 0.009658126026469363 |Validation acc: 0.6852575231481481, Validation loss: 0.009682769200402569 Epoch 183: Train acc: 0.6941059746380182, Train loss: 0.01026486423839359 |Validation acc: 0.6890552662037037, Validation loss: 0.009596468960916076 Epoch 184: Train acc: 0.69433851114625, Train loss: 0.010268211567177485 |Validation acc: 0.6886935763888888, Validation loss: 0.009973913179682872 Epoch 185: Train acc: 0.6928812823613307, Train loss: 0.010069773703791444 |Validation acc: 0.6880425347222222, Validation loss: 0.00989502781825223 Epoch 186: Train acc: 0.6964390909372772, Train loss: 0.009890990135555628 |Validation acc: 0.6911168981481481, Validation loss: 0.009681182852683682 Epoch 187: Train acc: 0.6960437788732831, Train loss: 0.00967440404721953 |Validation acc: 0.6907552083333334, Validation loss: 0.009598364774414092 Epoch 188: Train acc: 0.6922844386568692, Train loss: 0.009734359257564346 |Validation acc: 0.6859447337962963, Validation loss: 0.00985153006024946 Epoch 189: Train acc: 0.6958887545344619, Train loss: 0.00982799939258516 |Validation acc: 0.6911530671296297, Validation loss: 0.009773649378936704 Epoch 190: Train acc: 0.6935091309335566, Train loss: 0.010110868707586644 |Validation acc: 0.6879340277777778, Validation loss: 0.009639375172251455 Epoch 191: Train acc: 0.6957957399311692, Train loss: 0.009200005844589156 |Validation acc: 0.6893084490740741, Validation loss: 0.009328466232794196 Epoch 192: Train acc: 0.6927572628902737, Train loss: 0.009379362237006868 |Validation acc: 0.6903573495370371, Validation loss: 0.009944186606706958 Epoch 193: Train acc: 0.6919123802436983, Train loss: 0.009218450675743358 |Validation acc: 0.6872468171296297, Validation loss: 0.009418050366113907 Epoch 194: Train acc: 0.688625864260689, Train loss: 0.010200940318494063 |Validation acc: 0.6849681712962963, Validation loss: 0.009758507778304311 Epoch 195: Train acc: 0.6923929556940439, Train loss: 0.009491859960787065 |Validation acc: 0.6871744791666666, Validation loss: 0.009630955149798214 Epoch 196: Train acc: 0.6957802374972871, Train loss: 0.009837028401895518 |Validation acc: 0.6896339699074074, Validation loss: 0.01007698089138602 Epoch 197: Train acc: 0.6950748767556506, Train loss: 0.009274416444242796 |Validation acc: 0.6894892939814815, Validation loss: 0.009941585031711117 Epoch 198: Train acc: 0.692904536012154, Train loss: 0.00982012264762151 |Validation acc: 0.6881510416666666, Validation loss: 0.009805126933696008 Epoch 199: Train acc: 0.6944470281834249, Train loss: 0.009391429129357861 |Validation acc: 0.6898148148148148, Validation loss: 0.00983320379240068 Epoch 200: Train acc: 0.6921139118841658, Train loss: 0.009490211171620367 |Validation acc: 0.6864510995370371, Validation loss: 0.009487630112665962 Epoch 201: Train acc: 0.6964003348525718, Train loss: 0.00971458842134993 |Validation acc: 0.6919487847222222, Validation loss: 0.009536613940982595 Epoch 202: Train acc: 0.6949353548507116, Train loss: 0.0100952882792259 |Validation acc: 0.6899233217592593, Validation loss: 0.009918364791547774 Epoch 203: Train acc: 0.6966638762285678, Train loss: 0.009765164778797226 |Validation acc: 0.6912615740740741, Validation loss: 0.009458889084859843 Epoch 204: Train acc: 0.6957182277617586, Train loss: 0.009370535587234207 |Validation acc: 0.6897786458333334, Validation loss: 0.009550026067303223 Epoch 205: Train acc: 0.6969274176045639, Train loss: 0.009559269427965762 |Validation acc: 0.6919487847222222, Validation loss: 0.009347874738928208 Epoch 206: Train acc: 0.6901373515641955, Train loss: 0.009636526671721869 |Validation acc: 0.6883680555555556, Validation loss: 0.009657964146300841 Epoch 207: Train acc: 0.6918426192912287, Train loss: 0.009647836027810632 |Validation acc: 0.6863787615740741, Validation loss: 0.00980592370226714 Epoch 208: Train acc: 0.6950283694540043, Train loss: 0.00950956491695424 |Validation acc: 0.6906467013888888, Validation loss: 0.009694035841395266 Epoch 209: Train acc: 0.6926952531547453, Train loss: 0.009808941009158727 |Validation acc: 0.6867766203703703, Validation loss: 0.009799319077614773 Epoch 210: Train acc: 0.6909589805599479, Train loss: 0.009381106635279269 |Validation acc: 0.6871744791666666, Validation loss: 0.009823334520787708 Epoch 211: Train acc: 0.6964778470219825, Train loss: 0.00989030662631113 |Validation acc: 0.6910083912037037, Validation loss: 0.009455148940380851 Epoch 212: Train acc: 0.6908969708244195, Train loss: 0.009531540834850657 |Validation acc: 0.6872468171296297, Validation loss: 0.009399318384305085 Epoch 213: Train acc: 0.6934703748488513, Train loss: 0.009580653890392548 |Validation acc: 0.6883318865740741, Validation loss: 0.009704881919774528 Epoch 214: Train acc: 0.6958344960158744, Train loss: 0.009465138998590078 |Validation acc: 0.6900318287037037, Validation loss: 0.00954038345183105 Epoch 215: Train acc: 0.6962220568629275, Train loss: 0.00980120136206334 |Validation acc: 0.6919487847222222, Validation loss: 0.009382861145448703 Epoch 216: Train acc: 0.6974700027904381, Train loss: 0.00953155957599024 |Validation acc: 0.6901765046296297, Validation loss: 0.009618256948556673 Epoch 217: Train acc: 0.6937106625740241, Train loss: 0.009544783213123326 |Validation acc: 0.6882957175925926, Validation loss: 0.009801145195988634 Epoch 218: Train acc: 0.6956174619415249, Train loss: 0.00970972642214079 |Validation acc: 0.6897424768518519, Validation loss: 0.00974605819044596 Epoch 219: Train acc: 0.6912922828884135, Train loss: 0.009491442629476064 |Validation acc: 0.6853298611111112, Validation loss: 0.01006294124917257 Epoch 220: Train acc: 0.6919201314606394, Train loss: 0.009553532234257645 |Validation acc: 0.6871021412037037, Validation loss: 0.009662249698980715 Epoch 221: Train acc: 0.6920441509316962, Train loss: 0.009963844289301233 |Validation acc: 0.6875723379629629, Validation loss: 0.009420334679303961 Epoch 222: Train acc: 0.6974079930549096, Train loss: 0.009679443430907207 |Validation acc: 0.6940465856481481, Validation loss: 0.009561553271349176 Epoch 223: Train acc: 0.6896102688122036, Train loss: 0.009693979235222281 |Validation acc: 0.6857638888888888, Validation loss: 0.009774705396484284 Epoch 224: Train acc: 0.689796298018789, Train loss: 0.009593631935413672 |Validation acc: 0.6875, Validation loss: 0.009379470660088677 Epoch 225: Train acc: 0.6919743899792268, Train loss: 0.009903740734746265 |Validation acc: 0.6871744791666666, Validation loss: 0.009721316417916858 Epoch 226: Train acc: 0.6979893343254892, Train loss: 0.009664999686585025 |Validation acc: 0.6917679398148148, Validation loss: 0.009172376777247169 Epoch 227: Train acc: 0.6922999410907512, Train loss: 0.00970062895509406 |Validation acc: 0.6865957754629629, Validation loss: 0.009569967408783358 Epoch 228: Train acc: 0.6942532477598983, Train loss: 0.008977666638172522 |Validation acc: 0.6902488425925926, Validation loss: 0.009287925618797408 Epoch 229: Train acc: 0.6959895203546956, Train loss: 0.010036977803892835 |Validation acc: 0.6905020254629629, Validation loss: 0.009508577809677368 Epoch 230: Train acc: 0.6963228226831613, Train loss: 0.009639092370071822 |Validation acc: 0.6918041087962963, Validation loss: 0.009376649275002034 Epoch 231: Train acc: 0.690323380770781, Train loss: 0.009424379112016554 |Validation acc: 0.6849681712962963, Validation loss: 0.009830612198723264 Epoch 232: Train acc: 0.6981288562304282, Train loss: 0.00912518791428792 |Validation acc: 0.6940465856481481, Validation loss: 0.00936530993350447 Epoch 233: Train acc: 0.6983458903047779, Train loss: 0.009696216500731799 |Validation acc: 0.6926721643518519, Validation loss: 0.009999112493444222 Epoch 234: Train acc: 0.698229622050662, Train loss: 0.009573700338275965 |Validation acc: 0.6928168402777778, Validation loss: 0.009384164498229056 Epoch 235: Train acc: 0.6973847394040864, Train loss: 0.00945786084670253 |Validation acc: 0.6893807870370371, Validation loss: 0.009240453081752673 Epoch 236: Train acc: 0.6940982234210771, Train loss: 0.009964171316176211 |Validation acc: 0.6884765625, Validation loss: 0.00965131267087219 Epoch 237: Train acc: 0.6960127740055189, Train loss: 0.00962764809035229 |Validation acc: 0.6914785879629629, Validation loss: 0.009507100057763321 Epoch 238: Train acc: 0.6979273245899607, Train loss: 0.009474571267811675 |Validation acc: 0.6926359953703703, Validation loss: 0.009549873684828642 Epoch 239: Train acc: 0.698113353796546, Train loss: 0.00965969123012588 |Validation acc: 0.6919487847222222, Validation loss: 0.00946610007097928 Epoch 240: Train acc: 0.6971444516789136, Train loss: 0.009471072619836169 |Validation acc: 0.6920934606481481, Validation loss: 0.009724280486043643 Epoch 241: Train acc: 0.6959430130530493, Train loss: 0.00957458147651983 |Validation acc: 0.6893084490740741, Validation loss: 0.009467706117414225 Epoch 242: Train acc: 0.6936253991876725, Train loss: 0.009740503138699499 |Validation acc: 0.6888382523148148, Validation loss: 0.009318196591962605 Epoch 243: Train acc: 0.6969584224723282, Train loss: 0.009640275368063493 |Validation acc: 0.6903211805555556, Validation loss: 0.009388267329288784 Epoch 244: Train acc: 0.6941059746380182, Train loss: 0.009285608024643155 |Validation acc: 0.6876808449074074, Validation loss: 0.009628871530404962 Epoch 245: Train acc: 0.6973537345363222, Train loss: 0.009521982879225906 |Validation acc: 0.6903573495370371, Validation loss: 0.009326247693915529 Epoch 246: Train acc: 0.6982063683998387, Train loss: 0.009538035700926751 |Validation acc: 0.6939019097222222, Validation loss: 0.009470921556274641 Epoch 247: Train acc: 0.6956174619415249, Train loss: 0.00961237079919888 |Validation acc: 0.6907190393518519, Validation loss: 0.009349091259005427 Epoch 248: Train acc: 0.6967258859640963, Train loss: 0.009899442084133625 |Validation acc: 0.6921296296296297, Validation loss: 0.009827564781371404 Epoch 249: Train acc: 0.6949508572845937, Train loss: 0.009495600427912676 |Validation acc: 0.6887297453703703, Validation loss: 0.00939808618304947 Epoch 250: Train acc: 0.6870446160047128, Train loss: 0.009546659394921818 |Validation acc: 0.6809534143518519, Validation loss: 0.009320635058383736 Epoch 251: Train acc: 0.6959817691377547, Train loss: 0.009360915384993222 |Validation acc: 0.6913700810185185, Validation loss: 0.009714009150453685 Epoch 252: Train acc: 0.69550894490435, Train loss: 0.009409326648903397 |Validation acc: 0.6912254050925926, Validation loss: 0.009562758125022098 Epoch 253: Train acc: 0.6904163953740737, Train loss: 0.009494881741205115 |Validation acc: 0.6849320023148148, Validation loss: 0.009546064021402987 Epoch 254: Train acc: 0.6984621585588937, Train loss: 0.009628344441208579 |Validation acc: 0.6946976273148148, Validation loss: 0.009328216084248721 Epoch 255: Train acc: 0.696415837286454, Train loss: 0.009508729071524934 |Validation acc: 0.6920211226851852, Validation loss: 0.008976882265587766 Epoch 256: Train acc: 0.6997411093541686, Train loss: 0.009185024929572815 |Validation acc: 0.6927445023148148, Validation loss: 0.00938626564762801 Epoch 257: Train acc: 0.6956872228939943, Train loss: 0.009463836786472613 |Validation acc: 0.6901765046296297, Validation loss: 0.009460143127287973 Epoch 258: Train acc: 0.6963693299848076, Train loss: 0.009470046153817137 |Validation acc: 0.6928891782407407, Validation loss: 0.00946325959792521 Epoch 259: Train acc: 0.6977878026850215, Train loss: 0.009441903363277677 |Validation acc: 0.6920211226851852, Validation loss: 0.009154195978806439 Epoch 260: Train acc: 0.6962608129476328, Train loss: 0.009532595743516389 |Validation acc: 0.6911168981481481, Validation loss: 0.009451592524842711 Epoch 261: Train acc: 0.6949973645862401, Train loss: 0.009268956911786063 |Validation acc: 0.6921296296296297, Validation loss: 0.0096203272123144 Epoch 262: Train acc: 0.697718041732552, Train loss: 0.009484235910306345 |Validation acc: 0.6917679398148148, Validation loss: 0.009601254906720905 Epoch 263: Train acc: 0.6987334511518308, Train loss: 0.009491597957223742 |Validation acc: 0.6954571759259259, Validation loss: 0.009406658838771129 Epoch 264: Train acc: 0.6965786128422162, Train loss: 0.009360034335183549 |Validation acc: 0.6911530671296297, Validation loss: 0.009560062478155516 Epoch 265: Train acc: 0.6957879887142281, Train loss: 0.00929027060406056 |Validation acc: 0.6902850115740741, Validation loss: 0.009155105688202938 Epoch 266: Train acc: 0.6913852974917062, Train loss: 0.009646461613321517 |Validation acc: 0.6879701967592593, Validation loss: 0.009506461770171493 Epoch 267: Train acc: 0.697330480885499, Train loss: 0.00988859901597132 |Validation acc: 0.6909360532407407, Validation loss: 0.009380689923007605 Epoch 268: Train acc: 0.699787616655815, Train loss: 0.009170999017458421 |Validation acc: 0.6939742476851852, Validation loss: 0.009251926571009155 Epoch 269: Train acc: 0.6962918178153971, Train loss: 0.009204241937684111 |Validation acc: 0.6906828703703703, Validation loss: 0.009112666098494912 Epoch 270: Train acc: 0.6954159303010573, Train loss: 0.009352860795416888 |Validation acc: 0.6904658564814815, Validation loss: 0.009592689623509034 Epoch 271: Train acc: 0.6981366074473693, Train loss: 0.009601756776282316 |Validation acc: 0.6924913194444444, Validation loss: 0.00949473912241794 Epoch 272: Train acc: 0.6987799584534772, Train loss: 0.009336601872306638 |Validation acc: 0.6918764467592593, Validation loss: 0.00939495225702288 Epoch 273: Train acc: 0.6920286484978142, Train loss: 0.009163690943724146 |Validation acc: 0.6890914351851852, Validation loss: 0.009531064059872744 Epoch 274: Train acc: 0.6970049297739745, Train loss: 0.009382793520928225 |Validation acc: 0.6924189814814815, Validation loss: 0.009444368939614615 Epoch 275: Train acc: 0.6985706755960686, Train loss: 0.0089400171948934 |Validation acc: 0.6933232060185185, Validation loss: 0.009171980785521007 Epoch 276: Train acc: 0.6915558242644095, Train loss: 0.009480355922353816 |Validation acc: 0.6846788194444444, Validation loss: 0.009464603120555068 Epoch 277: Train acc: 0.7004542213127462, Train loss: 0.009594607423957803 |Validation acc: 0.6944444444444444, Validation loss: 0.009307595119101357 Epoch 278: Train acc: 0.6952919108300003, Train loss: 0.009228066932299458 |Validation acc: 0.6880425347222222, Validation loss: 0.009524303107751804 Epoch 279: Train acc: 0.6956949741109354, Train loss: 0.009479332034053276 |Validation acc: 0.6904658564814815, Validation loss: 0.009000433773321903 Epoch 280: Train acc: 0.6988264657551235, Train loss: 0.00901642353108114 |Validation acc: 0.6929976851851852, Validation loss: 0.009364465291636722 Epoch 281: Train acc: 0.6986946950671256, Train loss: 0.009500027794490405 |Validation acc: 0.6936125578703703, Validation loss: 0.00941875711558746 Epoch 282: Train acc: 0.6992295290360586, Train loss: 0.009209723730684875 |Validation acc: 0.6941189236111112, Validation loss: 0.009377108294743414 Epoch 283: Train acc: 0.6967878956996248, Train loss: 0.009090381040920446 |Validation acc: 0.6918402777777778, Validation loss: 0.009402175711672366 Epoch 284: Train acc: 0.6962375592968096, Train loss: 0.009504016548207234 |Validation acc: 0.6917679398148148, Validation loss: 0.009412601863749833 Epoch 285: Train acc: 0.6990667534802965, Train loss: 0.009514820934701655 |Validation acc: 0.6934678819444444, Validation loss: 0.009431863591926123 Epoch 286: Train acc: 0.699524075279819, Train loss: 0.009473964721876409 |Validation acc: 0.6957103587962963, Validation loss: 0.009161983088808527 Epoch 287: Train acc: 0.6980590952779586, Train loss: 0.009530281128488945 |Validation acc: 0.6919849537037037, Validation loss: 0.009436412960379344 Epoch 288: Train acc: 0.6978033051189036, Train loss: 0.009362939901329378 |Validation acc: 0.6928530092592593, Validation loss: 0.009070874580101992 Epoch 289: Train acc: 0.6996713484016991, Train loss: 0.008952569814111473 |Validation acc: 0.6942274305555556, Validation loss: 0.009193055291635258 Epoch 290: Train acc: 0.6990822559141785, Train loss: 0.009395549985792942 |Validation acc: 0.6938295717592593, Validation loss: 0.00918372205212624 Epoch 291: Train acc: 0.699276036337705, Train loss: 0.009301030175146876 |Validation acc: 0.6931061921296297, Validation loss: 0.009198198770656519 Epoch 292: Train acc: 0.6981366074473693, Train loss: 0.009423020957673427 |Validation acc: 0.6952401620370371, Validation loss: 0.009207656836408005 Epoch 293: Train acc: 0.6997488605711096, Train loss: 0.009469138675311288 |Validation acc: 0.6964337384259259, Validation loss: 0.009224844270852845 Epoch 294: Train acc: 0.7013688649117912, Train loss: 0.008943284544623968 |Validation acc: 0.6953125, Validation loss: 0.009096285164527573 Epoch 295: Train acc: 0.700299196973925, Train loss: 0.009223003046813722 |Validation acc: 0.6960720486111112, Validation loss: 0.009028818264178026 Epoch 296: Train acc: 0.701733172108021, Train loss: 0.009242340088448866 |Validation acc: 0.6961805555555556, Validation loss: 0.009500812509757652 Epoch 297: Train acc: 0.7037484885126964, Train loss: 0.009036839639115802 |Validation acc: 0.697265625, Validation loss: 0.008807549150854084 Epoch 298: Train acc: 0.6908504635227731, Train loss: 0.009045721707417898 |Validation acc: 0.6854021990740741, Validation loss: 0.009616246446967125 Epoch 299: Train acc: 0.7029733668185906, Train loss: 0.009403622492965455 |Validation acc: 0.6976634837962963, Validation loss: 0.009246885443509774 Epoch 300: Train acc: 0.7063528974048926, Train loss: 0.009589407446542728 |Validation acc: 0.6997251157407407, Validation loss: 0.008759324827151324 Epoch 301: Train acc: 0.6994233094595852, Train loss: 0.0091435720229339 |Validation acc: 0.6925998263888888, Validation loss: 0.009348225620926222 Epoch 302: Train acc: 0.7004309676619229, Train loss: 0.009227079990145803 |Validation acc: 0.6948784722222222, Validation loss: 0.009558153808536975 Epoch 303: Train acc: 0.6979118221560785, Train loss: 0.00917086836354094 |Validation acc: 0.6936125578703703, Validation loss: 0.009245069984219504 Epoch 304: Train acc: 0.7041903078783369, Train loss: 0.009214398521620459 |Validation acc: 0.6989655671296297, Validation loss: 0.00864062497243064 Epoch 305: Train acc: 0.703298917930115, Train loss: 0.009311783415588719 |Validation acc: 0.6964699074074074, Validation loss: 0.00914639414727511 Epoch 306: Train acc: 0.7031051375065885, Train loss: 0.009360583280061181 |Validation acc: 0.6961082175925926, Validation loss: 0.009524470050777764 Epoch 307: Train acc: 0.706399404706539, Train loss: 0.009016529155358981 |Validation acc: 0.6995804398148148, Validation loss: 0.00899012656108606 Epoch 308: Train acc: 0.7066396924317118, Train loss: 0.008943042318538406 |Validation acc: 0.7009548611111112, Validation loss: 0.009489255631204351 Epoch 309: Train acc: 0.7076163457662853, Train loss: 0.008948709287899008 |Validation acc: 0.7026186342592593, Validation loss: 0.009132803339671444 Epoch 310: Train acc: 0.7077403652373423, Train loss: 0.009108249489107453 |Validation acc: 0.7023292824074074, Validation loss: 0.008861021971943559 Epoch 311: Train acc: 0.7071590239667628, Train loss: 0.008957414981806845 |Validation acc: 0.7013527199074074, Validation loss: 0.00922491131087859 Epoch 312: Train acc: 0.7020897280873097, Train loss: 0.008920132589473967 |Validation acc: 0.6956741898148148, Validation loss: 0.008835838137620103 Epoch 313: Train acc: 0.7053607416364369, Train loss: 0.008969848991429726 |Validation acc: 0.6995442708333334, Validation loss: 0.009287427699757126 Epoch 314: Train acc: 0.7061281121136018, Train loss: 0.008983059701280398 |Validation acc: 0.7015335648148148, Validation loss: 0.009081604549224635 Epoch 315: Train acc: 0.7074303165596999, Train loss: 0.00925434331301854 |Validation acc: 0.7024739583333334, Validation loss: 0.009147179563106964 Epoch 316: Train acc: 0.7058568195206647, Train loss: 0.009490070977864527 |Validation acc: 0.6975549768518519, Validation loss: 0.009303535123352923 Epoch 317: Train acc: 0.7074613214274641, Train loss: 0.009004902574081715 |Validation acc: 0.7015335648148148, Validation loss: 0.008745634002550243 Epoch 318: Train acc: 0.701469630732025, Train loss: 0.008622596547482894 |Validation acc: 0.6955295138888888, Validation loss: 0.0087385180127152 Epoch 319: Train acc: 0.7061746194152482, Train loss: 0.009161656943511893 |Validation acc: 0.6997251157407407, Validation loss: 0.009197572095579405 Epoch 320: Train acc: 0.7076861067187549, Train loss: 0.009147050963211749 |Validation acc: 0.7010995370370371, Validation loss: 0.008968518667602884 Epoch 321: Train acc: 0.7092285988900258, Train loss: 0.00890574824391071 |Validation acc: 0.7036313657407407, Validation loss: 0.00854028646146066 Epoch 322: Train acc: 0.7073993116919356, Train loss: 0.008691234428446618 |Validation acc: 0.7013165509259259, Validation loss: 0.00873951225759854 Epoch 323: Train acc: 0.7068257216382973, Train loss: 0.00940481916233035 |Validation acc: 0.7008101851851852, Validation loss: 0.009141076697473268 Epoch 324: Train acc: 0.6991830217344123, Train loss: 0.009322757904558755 |Validation acc: 0.6945167824074074, Validation loss: 0.00917906551110594 Epoch 325: Train acc: 0.7036709763432859, Train loss: 0.009084624014463197 |Validation acc: 0.6988932291666666, Validation loss: 0.009190388569658075 Epoch 326: Train acc: 0.7013921185626143, Train loss: 0.009046803295573645 |Validation acc: 0.6945529513888888, Validation loss: 0.00922254740000766 Epoch 327: Train acc: 0.7078566334914581, Train loss: 0.009072057351481047 |Validation acc: 0.7034866898148148, Validation loss: 0.008809831903318844 Epoch 328: Train acc: 0.7070892630142932, Train loss: 0.008876967795182142 |Validation acc: 0.7005570023148148, Validation loss: 0.008773641462523478 Epoch 329: Train acc: 0.7052832294670264, Train loss: 0.008831129560678181 |Validation acc: 0.6994357638888888, Validation loss: 0.008968110652281197 Epoch 330: Train acc: 0.7058490683037237, Train loss: 0.008734637098967234 |Validation acc: 0.7002676504629629, Validation loss: 0.009201407602515614 Epoch 331: Train acc: 0.707438067776641, Train loss: 0.009178486220173825 |Validation acc: 0.7024377893518519, Validation loss: 0.008980208967096595 Epoch 332: Train acc: 0.7062366291507767, Train loss: 0.00888321218661168 |Validation acc: 0.6997974537037037, Validation loss: 0.009220402364450498 Epoch 333: Train acc: 0.7078721359253403, Train loss: 0.009150986037374603 |Validation acc: 0.7004123263888888, Validation loss: 0.009120909785934743 Epoch 334: Train acc: 0.7094146280966112, Train loss: 0.008662943245334556 |Validation acc: 0.7032335069444444, Validation loss: 0.008815276129060709 Epoch 335: Train acc: 0.7084379747620376, Train loss: 0.008950762851412466 |Validation acc: 0.7021846064814815, Validation loss: 0.008984553833555663 Epoch 336: Train acc: 0.7091123306359098, Train loss: 0.009135216777143828 |Validation acc: 0.7018590856481481, Validation loss: 0.008889957329739184 Epoch 337: Train acc: 0.7090735745512046, Train loss: 0.009194820167259133 |Validation acc: 0.7025101273148148, Validation loss: 0.009109659646209385 Epoch 338: Train acc: 0.7085232381483892, Train loss: 0.008909188546737772 |Validation acc: 0.7013527199074074, Validation loss: 0.009046639173460201 Epoch 339: Train acc: 0.7032524106284687, Train loss: 0.008748508772179926 |Validation acc: 0.6992910879629629, Validation loss: 0.0086870987537574 Epoch 340: Train acc: 0.7104765448175363, Train loss: 0.008929376689391073 |Validation acc: 0.7025462962962963, Validation loss: 0.008638473860477305 Epoch 341: Train acc: 0.7081511797352185, Train loss: 0.008771788309541053 |Validation acc: 0.7008101851851852, Validation loss: 0.009037309077510318 Epoch 342: Train acc: 0.7079031407931046, Train loss: 0.009102260525330062 |Validation acc: 0.7022569444444444, Validation loss: 0.009121347941425063 Epoch 343: Train acc: 0.7086240039686231, Train loss: 0.009298067082559761 |Validation acc: 0.7020037615740741, Validation loss: 0.008808452150997228 Epoch 344: Train acc: 0.7100734815366012, Train loss: 0.009097584263485158 |Validation acc: 0.7031973379629629, Validation loss: 0.009019530362391552 Epoch 345: Train acc: 0.7098409450283695, Train loss: 0.008769569175804272 |Validation acc: 0.7033420138888888, Validation loss: 0.008613882546979127 Epoch 346: Train acc: 0.7046166248100952, Train loss: 0.00912502876521594 |Validation acc: 0.7009910300925926, Validation loss: 0.009174225371032511 Epoch 347: Train acc: 0.707693857935696, Train loss: 0.009235046128258772 |Validation acc: 0.7012803819444444, Validation loss: 0.008990722265542216 Epoch 348: Train acc: 0.709399125662729, Train loss: 0.008850394502884601 |Validation acc: 0.7019675925925926, Validation loss: 0.008850815746026771 Epoch 349: Train acc: 0.7098409450283695, Train loss: 0.009397458861297333 |Validation acc: 0.7027633101851852, Validation loss: 0.009152417397264734 Epoch 350: Train acc: 0.710561808203888, Train loss: 0.008884743573171714 |Validation acc: 0.7049334490740741, Validation loss: 0.008761076432119402 Epoch 351: Train acc: 0.7084069698942734, Train loss: 0.00891783320585415 |Validation acc: 0.7028718171296297, Validation loss: 0.00863101561650501 Epoch 352: Train acc: 0.7054227513719654, Train loss: 0.008729580012550826 |Validation acc: 0.6988932291666666, Validation loss: 0.009045484901380999 Epoch 353: Train acc: 0.707693857935696, Train loss: 0.008909088348726623 |Validation acc: 0.7020037615740741, Validation loss: 0.00922505677683218 Epoch 354: Train acc: 0.7104222862989489, Train loss: 0.008984139605041162 |Validation acc: 0.7035590277777778, Validation loss: 0.009153784088270866 Epoch 355: Train acc: 0.7050429417418534, Train loss: 0.008720738932805396 |Validation acc: 0.6981698495370371, Validation loss: 0.008996051203498192 Epoch 356: Train acc: 0.7082674479893343, Train loss: 0.008968143969862681 |Validation acc: 0.7010995370370371, Validation loss: 0.008888625634491488 Epoch 357: Train acc: 0.7025005425851859, Train loss: 0.008782735421220034 |Validation acc: 0.6999782986111112, Validation loss: 0.008884270082694929 Epoch 358: Train acc: 0.7090580721173224, Train loss: 0.008997241574690541 |Validation acc: 0.7020399305555556, Validation loss: 0.008672389071932178 Epoch 359: Train acc: 0.7094301305304933, Train loss: 0.009027729494889607 |Validation acc: 0.7033058449074074, Validation loss: 0.008866179547927589 Epoch 360: Train acc: 0.7115229591045794, Train loss: 0.008889644064744299 |Validation acc: 0.7047164351851852, Validation loss: 0.008750066876229043 Epoch 361: Train acc: 0.7089495550801476, Train loss: 0.00895828674049932 |Validation acc: 0.7036313657407407, Validation loss: 0.008569672184883 Epoch 362: Train acc: 0.7110578860881158, Train loss: 0.008789781881745031 |Validation acc: 0.7048611111111112, Validation loss: 0.008838301099621268 Epoch 363: Train acc: 0.7101819985737761, Train loss: 0.0088723368959319 |Validation acc: 0.7034143518518519, Validation loss: 0.008786704868647527 Epoch 364: Train acc: 0.7112981738132886, Train loss: 0.008965432426950255 |Validation acc: 0.7032696759259259, Validation loss: 0.008673032239985926 Epoch 365: Train acc: 0.7087402722227389, Train loss: 0.008884662444473905 |Validation acc: 0.7031611689814815, Validation loss: 0.009066166209736812 Epoch 366: Train acc: 0.7081279260843952, Train loss: 0.00888532334703742 |Validation acc: 0.7005208333333334, Validation loss: 0.009517760065077452 Epoch 367: Train acc: 0.7125771246085636, Train loss: 0.008812296600841008 |Validation acc: 0.7067780671296297, Validation loss: 0.0086430365451852 Epoch 368: Train acc: 0.7125306173069171, Train loss: 0.008899681521607259 |Validation acc: 0.7067057291666666, Validation loss: 0.008845498321787939 Epoch 369: Train acc: 0.7077326140204012, Train loss: 0.008687913621629337 |Validation acc: 0.7023654513888888, Validation loss: 0.008858928578499516 Epoch 370: Train acc: 0.7138560754038384, Train loss: 0.008943533689303196 |Validation acc: 0.7064525462962963, Validation loss: 0.00878737077534265 Epoch 371: Train acc: 0.7107013301088271, Train loss: 0.009083681358494284 |Validation acc: 0.7052589699074074, Validation loss: 0.008674431919018 Epoch 372: Train acc: 0.7098254425944873, Train loss: 0.008895043326536255 |Validation acc: 0.7037398726851852, Validation loss: 0.008827160834542058 Epoch 373: Train acc: 0.7142513874678325, Train loss: 0.008699057424076189 |Validation acc: 0.70703125, Validation loss: 0.008690768186809932 Epoch 374: Train acc: 0.7057948097851363, Train loss: 0.008879773087318688 |Validation acc: 0.7001229745370371, Validation loss: 0.008646540708552482 Epoch 375: Train acc: 0.7120035345549252, Train loss: 0.00917728477467172 |Validation acc: 0.7067418981481481, Validation loss: 0.00874061547067757 Epoch 376: Train acc: 0.7100114718010727, Train loss: 0.00834380659600858 |Validation acc: 0.7033420138888888, Validation loss: 0.008500837998669207 Epoch 377: Train acc: 0.7098641986791926, Train loss: 0.00872346634758244 |Validation acc: 0.7043185763888888, Validation loss: 0.008933572911101915 Epoch 378: Train acc: 0.7133367438687874, Train loss: 0.00880185824691785 |Validation acc: 0.7059823495370371, Validation loss: 0.008482917202277335 Epoch 379: Train acc: 0.7129181781539702, Train loss: 0.008638362451359762 |Validation acc: 0.7059461805555556, Validation loss: 0.008806099516176549 Epoch 380: Train acc: 0.7115694664062258, Train loss: 0.009011639809948931 |Validation acc: 0.7058015046296297, Validation loss: 0.008695961576568665 Epoch 381: Train acc: 0.7117012370942238, Train loss: 0.008812008678459892 |Validation acc: 0.7059461805555556, Validation loss: 0.008629009953232963 Epoch 382: Train acc: 0.7019347037484885, Train loss: 0.009139664022069569 |Validation acc: 0.6969762731481481, Validation loss: 0.008906175960712024 Epoch 383: Train acc: 0.703562459306111, Train loss: 0.008950312792541852 |Validation acc: 0.6999059606481481, Validation loss: 0.008837584084872632 Epoch 384: Train acc: 0.713933587573249, Train loss: 0.008745825356176504 |Validation acc: 0.7081524884259259, Validation loss: 0.008425228080079401 Epoch 385: Train acc: 0.7119647784702198, Train loss: 0.008643956266299376 |Validation acc: 0.7048611111111112, Validation loss: 0.00886483510226586 Epoch 386: Train acc: 0.7136157876786655, Train loss: 0.00868781310788049 |Validation acc: 0.7082609953703703, Validation loss: 0.008823767142060823 Epoch 387: Train acc: 0.7062521315846588, Train loss: 0.008609314555528874 |Validation acc: 0.7017505787037037, Validation loss: 0.009060912194885645 Epoch 388: Train acc: 0.7130421976250271, Train loss: 0.008773705426006626 |Validation acc: 0.7065248842592593, Validation loss: 0.009018989836725265 Epoch 389: Train acc: 0.7128019098998543, Train loss: 0.008701576796036977 |Validation acc: 0.7060185185185185, Validation loss: 0.008589431576469488 Epoch 390: Train acc: 0.712251573497039, Train loss: 0.008537979646605227 |Validation acc: 0.7060185185185185, Validation loss: 0.008949934066900603 Epoch 391: Train acc: 0.7113601835488171, Train loss: 0.008555907045853068 |Validation acc: 0.7046440972222222, Validation loss: 0.00872127145517739 Epoch 392: Train acc: 0.7107245837596503, Train loss: 0.008847416677713969 |Validation acc: 0.7038845486111112, Validation loss: 0.008959819870180167 Epoch 393: Train acc: 0.7136467925464298, Train loss: 0.008681994629332945 |Validation acc: 0.7058738425925926, Validation loss: 0.008595597499826763 Epoch 394: Train acc: 0.7114144420674046, Train loss: 0.008376606594279232 |Validation acc: 0.7059823495370371, Validation loss: 0.00872328910819125 Epoch 395: Train acc: 0.7107633398443556, Train loss: 0.008318164352001485 |Validation acc: 0.7058376736111112, Validation loss: 0.008807540504339231 Epoch 396: Train acc: 0.7097711840758999, Train loss: 0.00844799989878645 |Validation acc: 0.7060546875, Validation loss: 0.008899239646353778 Epoch 397: Train acc: 0.7132049731807893, Train loss: 0.009051342774597093 |Validation acc: 0.705078125, Validation loss: 0.008457003899183932 Epoch 398: Train acc: 0.7121043003751589, Train loss: 0.008439318162253684 |Validation acc: 0.7067418981481481, Validation loss: 0.008382472924014846 Epoch 399: Train acc: 0.7127399001643258, Train loss: 0.008698361454592348 |Validation acc: 0.7055844907407407, Validation loss: 0.008368422680061853 Epoch 400: Train acc: 0.712763153815149, Train loss: 0.008888361051136998 |Validation acc: 0.7083333333333334, Validation loss: 0.008831118053179068 Epoch 401: Train acc: 0.7107168325427092, Train loss: 0.008528490306931142 |Validation acc: 0.7042824074074074, Validation loss: 0.008831839820574582 Epoch 402: Train acc: 0.7109803739187053, Train loss: 0.008834191826683433 |Validation acc: 0.7050419560185185, Validation loss: 0.008799955724857372 Epoch 403: Train acc: 0.7102517595262456, Train loss: 0.00871956536549113 |Validation acc: 0.7024377893518519, Validation loss: 0.008860172804041548 Epoch 404: Train acc: 0.7127011440796205, Train loss: 0.00871855670998 |Validation acc: 0.7052589699074074, Validation loss: 0.008839184144036486 Epoch 405: Train acc: 0.7140110997426596, Train loss: 0.009042316695360207 |Validation acc: 0.7071035879629629, Validation loss: 0.009034910125282071 Epoch 406: Train acc: 0.713414256038198, Train loss: 0.00852441741222687 |Validation acc: 0.7059100115740741, Validation loss: 0.008657174489601828 Epoch 407: Train acc: 0.7156233528664, Train loss: 0.008863810290242559 |Validation acc: 0.7085503472222222, Validation loss: 0.008788026232294495 Epoch 408: Train acc: 0.7098874523300158, Train loss: 0.008423123652397349 |Validation acc: 0.7030888310185185, Validation loss: 0.008679445530357011 Epoch 409: Train acc: 0.713538275509255, Train loss: 0.0084832624265598 |Validation acc: 0.7072844328703703, Validation loss: 0.008785529826278591 Epoch 410: Train acc: 0.7131817195299662, Train loss: 0.00893387576227991 |Validation acc: 0.7067057291666666, Validation loss: 0.008734555845217951 Epoch 411: Train acc: 0.7110423836542337, Train loss: 0.008565147390771513 |Validation acc: 0.7071397569444444, Validation loss: 0.008567436700493362 Epoch 412: Train acc: 0.7135537779431371, Train loss: 0.008753748370185273 |Validation acc: 0.7075014467592593, Validation loss: 0.008551895442952123 Epoch 413: Train acc: 0.7129569342386755, Train loss: 0.009012199074682125 |Validation acc: 0.7058376736111112, Validation loss: 0.008594656532398185 Epoch 414: Train acc: 0.7148559823892351, Train loss: 0.008628988679282875 |Validation acc: 0.7084780092592593, Validation loss: 0.00843541940621678 Epoch 415: Train acc: 0.7133832511704338, Train loss: 0.00886387125387213 |Validation acc: 0.7068142361111112, Validation loss: 0.008687299075163349 Epoch 416: Train acc: 0.7118407589991629, Train loss: 0.00899960643415635 |Validation acc: 0.7053313078703703, Validation loss: 0.008567148600552972 Epoch 417: Train acc: 0.7147707190028835, Train loss: 0.008611881319925366 |Validation acc: 0.708984375, Validation loss: 0.008655201211206902 Epoch 418: Train acc: 0.7109338666170589, Train loss: 0.009103807028609629 |Validation acc: 0.7043909143518519, Validation loss: 0.008843047572686738 Epoch 419: Train acc: 0.7100812327535423, Train loss: 0.008795775164979943 |Validation acc: 0.7045355902777778, Validation loss: 0.00863690117376826 Epoch 420: Train acc: 0.7144451678913589, Train loss: 0.00864279739633313 |Validation acc: 0.7065610532407407, Validation loss: 0.008400501095405185 Epoch 421: Train acc: 0.7109881251356462, Train loss: 0.008409468756949954 |Validation acc: 0.7065610532407407, Validation loss: 0.009062319659580993 Epoch 422: Train acc: 0.7143366508541841, Train loss: 0.008529200779622315 |Validation acc: 0.7057653356481481, Validation loss: 0.008422528347276836 Epoch 423: Train acc: 0.708872042910737, Train loss: 0.008724730248350196 |Validation acc: 0.7026186342592593, Validation loss: 0.008720485014752526 Epoch 424: Train acc: 0.7140498558273649, Train loss: 0.009013757567703503 |Validation acc: 0.7084056712962963, Validation loss: 0.008545065361547673 Epoch 425: Train acc: 0.7114144420674046, Train loss: 0.008871267097159248 |Validation acc: 0.7049696180555556, Validation loss: 0.008803704449525572 Epoch 426: Train acc: 0.7122670759309212, Train loss: 0.008677976451211716 |Validation acc: 0.7054398148148148, Validation loss: 0.008690636374957263 Epoch 427: Train acc: 0.7131274610113788, Train loss: 0.008867564812186519 |Validation acc: 0.7068142361111112, Validation loss: 0.008721537333954602 Epoch 428: Train acc: 0.7137863144513689, Train loss: 0.008452369065303078 |Validation acc: 0.7073567708333334, Validation loss: 0.008492198380992612 Epoch 429: Train acc: 0.7107788422782377, Train loss: 0.00848645564632971 |Validation acc: 0.7061993634259259, Validation loss: 0.008765906004307001 Epoch 430: Train acc: 0.7110268812203516, Train loss: 0.008541732693494515 |Validation acc: 0.7040292245370371, Validation loss: 0.009741475284707564 Epoch 431: Train acc: 0.7122128174123338, Train loss: 0.008704736922765344 |Validation acc: 0.7072482638888888, Validation loss: 0.008777795245495103 Epoch 432: Train acc: 0.7143754069388895, Train loss: 0.008694106632102978 |Validation acc: 0.7072120949074074, Validation loss: 0.008427691289419944 Epoch 433: Train acc: 0.7111121446067032, Train loss: 0.008624699123574072 |Validation acc: 0.7037037037037037, Validation loss: 0.008803315529080235 Epoch 434: Train acc: 0.7098254425944873, Train loss: 0.00884526096511002 |Validation acc: 0.7021846064814815, Validation loss: 0.008607612969077439 Epoch 435: Train acc: 0.7124376027036244, Train loss: 0.009031551440995331 |Validation acc: 0.7053674768518519, Validation loss: 0.00831969184745711 Epoch 436: Train acc: 0.7137785632344278, Train loss: 0.00855667856922622 |Validation acc: 0.7064525462962963, Validation loss: 0.008662761079191676 Epoch 437: Train acc: 0.7140188509596006, Train loss: 0.008654801677276853 |Validation acc: 0.7056929976851852, Validation loss: 0.008332905344366585 Epoch 438: Train acc: 0.7104687936005953, Train loss: 0.008594406249128746 |Validation acc: 0.7055844907407407, Validation loss: 0.008924762116612464 Epoch 439: Train acc: 0.7142048801661861, Train loss: 0.008236031832162413 |Validation acc: 0.7083695023148148, Validation loss: 0.008549939293154578 Epoch 440: Train acc: 0.7111896567761139, Train loss: 0.008722471037343454 |Validation acc: 0.7059823495370371, Validation loss: 0.008739388545765057 Epoch 441: Train acc: 0.7138483241868974, Train loss: 0.008330285726723093 |Validation acc: 0.7069589120370371, Validation loss: 0.00874246665807192 Epoch 442: Train acc: 0.7118950175177503, Train loss: 0.008924716749872448 |Validation acc: 0.7051866319444444, Validation loss: 0.008828810957821434 Epoch 443: Train acc: 0.7137088022819583, Train loss: 0.008659005882246116 |Validation acc: 0.7070674189814815, Validation loss: 0.008313995727976281 Epoch 444: Train acc: 0.7087170185719158, Train loss: 0.008812469948436898 |Validation acc: 0.7029441550925926, Validation loss: 0.008746615954390132 Epoch 445: Train acc: 0.7123523393172728, Train loss: 0.008520856987441771 |Validation acc: 0.7060908564814815, Validation loss: 0.008899417608418123 Epoch 446: Train acc: 0.7119492760363377, Train loss: 0.008622276008084902 |Validation acc: 0.7053674768518519, Validation loss: 0.008558096452574701 Epoch 447: Train acc: 0.7117865004805755, Train loss: 0.008619423347002985 |Validation acc: 0.7068504050925926, Validation loss: 0.008799976426748785 Epoch 448: Train acc: 0.7138560754038384, Train loss: 0.008519781097073319 |Validation acc: 0.7068142361111112, Validation loss: 0.008187361903079627 Epoch 449: Train acc: 0.7110656373050569, Train loss: 0.00831160203343705 |Validation acc: 0.7043185763888888, Validation loss: 0.008541919509341349 Epoch 450: Train acc: 0.7007255139056832, Train loss: 0.008910438305634772 |Validation acc: 0.6948423032407407, Validation loss: 0.008638398265825359 Epoch 451: Train acc: 0.7131739683130252, Train loss: 0.008205292636572829 |Validation acc: 0.7063440393518519, Validation loss: 0.008133779495446017 Epoch 452: Train acc: 0.7118407589991629, Train loss: 0.008015813377826787 |Validation acc: 0.7060908564814815, Validation loss: 0.008734162132053993 Epoch 453: Train acc: 0.7079108920100455, Train loss: 0.008446491448462937 |Validation acc: 0.7007378472222222, Validation loss: 0.00842428903954894 Epoch 454: Train acc: 0.7137785632344278, Train loss: 0.008023314078501495 |Validation acc: 0.7076822916666666, Validation loss: 0.008150139946534744 Epoch 455: Train acc: 0.7150187579449974, Train loss: 0.008078499068436973 |Validation acc: 0.7085503472222222, Validation loss: 0.008324902968271151 Epoch 456: Train acc: 0.7133832511704338, Train loss: 0.008336959089614031 |Validation acc: 0.7086588541666666, Validation loss: 0.008695209201961446 Epoch 457: Train acc: 0.7119802809041019, Train loss: 0.008066349293903976 |Validation acc: 0.70703125, Validation loss: 0.008364310787951999 Epoch 458: Train acc: 0.7135925340278424, Train loss: 0.008443131774127793 |Validation acc: 0.7076099537037037, Validation loss: 0.007917219779152943 Epoch 459: Train acc: 0.7140266021765417, Train loss: 0.00852370249709938 |Validation acc: 0.7081163194444444, Validation loss: 0.00842067701997683 Epoch 460: Train acc: 0.7149800018602921, Train loss: 0.008312340262719051 |Validation acc: 0.7079716435185185, Validation loss: 0.008282397420474435 Epoch 461: Train acc: 0.7147784702198245, Train loss: 0.008150002347078805 |Validation acc: 0.7075376157407407, Validation loss: 0.008531341515066937 Epoch 462: Train acc: 0.7131042073605556, Train loss: 0.007992313233776244 |Validation acc: 0.7051504629629629, Validation loss: 0.008204122642552596 Epoch 463: Train acc: 0.7151117725482901, Train loss: 0.008494003897654418 |Validation acc: 0.7081886574074074, Validation loss: 0.008068340441532632 Epoch 464: Train acc: 0.7150420115958206, Train loss: 0.008039792318405578 |Validation acc: 0.7069589120370371, Validation loss: 0.008066321032961902 Epoch 465: Train acc: 0.7160961770998047, Train loss: 0.008381229585578295 |Validation acc: 0.7090205439814815, Validation loss: 0.007932690685913409 Epoch 466: Train acc: 0.7152667968871113, Train loss: 0.008105906174250102 |Validation acc: 0.7089482060185185, Validation loss: 0.008083859127628388 Epoch 467: Train acc: 0.711988032121043, Train loss: 0.008262251431912802 |Validation acc: 0.7044632523148148, Validation loss: 0.008198981446238892 Epoch 468: Train acc: 0.7163752209096829, Train loss: 0.008310407777358322 |Validation acc: 0.7092013888888888, Validation loss: 0.007787491881650616 Epoch 469: Train acc: 0.7122670759309212, Train loss: 0.008290834140408375 |Validation acc: 0.7052589699074074, Validation loss: 0.00840812796610753 Epoch 470: Train acc: 0.7137088022819583, Train loss: 0.008083399895783126 |Validation acc: 0.7086226851851852, Validation loss: 0.008195304107307858 Epoch 471: Train acc: 0.7143676557219484, Train loss: 0.008369102998075658 |Validation acc: 0.7068504050925926, Validation loss: 0.007981660976889888 Epoch 472: Train acc: 0.7134762657737265, Train loss: 0.008877259630776213 |Validation acc: 0.7067057291666666, Validation loss: 0.008406366877954242 Epoch 473: Train acc: 0.715096270114408, Train loss: 0.008627445555156654 |Validation acc: 0.7094184027777778, Validation loss: 0.00833570775133765 Epoch 474: Train acc: 0.7105928130716522, Train loss: 0.008464797415828625 |Validation acc: 0.7043547453703703, Validation loss: 0.00846576385921315 Epoch 475: Train acc: 0.7072287849192324, Train loss: 0.008260419165289986 |Validation acc: 0.7010271990740741, Validation loss: 0.008021972333537056 Epoch 476: Train acc: 0.7117787492636344, Train loss: 0.008323768577303527 |Validation acc: 0.7055844907407407, Validation loss: 0.008357823813936566 Epoch 477: Train acc: 0.7117089883111648, Train loss: 0.008397420383962175 |Validation acc: 0.7038122106481481, Validation loss: 0.007808926539462424 Epoch 478: Train acc: 0.7066319412147707, Train loss: 0.008199171049144529 |Validation acc: 0.6994719328703703, Validation loss: 0.008052171861548364 Epoch 479: Train acc: 0.7115462127554026, Train loss: 0.008037880358758772 |Validation acc: 0.7056929976851852, Validation loss: 0.008037141102811084 Epoch 480: Train acc: 0.7114609493690509, Train loss: 0.008068601901363858 |Validation acc: 0.7041377314814815, Validation loss: 0.008553818820282066 Epoch 481: Train acc: 0.7079186432269866, Train loss: 0.008030721262091832 |Validation acc: 0.7023292824074074, Validation loss: 0.008143031565494592 Epoch 482: Train acc: 0.7039267665023409, Train loss: 0.008402731901764295 |Validation acc: 0.6978081597222222, Validation loss: 0.008764523133298365 Epoch 483: Train acc: 0.7138095681021921, Train loss: 0.008245966657692186 |Validation acc: 0.7075737847222222, Validation loss: 0.008402157835358373 Epoch 484: Train acc: 0.7111276470405854, Train loss: 0.008032515611173447 |Validation acc: 0.7043185763888888, Validation loss: 0.0080872627965918 Epoch 485: Train acc: 0.7100269742349549, Train loss: 0.008377913438828348 |Validation acc: 0.7042462384259259, Validation loss: 0.008426024186775884 Epoch 486: Train acc: 0.7092441013239078, Train loss: 0.0079355076230366 |Validation acc: 0.7015335648148148, Validation loss: 0.00811853909793169 Epoch 487: Train acc: 0.7103060180448331, Train loss: 0.008473934538701124 |Validation acc: 0.7041739004629629, Validation loss: 0.008301082512126124 Epoch 488: Train acc: 0.7141816265153629, Train loss: 0.008226987109892623 |Validation acc: 0.7080078125, Validation loss: 0.008041611768979613 Epoch 489: Train acc: 0.713546026726196, Train loss: 0.00797862881236331 |Validation acc: 0.7071397569444444, Validation loss: 0.008286845408109202 Epoch 490: Train acc: 0.715879143025455, Train loss: 0.008416727990829537 |Validation acc: 0.7097800925925926, Validation loss: 0.007976053505085784 Epoch 491: Train acc: 0.7077481164542834, Train loss: 0.007762196153203352 |Validation acc: 0.7022569444444444, Validation loss: 0.008027723784494912 Epoch 492: Train acc: 0.7140808606951291, Train loss: 0.00794776386128136 |Validation acc: 0.7072482638888888, Validation loss: 0.008265638303907053 Epoch 493: Train acc: 0.7091355842867331, Train loss: 0.007828360417918564 |Validation acc: 0.7022207754629629, Validation loss: 0.00810335655088705 Epoch 494: Train acc: 0.712894924503147, Train loss: 0.008132731135746668 |Validation acc: 0.7069589120370371, Validation loss: 0.008071756567280928 Epoch 495: Train acc: 0.7137475583666636, Train loss: 0.007926244527040719 |Validation acc: 0.7071759259259259, Validation loss: 0.008240721971957283 Epoch 496: Train acc: 0.7146156946640623, Train loss: 0.008297478594991326 |Validation acc: 0.7092013888888888, Validation loss: 0.00829241397577816 Epoch 497: Train acc: 0.7148249775214709, Train loss: 0.007938220996122243 |Validation acc: 0.7082609953703703, Validation loss: 0.008249482125436296 Epoch 498: Train acc: 0.7156156016494589, Train loss: 0.008187097386741674 |Validation acc: 0.7092375578703703, Validation loss: 0.008563910418214934 Epoch 499: Train acc: 0.7142048801661861, Train loss: 0.008005584972891238 |Validation acc: 0.7066333912037037, Validation loss: 0.008036585222758375 Epoch 500: Train acc: 0.7098176913775462, Train loss: 0.008257169116879827 |Validation acc: 0.7036313657407407, Validation loss: 0.00859138942862521 Epoch 501: Train acc: 0.7097556816420177, Train loss: 0.00832113098126535 |Validation acc: 0.7052951388888888, Validation loss: 0.008301947531856884 Epoch 502: Train acc: 0.7111431494744674, Train loss: 0.008096602699064403 |Validation acc: 0.7039568865740741, Validation loss: 0.008148893173673474 Epoch 503: Train acc: 0.71043003751589, Train loss: 0.00839548737490522 |Validation acc: 0.7041015625, Validation loss: 0.008434606425171215 Epoch 504: Train acc: 0.7114376957182278, Train loss: 0.008380091575026866 |Validation acc: 0.7058738425925926, Validation loss: 0.008366957123775467 Epoch 505: Train acc: 0.7093603695780237, Train loss: 0.007843292501370922 |Validation acc: 0.7022569444444444, Validation loss: 0.008087971200751975 Epoch 506: Train acc: 0.7109261154001179, Train loss: 0.008179047973329086 |Validation acc: 0.7040292245370371, Validation loss: 0.008233479993108339 Epoch 507: Train acc: 0.7097634328589588, Train loss: 0.008120697719882344 |Validation acc: 0.7030526620370371, Validation loss: 0.007808205552775004 Epoch 508: Train acc: 0.7123910954019781, Train loss: 0.008280019539073993 |Validation acc: 0.7060185185185185, Validation loss: 0.007950304715841655 Epoch 509: Train acc: 0.7128251635506775, Train loss: 0.008207212892452184 |Validation acc: 0.7061993634259259, Validation loss: 0.008110850053847676 Epoch 510: Train acc: 0.7149955042941741, Train loss: 0.0081586353909169 |Validation acc: 0.7071035879629629, Validation loss: 0.007748223938606127 Epoch 511: Train acc: 0.7133444950857285, Train loss: 0.008227202869282942 |Validation acc: 0.7059100115740741, Validation loss: 0.008154430200044586 Epoch 512: Train acc: 0.7147009580504139, Train loss: 0.008249093924900544 |Validation acc: 0.7104673032407407, Validation loss: 0.007754490642396606 Epoch 513: Train acc: 0.7116779834434006, Train loss: 0.0079921802453343 |Validation acc: 0.7057291666666666, Validation loss: 0.008438314151610261 Epoch 514: Train acc: 0.7114299445012867, Train loss: 0.008223621703916469 |Validation acc: 0.7062717013888888, Validation loss: 0.007924509313488131 Epoch 515: Train acc: 0.7147707190028835, Train loss: 0.008117437297036147 |Validation acc: 0.7097439236111112, Validation loss: 0.008200947142783719 Epoch 516: Train acc: 0.7129879391064398, Train loss: 0.008321369694164492 |Validation acc: 0.7059100115740741, Validation loss: 0.008032764368262198 Epoch 517: Train acc: 0.7108253495798841, Train loss: 0.00788938012443903 |Validation acc: 0.7046079282407407, Validation loss: 0.008507175985253928 Epoch 518: Train acc: 0.7112439152947013, Train loss: 0.008090490102906123 |Validation acc: 0.7053313078703703, Validation loss: 0.008367913274249222 Epoch 519: Train acc: 0.710298266827892, Train loss: 0.008046799237102005 |Validation acc: 0.7020760995370371, Validation loss: 0.008360721220646485 Epoch 520: Train acc: 0.7133599975196105, Train loss: 0.007824066207669565 |Validation acc: 0.7065248842592593, Validation loss: 0.008193519648346905 Epoch 521: Train acc: 0.7130732024927914, Train loss: 0.00785097336736494 |Validation acc: 0.7065610532407407, Validation loss: 0.007938023026513063 Epoch 522: Train acc: 0.7100579791027192, Train loss: 0.008297154248086873 |Validation acc: 0.7049696180555556, Validation loss: 0.007930995300218728 Epoch 523: Train acc: 0.7096394133879019, Train loss: 0.00851647162503212 |Validation acc: 0.7035951967592593, Validation loss: 0.00804990754415798 Epoch 524: Train acc: 0.7144994264099463, Train loss: 0.008136929605620463 |Validation acc: 0.7093822337962963, Validation loss: 0.007834428830144137 Epoch 525: Train acc: 0.715747372337457, Train loss: 0.008098583858465715 |Validation acc: 0.7092375578703703, Validation loss: 0.008238770661168132 Epoch 526: Train acc: 0.7131119585774967, Train loss: 0.007998342677613703 |Validation acc: 0.7055121527777778, Validation loss: 0.00787729912614367 Epoch 527: Train acc: 0.7142358850339503, Train loss: 0.008022422117432607 |Validation acc: 0.7064887152777778, Validation loss: 0.008234105263601778 Epoch 528: Train acc: 0.7148172263045298, Train loss: 0.008287146934847008 |Validation acc: 0.7080439814814815, Validation loss: 0.00798921085457464 Epoch 529: Train acc: 0.7138560754038384, Train loss: 0.008025362914931085 |Validation acc: 0.7080078125, Validation loss: 0.00841288224694482 Epoch 530: Train acc: 0.7122748271478622, Train loss: 0.008202604235091886 |Validation acc: 0.7060908564814815, Validation loss: 0.008411996234457066 Epoch 531: Train acc: 0.7158946454593371, Train loss: 0.007906453643900616 |Validation acc: 0.7094184027777778, Validation loss: 0.007987908947140597 Epoch 532: Train acc: 0.715104021331349, Train loss: 0.008057501239602617 |Validation acc: 0.7081524884259259, Validation loss: 0.00814751149099928 Epoch 533: Train acc: 0.7095619012184913, Train loss: 0.008113536708062453 |Validation acc: 0.7034143518518519, Validation loss: 0.008674691659909637 Epoch 534: Train acc: 0.7128639196353828, Train loss: 0.008192621438849705 |Validation acc: 0.7078631365740741, Validation loss: 0.008094640832134585 Epoch 535: Train acc: 0.7082209406876879, Train loss: 0.007811989608975211 |Validation acc: 0.7029441550925926, Validation loss: 0.008440447394329866 Epoch 536: Train acc: 0.7136700461972529, Train loss: 0.00801131485005183 |Validation acc: 0.7069950810185185, Validation loss: 0.007781470315365082 Epoch 537: Train acc: 0.7125693733916225, Train loss: 0.0084614439892309 |Validation acc: 0.7060908564814815, Validation loss: 0.008420826583957017 Epoch 538: Train acc: 0.7114997054537563, Train loss: 0.008230074422809817 |Validation acc: 0.7052228009259259, Validation loss: 0.008115966373899792 Epoch 539: Train acc: 0.7082907016401575, Train loss: 0.008225708694172365 |Validation acc: 0.7012803819444444, Validation loss: 0.00781017568346544 Epoch 540: Train acc: 0.7143444020711252, Train loss: 0.008008853862620338 |Validation acc: 0.7078993055555556, Validation loss: 0.008326673266016367 Epoch 541: Train acc: 0.715607850432518, Train loss: 0.007982186681538467 |Validation acc: 0.7092737268518519, Validation loss: 0.007990606136078385 Epoch 542: Train acc: 0.7093138622763774, Train loss: 0.008088733946340772 |Validation acc: 0.7042462384259259, Validation loss: 0.007791848413823089 Epoch 543: Train acc: 0.7149179921247636, Train loss: 0.00823356460942956 |Validation acc: 0.7100694444444444, Validation loss: 0.00791335068656911 Epoch 544: Train acc: 0.7156543577341643, Train loss: 0.00800734137817775 |Validation acc: 0.7077907986111112, Validation loss: 0.007967381070724493 Epoch 545: Train acc: 0.7160264161473351, Train loss: 0.008297521322523451 |Validation acc: 0.7092737268518519, Validation loss: 0.0077012340491223056 Epoch 546: Train acc: 0.7144374166744178, Train loss: 0.008095132497219418 |Validation acc: 0.7078269675925926, Validation loss: 0.00802255831230487 Epoch 547: Train acc: 0.715483830961461, Train loss: 0.008356815295912966 |Validation acc: 0.7087311921296297, Validation loss: 0.008140290031646232 Epoch 548: Train acc: 0.7106083155055344, Train loss: 0.008113146188892756 |Validation acc: 0.7053313078703703, Validation loss: 0.008310081638279716 Epoch 549: Train acc: 0.7135925340278424, Train loss: 0.008299276823432181 |Validation acc: 0.7073206018518519, Validation loss: 0.00818860384176875 Epoch 550: Train acc: 0.7138483241868974, Train loss: 0.008215549652732754 |Validation acc: 0.7056929976851852, Validation loss: 0.008006410677406041 Epoch 551: Train acc: 0.7065311753945369, Train loss: 0.008149430239352036 |Validation acc: 0.7000144675925926, Validation loss: 0.008103119905137122 Epoch 552: Train acc: 0.715359811490404, Train loss: 0.007657063901783672 |Validation acc: 0.7088035300925926, Validation loss: 0.007746877652407798 Epoch 553: Train acc: 0.7141583728645398, Train loss: 0.008170248668375549 |Validation acc: 0.7072844328703703, Validation loss: 0.00819861965229077 Epoch 554: Train acc: 0.7086317551855641, Train loss: 0.007901800769444788 |Validation acc: 0.7002314814814815, Validation loss: 0.008492632368330786 Epoch 555: Train acc: 0.7151195237652311, Train loss: 0.007877851173817802 |Validation acc: 0.7081886574074074, Validation loss: 0.007984147017105906 Epoch 556: Train acc: 0.7142203826000683, Train loss: 0.00794766349607432 |Validation acc: 0.7087311921296297, Validation loss: 0.007913640186947823 Epoch 557: Train acc: 0.7128639196353828, Train loss: 0.008097640978647755 |Validation acc: 0.7056929976851852, Validation loss: 0.008098029899093093 Epoch 558: Train acc: 0.7156543577341643, Train loss: 0.008076406327885982 |Validation acc: 0.7085865162037037, Validation loss: 0.007943746474922499 Epoch 559: Train acc: 0.711608222490931, Train loss: 0.008057094056805932 |Validation acc: 0.7053674768518519, Validation loss: 0.007883015596542718 Epoch 560: Train acc: 0.7121663101106874, Train loss: 0.007936255028056815 |Validation acc: 0.7069589120370371, Validation loss: 0.008176978614640033 Epoch 561: Train acc: 0.7135150218584317, Train loss: 0.007981057041835935 |Validation acc: 0.7082971643518519, Validation loss: 0.007891947429113156 Epoch 562: Train acc: 0.7132902365671411, Train loss: 0.008248565646678828 |Validation acc: 0.7062355324074074, Validation loss: 0.008389912031657265 Epoch 563: Train acc: 0.7149412457755868, Train loss: 0.008040991953079443 |Validation acc: 0.7068865740740741, Validation loss: 0.008041912589625673 Epoch 564: Train acc: 0.715367562707345, Train loss: 0.008039485980295065 |Validation acc: 0.7075376157407407, Validation loss: 0.008204347226707934 Epoch 565: Train acc: 0.7149955042941741, Train loss: 0.008061888858465925 |Validation acc: 0.7088396990740741, Validation loss: 0.00812805868969893 Epoch 566: Train acc: 0.7167240256720305, Train loss: 0.007879626243554873 |Validation acc: 0.7101417824074074, Validation loss: 0.008086765491754612 Epoch 567: Train acc: 0.7109183641831768, Train loss: 0.00829821227405784 |Validation acc: 0.7058738425925926, Validation loss: 0.008220098274331596 Epoch 568: Train acc: 0.7151195237652311, Train loss: 0.007970850084955287 |Validation acc: 0.7090928819444444, Validation loss: 0.008175069708045494 Epoch 569: Train acc: 0.7119802809041019, Train loss: 0.007817839646092907 |Validation acc: 0.7069227430555556, Validation loss: 0.00815541152386354 Epoch 570: Train acc: 0.7158636405915729, Train loss: 0.007768276339612393 |Validation acc: 0.7090928819444444, Validation loss: 0.007965835095977394 Epoch 571: Train acc: 0.7141738752984218, Train loss: 0.008212764593371873 |Validation acc: 0.7067057291666666, Validation loss: 0.008383263667315819 Epoch 572: Train acc: 0.714197128949245, Train loss: 0.008062309631801457 |Validation acc: 0.7078631365740741, Validation loss: 0.008094759226171437 Epoch 573: Train acc: 0.7111121446067032, Train loss: 0.008146443289569205 |Validation acc: 0.7063440393518519, Validation loss: 0.007968324350568988 Epoch 574: Train acc: 0.7112516665116423, Train loss: 0.007923349188170907 |Validation acc: 0.7038122106481481, Validation loss: 0.007920958751878903 Epoch 575: Train acc: 0.7155923479986358, Train loss: 0.008331782532750853 |Validation acc: 0.7095630787037037, Validation loss: 0.007830035899011335 Epoch 576: Train acc: 0.7140033485257186, Train loss: 0.008184306503851133 |Validation acc: 0.7085865162037037, Validation loss: 0.00793874467714781 Epoch 577: Train acc: 0.7163674696927418, Train loss: 0.008329983991335867 |Validation acc: 0.7084418402777778, Validation loss: 0.00788335090237794 Epoch 578: Train acc: 0.7159101478932193, Train loss: 0.008356931402406016 |Validation acc: 0.7087673611111112, Validation loss: 0.008505778955793124 Epoch 579: Train acc: 0.7166077574179146, Train loss: 0.008269993335461846 |Validation acc: 0.7089120370370371, Validation loss: 0.008413615414751168 Epoch 580: Train acc: 0.7155225870461662, Train loss: 0.007960739776282087 |Validation acc: 0.7086588541666666, Validation loss: 0.007961971858704259 Epoch 581: Train acc: 0.7137630608005456, Train loss: 0.007999769320092455 |Validation acc: 0.7078631365740741, Validation loss: 0.008091770862823335 Epoch 582: Train acc: 0.710693578891886, Train loss: 0.007845491119757162 |Validation acc: 0.7038483796296297, Validation loss: 0.008210838540216758 Epoch 583: Train acc: 0.7115617151892847, Train loss: 0.008014757615218398 |Validation acc: 0.7055121527777778, Validation loss: 0.007899522581704248 Epoch 584: Train acc: 0.7135150218584317, Train loss: 0.007921108878590719 |Validation acc: 0.7058376736111112, Validation loss: 0.007838174892805009 Epoch 585: Train acc: 0.70874802343968, Train loss: 0.00775050432683806 |Validation acc: 0.7004484953703703, Validation loss: 0.007839240008710887 Epoch 586: Train acc: 0.7159644064118067, Train loss: 0.007972046539452734 |Validation acc: 0.7084418402777778, Validation loss: 0.00824222594460898 Epoch 587: Train acc: 0.7131119585774967, Train loss: 0.008035919323663064 |Validation acc: 0.7081886574074074, Validation loss: 0.008140263246449722 Epoch 588: Train acc: 0.7157008650358107, Train loss: 0.007919789555839067 |Validation acc: 0.7103587962962963, Validation loss: 0.00793070450994443 Epoch 589: Train acc: 0.7082984528570986, Train loss: 0.008333494546837022 |Validation acc: 0.7026548032407407, Validation loss: 0.0076290217845891364 Epoch 590: Train acc: 0.7144839239760642, Train loss: 0.008261469169312575 |Validation acc: 0.7070674189814815, Validation loss: 0.007799347734095346 Epoch 591: Train acc: 0.7160496697981583, Train loss: 0.008073500136482786 |Validation acc: 0.7088035300925926, Validation loss: 0.008157512766532931 Epoch 592: Train acc: 0.716778284190618, Train loss: 0.008127955468343875 |Validation acc: 0.7103949652777778, Validation loss: 0.007847948099323479 Epoch 593: Train acc: 0.7145304312777107, Train loss: 0.008006167756283008 |Validation acc: 0.7080439814814815, Validation loss: 0.008004808906902413 Epoch 594: Train acc: 0.7164604842960345, Train loss: 0.008020898251924166 |Validation acc: 0.7101779513888888, Validation loss: 0.007741268924561824 Epoch 595: Train acc: 0.7163597184758007, Train loss: 0.008349847482401291 |Validation acc: 0.7091290509259259, Validation loss: 0.008291035699202106 Epoch 596: Train acc: 0.7150497628127616, Train loss: 0.008236297733739063 |Validation acc: 0.7079354745370371, Validation loss: 0.007885360588369344 Epoch 597: Train acc: 0.7164294794282703, Train loss: 0.008146158196391312 |Validation acc: 0.7101417824074074, Validation loss: 0.007830566719025153 Epoch 598: Train acc: 0.7148869872569994, Train loss: 0.008055237506706964 |Validation acc: 0.7103226273148148, Validation loss: 0.008154946649502354 Epoch 599: Train acc: 0.7134685145567854, Train loss: 0.007842640846398402 |Validation acc: 0.7071035879629629, Validation loss: 0.0077712724374977525 Epoch 600: Train acc: 0.7151427774160544, Train loss: 0.00831199063814469 |Validation acc: 0.7076099537037037, Validation loss: 0.00820489215059344 Finished Training Total time elapsed: 1947.06 seconds
Final Training Accuracy: 0.7151427774160544 Final Validation Accuracy: 0.7076099537037037
test_loader = torch.utils.data.DataLoader(test_data, batch_size=64, shuffle=True)
test_acc = get_accuracy(model_5, test_loader)
print("The test accuracy of the best autoencoder model is", test_acc*100, "%")
The test accuracy of the best autoencoder model is 70.53674768518519 %
Based on the test accuracy alone, it is difficult to assess whether our model is actually performing well. We don't know whether a high accuracy is due to the simplicity of the problem, or if a poor accuracy is a result of the inherent difficulty of the problem.
It is therefore very important to be able to compare our model to at least one alternative. In particular, we consider a simple baseline model that is not very computationally expensive. Our neural network should at least outperform this baseline model. If our network is not much better than the baseline, then it is not doing well.
For our data imputation problem, consider the following baseline model: to predict a missing feature, the baseline model will look at the most common value of the feature in the training set.
For example, if the feature "marriage" is missing, then this model's prediction will be the most common value for "marriage" in the training set, which happens to be "Married-civ-spouse".
What would be the test accuracy of this baseline model?
baseline = {}
for col in df_not_missing:
baseline[col] = df[col].value_counts().idxmax()
baseline
{'age': 0.2602739726027397, 'capgain': 0.0, 'caploss': 0.0, 'edu': ' HS-grad', 'marriage': ' Married-civ-spouse', 'occupation': ' Prof-specialty', 'relationship': ' Husband', 'sex': ' Male', 'work': ' Private', 'workhr': 0.3979591836734694, 'yredu': 0.5333333333333333}
baseline_acc = sum(df_not_missing["marriage"] == baseline["marriage"])/len(df_not_missing)
print("The baseline model accuracy of the \"marriage\" feature is", baseline_acc*100, "%")
The baseline model accuracy of the "marriage" feature is 46.67947131974738 %
Answer:
As shown in the code above, the test accuracy would vary depending on the feature with this baseline model due to its dependency on the most common value of each feature. For example, the baseline model accuracy of the "marriage" feature is 46.68%
because 46.68%
of values for the feature are "Married-civ-spouse", which is the most common value.
How does your test accuracy from part (a) compared to your basline test accuracy in part (b)?
Answer:
The test accuracy of the autoencoder model is 70.54%
, which is much higher compared to the estimated test accuracy of taking the most common value, which is only 46.68%
.
Look at the first item in your test data. Do you think it is reasonable for a human to be able to guess this person's education level based on their other features? Explain.
get_features(test_data[0])
{'edu': 'Bachelors', 'marriage': 'Divorced', 'occupation': 'Prof-specialty', 'relationship': 'Not-in-family', 'sex': 'Male', 'work': 'Private'}
Answer:
In my opinion it can be quite difficult to guess the person's education level based on their other features. Some speculations could be made based on the person's occupation. Since the person has an occupation in a professional specialty, I would guess that the person would at least have completed high school. Besides this connection, I cannot draw any other conclusions based on these features.
What is your model's prediction of this person's education level, given their other features?
test_edu = zero_out_feature(test_data[:1], "edu")[0]
predict = model_5(torch.from_numpy(test_edu))
get_feature(predict.detach().numpy(), "edu")
'Bachelors'
Answer:
The autoencoder model's prediction of this person's education level is "Bachelors", which is correct.
What is the baseline model's prediction of this person's education level?
baseline["edu"]
' HS-grad'
Answer:
The baseline model's prediction of this person's education level is "HS-grad", which is incorrect.