Skip to content
Snippets Groups Projects
Commit f117210d authored by Lanka Naga Sai Deep's avatar Lanka Naga Sai Deep
Browse files

Update ConfusionMatrix.png, inceptionv3.ipynb, acc_train.txt, acc_valid.txt,...

Update ConfusionMatrix.png, inceptionv3.ipynb, acc_train.txt, acc_valid.txt, helper_evaluation.py, helper_plotting.py, loss_train.txt, loss_valid.txt, stats.txt
parent 78c48c04
Branches main
No related tags found
No related merge requests found
ConfusionMatrix.png

7.46 KiB

60.59137725830078,71.66165161132812,76.8459701538086,81.20057678222656,84.1463394165039,85.36028289794922,87.16448974609375,88.48980712890625,89.44759368896484,90.41095733642578,91.26294708251953,91.27407836914062,91.45783996582031,92.3432388305664,92.52700805664062,93.01703643798828,93.25091552734375,93.71310424804688,93.8578872680664,93.65184783935547,94.06949615478516,94.53168487548828,94.26995849609375,94.40917205810547,94.62635040283203,94.77669525146484,94.9883041381836,95.22775268554688,95.1776351928711,95.48390197753906,95.51174926757812,95.52288055419922,95.62311553955078,95.84585571289062,95.82915496826172,95.84585571289062,95.95166015625,96.10201263427734,96.24679565429688,96.35816955566406,96.18553924560547,96.21895599365234,96.28577423095703,96.62545776367188,96.50294494628906,96.7646713256836,96.80364990234375,96.90388488769531,96.90388488769531,96.93729400634766,96.53636169433594,96.73126220703125,96.88160705566406,96.7646713256836,96.63102722167969,96.74796295166016,96.88160705566406,97.0263900756836,97.13219451904297,96.97627258300781,97.06536865234375,97.11548614501953,97.34379577636719,97.13776397705078,97.43846130371094,97.26026916503906,97.42733001708984,97.44403076171875,97.51085662841797,97.6556396484375,97.42176055908203,97.65007019042969,97.60552215576172,97.61109161376953,97.50528717041016,97.7837142944336,97.74473571777344,97.80599212646484,97.80042266845703,97.7892837524414,97.96190643310547,97.93963623046875,98.01202392578125,98.1623764038086,98.1623764038086,97.90621948242188,98.28488159179688,98.29045104980469,97.94520568847656,98.28488159179688,98.26818084716797,98.46864318847656,98.37954711914062,98.39625549316406,98.31272888183594,98.2960205078125,98.40739440917969,98.53546905517578,98.32386016845703,98.53546905517578,
\ No newline at end of file
72.81468963623047,74.82518005371094,54.16666793823242,53.263404846191406,42.16200637817383,88.5489501953125,57.7214469909668,30.09906768798828,86.85897827148438,84.73193359375,88.92774200439453,89.7727279663086,89.51049041748047,69.87179565429688,88.78205108642578,86.21794891357422,91.20046997070312,91.52098083496094,88.92774200439453,92.97785949707031,61.188812255859375,89.07342529296875,89.13170623779297,93.0361328125,82.22611236572266,91.89977264404297,82.10955810546875,92.22028350830078,93.85198211669922,92.22028350830078,94.2599105834961,93.26923370361328,91.05477905273438,93.06526947021484,92.62820434570312,94.11421966552734,93.4149169921875,93.9102554321289,93.61888122558594,94.34732055664062,94.49301147460938,92.5407943725586,93.4149169921875,94.2599105834961,94.46387481689453,94.28904724121094,94.93006896972656,94.05594635009766,94.2016372680664,94.72611236572266,94.23077392578125,94.37645721435547,93.79370880126953,94.43473052978516,95.10489654541016,93.96853637695312,94.90093231201172,94.43473052978516,95.10489654541016,93.47319793701172,94.23077392578125,94.60955810546875,93.18182373046875,94.28904724121094,95.22145080566406,94.46387481689453,93.50233459472656,93.706298828125,94.55128479003906,94.34732055664062,94.31818389892578,94.72611236572266,93.24009704589844,94.78438568115234,94.69696807861328,94.84265899658203,94.81352233886719,92.89044189453125,94.81352233886719,94.66783142089844,94.55128479003906,94.6386947631836,94.81352233886719,94.55128479003906,94.28904724121094,95.22145080566406,94.93006896972656,94.98834991455078,94.5804214477539,95.01748657226562,94.37645721435547,95.16316986083984,95.134033203125,94.93006896972656,94.6386947631836,93.76457214355469,94.49301147460938,95.04662322998047,94.52214813232422,94.60955810546875,
\ No newline at end of file
# imports from installed libraries
import os
import numpy as np
import random
import torch
from distutils.version import LooseVersion as Version
from itertools import product
from tqdm import tqdm
def set_all_seeds(seed):
os.environ["PL_GLOBAL_SEED"] = str(seed)
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
def set_deterministic():
if torch.cuda.is_available():
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
if torch.__version__ <= Version("1.7"):
torch.set_deterministic(True)
else:
torch.use_deterministic_algorithms(True)
def compute_accuracy(model, data_loader, device):
with torch.no_grad():
correct_pred, num_examples = 0, 0
for i, (features, targets) in enumerate(tqdm(data_loader)):
features = features.to(device)
targets = targets.float().to(device)
logits = model(features)
_, predicted_labels = torch.max(logits, 1)
num_examples += targets.size(0)
correct_pred += (predicted_labels == targets).sum()
return correct_pred.float()/num_examples * 100
def compute_confusion_matrix(model, data_loader, device):
all_targets, all_predictions = [], []
with torch.no_grad():
for i, (features, targets) in enumerate(data_loader):
features = features.to(device)
targets = targets
logits = model(features)
_, predicted_labels = torch.max(logits, 1)
all_targets.extend(targets.to('cpu'))
all_predictions.extend(predicted_labels.to('cpu'))
all_predictions = all_predictions
all_predictions = np.array(all_predictions)
all_targets = np.array(all_targets)
class_labels = np.unique(np.concatenate((all_targets, all_predictions)))
if class_labels.shape[0] == 1:
if class_labels[0] != 0:
class_labels = np.array([0, class_labels[0]])
else:
class_labels = np.array([class_labels[0], 1])
n_labels = class_labels.shape[0]
lst = []
z = list(zip(all_targets, all_predictions))
for combi in product(class_labels, repeat=2):
lst.append(z.count(combi))
mat = np.asarray(lst)[:, None].reshape(n_labels, n_labels)
return mat
\ No newline at end of file
# imports from installed libraries
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
def plot_training_loss(minibatch_loss_list, num_epochs, iter_per_epoch,
results_dir=None, averaging_iterations=100):
plt.figure()
ax1 = plt.subplot(1, 1, 1)
ax1.plot(range(len(minibatch_loss_list)),
(minibatch_loss_list), label='Minibatch Loss')
if len(minibatch_loss_list) > 1000:
ax1.set_ylim([
0, np.max(minibatch_loss_list[1000:])*1.5
])
ax1.set_xlabel('Iterations')
ax1.set_ylabel('Loss')
ax1.plot(np.convolve(minibatch_loss_list,
np.ones(averaging_iterations,)/averaging_iterations,
mode='valid'),
label='Running Average')
ax1.legend()
###################
# Set scond x-axis
ax2 = ax1.twiny()
newlabel = list(range(num_epochs+1))
newpos = [e*iter_per_epoch for e in newlabel]
ax2.set_xticks(newpos[::10])
ax2.set_xticklabels(newlabel[::10])
ax2.xaxis.set_ticks_position('bottom')
ax2.xaxis.set_label_position('bottom')
ax2.spines['bottom'].set_position(('outward', 45))
ax2.set_xlabel('Epochs')
ax2.set_xlim(ax1.get_xlim())
###################
plt.tight_layout()
if results_dir is not None:
image_path = os.path.join(results_dir, 'plot_training_loss.pdf')
plt.savefig(image_path)
def plot_accuracy(train_acc_list, valid_acc_list, results_dir):
num_epochs = len(train_acc_list)
plt.plot(np.arange(1, num_epochs+1),
train_acc_list, label='Training')
plt.plot(np.arange(1, num_epochs+1),
valid_acc_list, label='Validation')
plt.xlabel('Epoch')
plt.ylabel('Accuracy')
plt.legend()
plt.tight_layout()
if results_dir is not None:
image_path = os.path.join(
results_dir, 'plot_acc_training_validation.pdf')
plt.savefig(image_path)
def show_examples(model, data_loader, unnormalizer=None, class_dict=None):
for batch_idx, (features, targets) in enumerate(data_loader):
with torch.no_grad():
features = features
targets = targets
logits = model(features)
predictions = torch.argmax(logits, dim=1)
break
fig, axes = plt.subplots(nrows=3, ncols=5,
sharex=True, sharey=True)
if unnormalizer is not None:
for idx in range(features.shape[0]):
features[idx] = unnormalizer(features[idx])
nhwc_img = np.transpose(features, axes=(0, 2, 3, 1))
if nhwc_img.shape[-1] == 1:
nhw_img = np.squeeze(nhwc_img.numpy(), axis=3)
for idx, ax in enumerate(axes.ravel()):
ax.imshow(nhw_img[idx], cmap='binary')
if class_dict is not None:
ax.title.set_text(f'P: {class_dict[predictions[idx].item()]}'
f'\nT: {class_dict[targets[idx].item()]}')
else:
ax.title.set_text(f'P: {predictions[idx]} | T: {targets[idx]}')
ax.axison = False
else:
for idx, ax in enumerate(axes.ravel()):
ax.imshow(nhwc_img[idx])
if class_dict is not None:
ax.title.set_text(f'P: {class_dict[predictions[idx].item()]}'
f'\nT: {class_dict[targets[idx].item()]}')
else:
ax.title.set_text(f'P: {predictions[idx]} | T: {targets[idx]}')
ax.axison = False
plt.tight_layout()
plt.show()
def plot_confusion_matrix(conf_mat,
hide_spines=False,
hide_ticks=False,
figsize=None,
cmap=None,
colorbar=False,
show_absolute=True,
show_normed=False,
class_names=None):
if not (show_absolute or show_normed):
raise AssertionError('Both show_absolute and show_normed are False')
if class_names is not None and len(class_names) != len(conf_mat):
raise AssertionError('len(class_names) should be equal to number of'
'classes in the dataset')
total_samples = conf_mat.sum(axis=1)[:, np.newaxis]
normed_conf_mat = conf_mat.astype('float') / total_samples
fig, ax = plt.subplots(figsize=figsize)
ax.grid(False)
if cmap is None:
cmap = plt.cm.Blues
if figsize is None:
figsize = (len(conf_mat)*1.25, len(conf_mat)*1.25)
if show_normed:
matshow = ax.matshow(normed_conf_mat, cmap=cmap)
else:
matshow = ax.matshow(conf_mat, cmap=cmap)
if colorbar:
fig.colorbar(matshow)
for i in range(conf_mat.shape[0]):
for j in range(conf_mat.shape[1]):
cell_text = ""
if show_absolute:
cell_text += format(conf_mat[i, j], 'd')
if show_normed:
cell_text += "\n" + '('
cell_text += format(normed_conf_mat[i, j], '.2f') + ')'
else:
cell_text += format(normed_conf_mat[i, j], '.2f')
ax.text(x=j,
y=i,
s=cell_text,
va='center',
ha='center',
color="white" if normed_conf_mat[i, j] > 0.5 else "black")
if class_names is not None:
tick_marks = np.arange(len(class_names))
plt.xticks(tick_marks, class_names, rotation=90)
plt.yticks(tick_marks, class_names)
if hide_spines:
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
if hide_ticks:
ax.axes.get_yaxis().set_ticks([])
ax.axes.get_xaxis().set_ticks([])
plt.xlabel('predicted label')
plt.ylabel('true label')
return fig, ax
\ No newline at end of file
This diff is collapsed.
1.1035438804806341,0.7226075545878446,0.5927857020558719,0.4855417087383751,0.42466082714937775,0.3899900257610249,0.33965107956475976,0.3088414678495286,0.2893916949011927,0.26239258625865075,0.24367613917504974,0.236287816383571,0.23417071717115065,0.21140513792742907,0.20538419038578473,0.19501896397021903,0.18287320016237196,0.17879659134323164,0.171295881071395,0.17367128944810054,0.16889888298814962,0.15593305252522763,0.16150809311312375,0.14889712126819024,0.14728439946149172,0.14183516678818942,0.14214308556186903,0.13260898183909905,0.13150178402533158,0.12626396362086523,0.1243195203532862,0.12209497421210111,0.12278669627672056,0.11644445447141527,0.11643929763509502,0.11314545146687183,0.11227715401390395,0.1071929339383833,0.10536505841217854,0.1025733296694737,0.1052557724369013,0.10263119807659637,0.10232017596648244,0.09797717922651777,0.0962465678795243,0.09185824797468396,0.08947356818272058,0.09256357114334521,0.08656281119721079,0.08749571777711337,0.09165445734263657,0.09221583802063996,0.08847045124473309,0.08789863544174668,0.09500338172477096,0.09031265778825509,0.08620208682385942,0.08300438247726585,0.08226122751776815,0.08579505991390575,0.08214815120575526,0.07662939100897298,0.07747971859184274,0.07793970416078122,0.07176851012418552,0.07633045756118612,0.07321558582663341,0.07049886439466706,0.06958261082941226,0.06615839365227791,0.07073798872735443,0.06759932948314919,0.06808185780105781,0.0662040773194995,0.06631172326392323,0.060300969062300605,0.0631895532683778,0.06198645626303477,0.06146746539060868,0.061250413641016646,0.055994985836952726,0.05786731395727391,0.05508038126183864,0.05333144986953854,0.05195518812915562,0.05557021407121344,0.04761978305685298,0.04825140143763275,0.05780107012915506,0.0488213468202301,0.04786794898898365,0.04460614188660565,0.04528368343457531,0.04315999560623736,0.045449965668429,0.04930824305741191,0.04283826560632438,0.04108247859154013,0.04423610125145301,0.04032945076981576,
\ No newline at end of file
0.7362933201909512,0.6163856863236329,1.3273141826035384,1.5671682171401458,3.5975048998270522,0.3208140740501673,1.60716543938882,3.7727238974062614,0.3727143925575459,0.39486539538513027,0.30012787602620505,0.2645583272986157,0.28670598589140556,0.877864682356586,0.31970177022714447,0.3537218891526128,0.23517900836004693,0.23142625330760383,0.29114914753153515,0.19204040009411208,1.383013668015098,0.29187787832020173,0.30029773062818627,0.20152319045968844,0.5768455127529731,0.23056407164745374,0.5357079009287545,0.2149459716328706,0.1735658104628493,0.22748694864047736,0.15573396021900965,0.19751328618058758,0.25568632156248966,0.19130310058533873,0.21698788530739277,0.17937653658909178,0.1841336501966603,0.17111435995329394,0.17860585031031706,0.16341808670263447,0.1674421660797369,0.20584173513718435,0.19133936254487285,0.17769178415356504,0.15445901458264635,0.17249739720020704,0.16489796243608087,0.18674146796817262,0.18428602356302096,0.15860075746543972,0.17152209940613636,0.16037222628516629,0.2036763697891736,0.1687593689412151,0.14177400080895142,0.18278716804204703,0.14799000272867793,0.1600002346522127,0.14605365284565963,0.18423723773755435,0.17847097962048566,0.16315428260541065,0.22504110104722083,0.1685476378482461,0.1624539961414715,0.16267618834170236,0.21929416910379954,0.20767059386729905,0.20314688874566306,0.21894106984455217,0.1854989590078617,0.16438417145409634,0.20492887748025262,0.15864856163937738,0.17424752525398982,0.1800764260328554,0.17779819888212697,0.22541044369261604,0.16276436379049866,0.185863304678096,0.19503489832381585,0.1772332505598556,0.17212355645936103,0.18769453135639058,0.2188312843085706,0.16567276273672485,0.17063623352618648,0.20191060677620382,0.174123426197158,0.1821983714126591,0.21106482365035026,0.18981046517962916,0.19061526675608978,0.18479735974127254,0.21741512184906572,0.22110039089647493,0.20986085644259478,0.2100832273115594,0.20389257205650918,0.19798582192817635,
\ No newline at end of file
stats.txt 0 → 100644
Epoch 1 Training Loss: 1.1035438804806341 Validation Loss: 0.7362933201909512 time: 00:28:19
Train Accuracy : 60.59137725830078 Validation Accuracy : 72.81468963623047
Validation Loss Decreased( inf ---> 842.3195582984481 ) Saving The Model
100%|██████████| 1796/1796 [23:55<00:00, 1.25it/s]
100%|██████████| 1144/1144 [01:36<00:00, 11.89it/s]
Epoch 2 Training Loss: 0.7226075545878446 Validation Loss: 0.6163856863236329 time: 00:25:31
Train Accuracy : 71.66165161132812 Validation Accuracy : 74.82518005371094
Validation Loss Decreased( 842.3195582984481 ---> 705.145225154236 ) Saving The Model
100%|██████████| 1796/1796 [21:41<00:00, 1.38it/s]
100%|██████████| 1144/1144 [01:40<00:00, 11.41it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 3 Training Loss: 0.5927857020558719 Validation Loss: 1.3273141826035384 time: 00:23:21
Train Accuracy : 76.8459701538086 Validation Accuracy : 54.16666793823242
100%|██████████| 1796/1796 [22:25<00:00, 1.33it/s]
100%|██████████| 1144/1144 [01:44<00:00, 10.94it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 4 Training Loss: 0.4855417087383751 Validation Loss: 1.5671682171401458 time: 00:24:10
Train Accuracy : 81.20057678222656 Validation Accuracy : 53.263404846191406
100%|██████████| 1796/1796 [28:16<00:00, 1.06it/s]
100%|██████████| 1144/1144 [02:02<00:00, 9.31it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 5 Training Loss: 0.42466082714937775 Validation Loss: 3.5975048998270522 time: 00:30:19
Train Accuracy : 84.1463394165039 Validation Accuracy : 42.16200637817383
100%|██████████| 1796/1796 [27:13<00:00, 1.10it/s]
100%|██████████| 1144/1144 [01:59<00:00, 9.55it/s]
Epoch 6 Training Loss: 0.3899900257610249 Validation Loss: 0.3208140740501673 time: 00:29:13
Train Accuracy : 85.36028289794922 Validation Accuracy : 88.5489501953125
Validation Loss Decreased( 705.145225154236 ---> 367.0113007133914 ) Saving The Model
100%|██████████| 1796/1796 [28:05<00:00, 1.07it/s]
100%|██████████| 1144/1144 [02:03<00:00, 9.25it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 7 Training Loss: 0.33965107956475976 Validation Loss: 1.60716543938882 time: 00:30:09
Train Accuracy : 87.16448974609375 Validation Accuracy : 57.7214469909668
100%|██████████| 1796/1796 [28:21<00:00, 1.06it/s]
100%|██████████| 1144/1144 [02:05<00:00, 9.15it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 8 Training Loss: 0.3088414678495286 Validation Loss: 3.7727238974062614 time: 00:30:26
Train Accuracy : 88.48980712890625 Validation Accuracy : 30.09906768798828
100%|██████████| 1796/1796 [29:04<00:00, 1.03it/s]
100%|██████████| 1144/1144 [02:08<00:00, 8.92it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 9 Training Loss: 0.2893916949011927 Validation Loss: 0.3727143925575459 time: 00:31:12
Train Accuracy : 89.44759368896484 Validation Accuracy : 86.85897827148438
100%|██████████| 1796/1796 [28:35<00:00, 1.05it/s]
100%|██████████| 1144/1144 [02:06<00:00, 9.05it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 10 Training Loss: 0.26239258625865075 Validation Loss: 0.39486539538513027 time: 00:30:42
Train Accuracy : 90.41095733642578 Validation Accuracy : 84.73193359375
100%|██████████| 1796/1796 [27:55<00:00, 1.07it/s]
100%|██████████| 1144/1144 [01:46<00:00, 10.72it/s]
Epoch 11 Training Loss: 0.24367613917504974 Validation Loss: 0.30012787602620505 time: 00:29:41
Train Accuracy : 91.26294708251953 Validation Accuracy : 88.92774200439453
Validation Loss Decreased( 367.0113007133914 ---> 343.34629017397856 ) Saving The Model
100%|██████████| 1796/1796 [22:31<00:00, 1.33it/s]
100%|██████████| 1144/1144 [01:41<00:00, 11.28it/s]
Epoch 12 Training Loss: 0.236287816383571 Validation Loss: 0.2645583272986157 time: 00:24:12
Train Accuracy : 91.27407836914062 Validation Accuracy : 89.7727279663086
Validation Loss Decreased( 343.34629017397856 ---> 302.6547264296164 ) Saving The Model
100%|██████████| 1796/1796 [23:48<00:00, 1.26it/s]
100%|██████████| 1144/1144 [02:04<00:00, 9.19it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 13 Training Loss: 0.23417071717115065 Validation Loss: 0.28670598589140556 time: 00:25:53
Train Accuracy : 91.45783996582031 Validation Accuracy : 89.51049041748047
100%|██████████| 1796/1796 [31:12<00:00, 1.04s/it]
100%|██████████| 1144/1144 [02:15<00:00, 8.45it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 14 Training Loss: 0.21140513792742907 Validation Loss: 0.877864682356586 time: 00:33:27
Train Accuracy : 92.3432388305664 Validation Accuracy : 69.87179565429688
100%|██████████| 1796/1796 [33:27<00:00, 1.12s/it]
100%|██████████| 1144/1144 [02:01<00:00, 9.45it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 15 Training Loss: 0.20538419038578473 Validation Loss: 0.31970177022714447 time: 00:35:28
Train Accuracy : 92.52700805664062 Validation Accuracy : 88.78205108642578
100%|██████████| 1796/1796 [25:01<00:00, 1.20it/s]
100%|██████████| 1144/1144 [01:51<00:00, 10.29it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 16 Training Loss: 0.19501896397021903 Validation Loss: 0.3537218891526128 time: 00:26:52
Train Accuracy : 93.01703643798828 Validation Accuracy : 86.21794891357422
100%|██████████| 1796/1796 [25:14<00:00, 1.19it/s]
100%|██████████| 1144/1144 [01:59<00:00, 9.54it/s]
Epoch 17 Training Loss: 0.18287320016237196 Validation Loss: 0.23517900836004693 time: 00:27:14
Train Accuracy : 93.25091552734375 Validation Accuracy : 91.20046997070312
Validation Loss Decreased( 302.6547264296164 ---> 269.0447855638937 ) Saving The Model
100%|██████████| 1796/1796 [27:46<00:00, 1.08it/s]
100%|██████████| 1144/1144 [02:08<00:00, 8.88it/s]
Epoch 18 Training Loss: 0.17879659134323164 Validation Loss: 0.23142625330760383 time: 00:29:55
Train Accuracy : 93.71310424804688 Validation Accuracy : 91.52098083496094
Validation Loss Decreased( 269.0447855638937 ---> 264.7516337838988 ) Saving The Model
100%|██████████| 1796/1796 [28:18<00:00, 1.06it/s]
100%|██████████| 1144/1144 [02:06<00:00, 9.08it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 19 Training Loss: 0.171295881071395 Validation Loss: 0.29114914753153515 time: 00:30:24
Train Accuracy : 93.8578872680664 Validation Accuracy : 88.92774200439453
100%|██████████| 1796/1796 [28:28<00:00, 1.05it/s]
100%|██████████| 1144/1144 [02:06<00:00, 9.02it/s]
Epoch 20 Training Loss: 0.17367128944810054 Validation Loss: 0.19204040009411208 time: 00:30:35
Train Accuracy : 93.65184783935547 Validation Accuracy : 92.97785949707031
Validation Loss Decreased( 264.7516337838988 ---> 219.69421770766422 ) Saving The Model
100%|██████████| 1796/1796 [25:03<00:00, 1.19it/s]
100%|██████████| 1144/1144 [01:36<00:00, 11.83it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 21 Training Loss: 0.16889888298814962 Validation Loss: 1.383013668015098 time: 00:26:40
Train Accuracy : 94.06949615478516 Validation Accuracy : 61.188812255859375
100%|██████████| 1796/1796 [21:21<00:00, 1.40it/s]
100%|██████████| 1144/1144 [01:37<00:00, 11.72it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 22 Training Loss: 0.15593305252522763 Validation Loss: 0.29187787832020173 time: 00:22:59
Train Accuracy : 94.53168487548828 Validation Accuracy : 89.07342529296875
100%|██████████| 1796/1796 [21:11<00:00, 1.41it/s]
100%|██████████| 1144/1144 [01:34<00:00, 12.09it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 23 Training Loss: 0.16150809311312375 Validation Loss: 0.30029773062818627 time: 00:22:46
Train Accuracy : 94.26995849609375 Validation Accuracy : 89.13170623779297
100%|██████████| 1796/1796 [21:04<00:00, 1.42it/s]
100%|██████████| 1144/1144 [01:35<00:00, 11.97it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 24 Training Loss: 0.14889712126819024 Validation Loss: 0.20152319045968844 time: 00:22:40
Train Accuracy : 94.40917205810547 Validation Accuracy : 93.0361328125
100%|██████████| 1796/1796 [21:27<00:00, 1.40it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.60it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 25 Training Loss: 0.14728439946149172 Validation Loss: 0.5768455127529731 time: 00:23:05
Train Accuracy : 94.62635040283203 Validation Accuracy : 82.22611236572266
100%|██████████| 1796/1796 [21:50<00:00, 1.37it/s]
100%|██████████| 1144/1144 [01:39<00:00, 11.49it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 26 Training Loss: 0.14183516678818942 Validation Loss: 0.23056407164745374 time: 00:23:30
Train Accuracy : 94.77669525146484 Validation Accuracy : 91.89977264404297
100%|██████████| 1796/1796 [22:00<00:00, 1.36it/s]
100%|██████████| 1144/1144 [01:39<00:00, 11.53it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 27 Training Loss: 0.14214308556186903 Validation Loss: 0.5357079009287545 time: 00:23:39
Train Accuracy : 94.9883041381836 Validation Accuracy : 82.10955810546875
100%|██████████| 1796/1796 [21:53<00:00, 1.37it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.67it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 28 Training Loss: 0.13260898183909905 Validation Loss: 0.2149459716328706 time: 00:23:31
Train Accuracy : 95.22775268554688 Validation Accuracy : 92.22028350830078
100%|██████████| 1796/1796 [21:31<00:00, 1.39it/s]
100%|██████████| 1144/1144 [01:35<00:00, 11.93it/s]
Epoch 29 Training Loss: 0.13150178402533158 Validation Loss: 0.1735658104628493 time: 00:23:07
Train Accuracy : 95.1776351928711 Validation Accuracy : 93.85198211669922
Validation Loss Decreased( 219.69421770766422 ---> 198.5592871694996 ) Saving The Model
100%|██████████| 1796/1796 [21:33<00:00, 1.39it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.62it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 30 Training Loss: 0.12626396362086523 Validation Loss: 0.22748694864047736 time: 00:23:12
Train Accuracy : 95.48390197753906 Validation Accuracy : 92.22028350830078
100%|██████████| 1796/1796 [21:39<00:00, 1.38it/s]
100%|██████████| 1144/1144 [01:36<00:00, 11.89it/s]
Epoch 31 Training Loss: 0.1243195203532862 Validation Loss: 0.15573396021900965 time: 00:23:15
Train Accuracy : 95.51174926757812 Validation Accuracy : 94.2599105834961
Validation Loss Decreased( 198.5592871694996 ---> 178.15965049054705 ) Saving The Model
100%|██████████| 1796/1796 [22:13<00:00, 1.35it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.56it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 32 Training Loss: 0.12209497421210111 Validation Loss: 0.19751328618058758 time: 00:23:52
Train Accuracy : 95.52288055419922 Validation Accuracy : 93.26923370361328
100%|██████████| 1796/1796 [21:36<00:00, 1.39it/s]
100%|██████████| 1144/1144 [01:36<00:00, 11.83it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 33 Training Loss: 0.12278669627672056 Validation Loss: 0.25568632156248966 time: 00:23:13
Train Accuracy : 95.62311553955078 Validation Accuracy : 91.05477905273438
100%|██████████| 1796/1796 [21:38<00:00, 1.38it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.62it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 34 Training Loss: 0.11644445447141527 Validation Loss: 0.19130310058533873 time: 00:23:17
Train Accuracy : 95.84585571289062 Validation Accuracy : 93.06526947021484
100%|██████████| 1796/1796 [21:47<00:00, 1.37it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.57it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 35 Training Loss: 0.11643929763509502 Validation Loss: 0.21698788530739277 time: 00:23:26
Train Accuracy : 95.82915496826172 Validation Accuracy : 92.62820434570312
100%|██████████| 1796/1796 [22:49<00:00, 1.31it/s]
100%|██████████| 1144/1144 [02:00<00:00, 9.53it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 36 Training Loss: 0.11314545146687183 Validation Loss: 0.17937653658909178 time: 00:24:49
Train Accuracy : 95.84585571289062 Validation Accuracy : 94.11421966552734
100%|██████████| 1796/1796 [28:41<00:00, 1.04it/s]
100%|██████████| 1144/1144 [02:09<00:00, 8.87it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 37 Training Loss: 0.11227715401390395 Validation Loss: 0.1841336501966603 time: 00:30:50
Train Accuracy : 95.95166015625 Validation Accuracy : 93.4149169921875
100%|██████████| 1796/1796 [30:40<00:00, 1.02s/it]
100%|██████████| 1144/1144 [02:10<00:00, 8.78it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 38 Training Loss: 0.1071929339383833 Validation Loss: 0.17111435995329394 time: 00:32:50
Train Accuracy : 96.10201263427734 Validation Accuracy : 93.9102554321289
100%|██████████| 1796/1796 [30:58<00:00, 1.04s/it]
100%|██████████| 1144/1144 [02:10<00:00, 8.74it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 39 Training Loss: 0.10536505841217854 Validation Loss: 0.17860585031031706 time: 00:33:09
Train Accuracy : 96.24679565429688 Validation Accuracy : 93.61888122558594
100%|██████████| 1796/1796 [31:15<00:00, 1.04s/it]
100%|██████████| 1144/1144 [02:11<00:00, 8.73it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 40 Training Loss: 0.1025733296694737 Validation Loss: 0.16341808670263447 time: 00:33:26
Train Accuracy : 96.35816955566406 Validation Accuracy : 94.34732055664062
100%|██████████| 1796/1796 [31:21<00:00, 1.05s/it]
100%|██████████| 1144/1144 [02:12<00:00, 8.66it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 41 Training Loss: 0.1052557724369013 Validation Loss: 0.1674421660797369 time: 00:33:34
Train Accuracy : 96.18553924560547 Validation Accuracy : 94.49301147460938
100%|██████████| 1796/1796 [26:26<00:00, 1.13it/s]
100%|██████████| 1144/1144 [02:00<00:00, 9.52it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 42 Training Loss: 0.10263119807659637 Validation Loss: 0.20584173513718435 time: 00:28:26
Train Accuracy : 96.21895599365234 Validation Accuracy : 92.5407943725586
100%|██████████| 1796/1796 [25:43<00:00, 1.16it/s]
100%|██████████| 1144/1144 [01:59<00:00, 9.55it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 43 Training Loss: 0.10232017596648244 Validation Loss: 0.19133936254487285 time: 00:27:43
Train Accuracy : 96.28577423095703 Validation Accuracy : 93.4149169921875
100%|██████████| 1796/1796 [22:16<00:00, 1.34it/s]
100%|██████████| 1144/1144 [01:33<00:00, 12.29it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 44 Training Loss: 0.09797717922651777 Validation Loss: 0.17769178415356504 time: 00:23:49
Train Accuracy : 96.62545776367188 Validation Accuracy : 94.2599105834961
100%|██████████| 1796/1796 [20:36<00:00, 1.45it/s]
100%|██████████| 1144/1144 [01:32<00:00, 12.39it/s]
Epoch 45 Training Loss: 0.0962465678795243 Validation Loss: 0.15445901458264635 time: 00:22:08
Train Accuracy : 96.50294494628906 Validation Accuracy : 94.46387481689453
Validation Loss Decreased( 178.15965049054705 ---> 176.70111268254743 ) Saving The Model
100%|██████████| 1796/1796 [20:28<00:00, 1.46it/s]
100%|██████████| 1144/1144 [01:33<00:00, 12.22it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 46 Training Loss: 0.09185824797468396 Validation Loss: 0.17249739720020704 time: 00:22:01
Train Accuracy : 96.7646713256836 Validation Accuracy : 94.28904724121094
100%|██████████| 1796/1796 [20:34<00:00, 1.45it/s]
100%|██████████| 1144/1144 [01:34<00:00, 12.11it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 47 Training Loss: 0.08947356818272058 Validation Loss: 0.16489796243608087 time: 00:22:09
Train Accuracy : 96.80364990234375 Validation Accuracy : 94.93006896972656
100%|██████████| 1796/1796 [21:01<00:00, 1.42it/s]
100%|██████████| 1144/1144 [01:35<00:00, 11.96it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 48 Training Loss: 0.09256357114334521 Validation Loss: 0.18674146796817262 time: 00:22:37
Train Accuracy : 96.90388488769531 Validation Accuracy : 94.05594635009766
100%|██████████| 1796/1796 [20:33<00:00, 1.46it/s]
100%|██████████| 1144/1144 [01:34<00:00, 12.05it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 49 Training Loss: 0.08656281119721079 Validation Loss: 0.18428602356302096 time: 00:22:08
Train Accuracy : 96.90388488769531 Validation Accuracy : 94.2016372680664
100%|██████████| 1796/1796 [21:04<00:00, 1.42it/s]
100%|██████████| 1144/1144 [01:38<00:00, 11.61it/s]
0%| | 0/1796 [00:00<?, ?it/s]
Epoch 50 Training Loss: 0.08749571777711337 Validation Loss: 0.15860075746543972 time: 00:22:43
Train Accuracy : 96.93729400634766 Validation Accuracy : 94.72611236572266
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment