Deep Learning Models -- A collection of various deep learning architectures, models, and tips for TensorFlow and PyTorch in Jupyter Notebooks.
%load_ext watermark
%watermark -a 'Sebastian Raschka' -v -p torch
Author: Sebastian Raschka Python implementation: CPython Python version : 3.8.8 IPython version : 7.21.0 torch: 1.8.1+cu111
import torch
import torchvision
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.insert(0, "..") # to include ../helper_evaluate.py etc.
# From local helper files
from helper_utils import set_all_seeds, set_deterministic
from helper_evaluate import compute_confusion_matrix, compute_accuracy
from helper_train import train_classifier_simple_v2
from helper_plotting import plot_training_loss, plot_accuracy, show_examples, plot_confusion_matrix
from helper_data import get_dataloaders_cifar10, UnNormalize
##########################
### SETTINGS
##########################
RANDOM_SEED = 123
BATCH_SIZE = 128
NUM_EPOCHS = 150
DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
set_all_seeds(RANDOM_SEED)
#set_deterministic()
##########################
### CIFAR-10 DATASET
##########################
### Note: Network trains about 2-3x faster if you don't
# resize (keeping the orig. 32x32 res.)
# Test acc. I got via the 32x32 was lower though; ~77%
train_transforms = torchvision.transforms.Compose([
torchvision.transforms.Resize((70, 70)),
torchvision.transforms.RandomCrop((64, 64)),
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
test_transforms = torchvision.transforms.Compose([
torchvision.transforms.Resize((70, 70)),
torchvision.transforms.CenterCrop((64, 64)),
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
train_loader, valid_loader, test_loader = get_dataloaders_cifar10(
batch_size=BATCH_SIZE,
validation_fraction=0.1,
train_transforms=train_transforms,
test_transforms=test_transforms,
num_workers=2)
# Checking the dataset
for images, labels in train_loader:
print('Image batch dimensions:', images.shape)
print('Image label dimensions:', labels.shape)
print('Class labels of 10 examples:', labels[:10])
break
Files already downloaded and verified Image batch dimensions: torch.Size([128, 3, 64, 64]) Image label dimensions: torch.Size([128]) Class labels of 10 examples: tensor([4, 7, 4, 6, 2, 6, 9, 7, 3, 0])
plt.figure(figsize=(8, 8))
plt.axis("off")
plt.title("Training Images")
plt.imshow(np.transpose(torchvision.utils.make_grid(images[:64],
padding=2, normalize=True),
(1, 2, 0)))
<matplotlib.image.AxesImage at 0x7feac55dd520>
##########################
### MODEL
##########################
model = torch.hub.load('pytorch/vision:v0.9.0', 'mobilenet_v3_small',
pretrained=False)
model.classifier[-1] = torch.nn.Linear(in_features=1024, # as in original
out_features=10) # number of class labels in Cifar-10)
model = model.to(DEVICE)
Using cache found in /home/raschka/.cache/torch/hub/pytorch_vision_v0.9.0
##########################
### MODEL
##########################
model = torch.hub.load('pytorch/vision:v0.9.0', 'mobilenet_v2',
pretrained=False)
model.classifier[-1] = torch.nn.Linear(in_features=1280, # as in original
out_features=10) # number of class labels in Cifar-10)
model = model.to(DEVICE)
Using cache found in /home/raschka/.cache/torch/hub/pytorch_vision_v0.9.0
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
minibatch_loss_list, train_acc_list, valid_acc_list = train_classifier_simple_v2(
model=model,
num_epochs=NUM_EPOCHS,
train_loader=train_loader,
valid_loader=valid_loader,
test_loader=test_loader,
optimizer=optimizer,
best_model_save_path='mobilenet-v2-best-1.pt',
device=DEVICE,
scheduler_on='valid_acc',
logging_interval=100)
plot_training_loss(minibatch_loss_list=minibatch_loss_list,
num_epochs=NUM_EPOCHS,
iter_per_epoch=len(train_loader),
results_dir=None,
averaging_iterations=200)
plt.show()
plot_accuracy(train_acc_list=train_acc_list,
valid_acc_list=valid_acc_list,
results_dir=None)
plt.ylim([60, 100])
plt.show()
Epoch: 001/150 | Batch 0000/0351 | Loss: 2.3692 Epoch: 001/150 | Batch 0100/0351 | Loss: 1.7399 Epoch: 001/150 | Batch 0200/0351 | Loss: 1.7337 Epoch: 001/150 | Batch 0300/0351 | Loss: 1.8543 Epoch: 001/150 | Train: 35.07% | Validation: 35.82% | Best Validation (Ep. 001): 35.82% Time elapsed: 0.86 min Epoch: 002/150 | Batch 0000/0351 | Loss: 1.6504 Epoch: 002/150 | Batch 0100/0351 | Loss: 1.6998 Epoch: 002/150 | Batch 0200/0351 | Loss: 1.6812 Epoch: 002/150 | Batch 0300/0351 | Loss: 1.6049 Epoch: 002/150 | Train: 43.60% | Validation: 43.74% | Best Validation (Ep. 002): 43.74% Time elapsed: 1.72 min Epoch: 003/150 | Batch 0000/0351 | Loss: 1.5176 Epoch: 003/150 | Batch 0100/0351 | Loss: 1.6701 Epoch: 003/150 | Batch 0200/0351 | Loss: 1.4299 Epoch: 003/150 | Batch 0300/0351 | Loss: 1.2884 Epoch: 003/150 | Train: 51.53% | Validation: 51.28% | Best Validation (Ep. 003): 51.28% Time elapsed: 2.58 min Epoch: 004/150 | Batch 0000/0351 | Loss: 1.1913 Epoch: 004/150 | Batch 0100/0351 | Loss: 1.3229 Epoch: 004/150 | Batch 0200/0351 | Loss: 1.3243 Epoch: 004/150 | Batch 0300/0351 | Loss: 1.2645 Epoch: 004/150 | Train: 56.24% | Validation: 56.16% | Best Validation (Ep. 004): 56.16% Time elapsed: 3.46 min Epoch: 005/150 | Batch 0000/0351 | Loss: 1.0227 Epoch: 005/150 | Batch 0100/0351 | Loss: 1.0595 Epoch: 005/150 | Batch 0200/0351 | Loss: 1.0355 Epoch: 005/150 | Batch 0300/0351 | Loss: 1.2859 Epoch: 005/150 | Train: 62.88% | Validation: 63.10% | Best Validation (Ep. 005): 63.10% Time elapsed: 4.32 min Epoch: 006/150 | Batch 0000/0351 | Loss: 0.9670 Epoch: 006/150 | Batch 0100/0351 | Loss: 1.0837 Epoch: 006/150 | Batch 0200/0351 | Loss: 0.9461 Epoch: 006/150 | Batch 0300/0351 | Loss: 0.9424 Epoch: 006/150 | Train: 52.37% | Validation: 53.12% | Best Validation (Ep. 005): 63.10% Time elapsed: 5.20 min Epoch: 007/150 | Batch 0000/0351 | Loss: 0.9730 Epoch: 007/150 | Batch 0100/0351 | Loss: 0.8154 Epoch: 007/150 | Batch 0200/0351 | Loss: 0.8336 Epoch: 007/150 | Batch 0300/0351 | Loss: 0.7399 Epoch: 007/150 | Train: 67.00% | Validation: 67.66% | Best Validation (Ep. 007): 67.66% Time elapsed: 6.06 min Epoch: 008/150 | Batch 0000/0351 | Loss: 0.7592 Epoch: 008/150 | Batch 0100/0351 | Loss: 0.8547 Epoch: 008/150 | Batch 0200/0351 | Loss: 0.8489 Epoch: 008/150 | Batch 0300/0351 | Loss: 0.7938 Epoch: 008/150 | Train: 72.27% | Validation: 71.40% | Best Validation (Ep. 008): 71.40% Time elapsed: 6.93 min Epoch: 009/150 | Batch 0000/0351 | Loss: 0.7434 Epoch: 009/150 | Batch 0100/0351 | Loss: 0.6382 Epoch: 009/150 | Batch 0200/0351 | Loss: 0.7434 Epoch: 009/150 | Batch 0300/0351 | Loss: 0.5128 Epoch: 009/150 | Train: 75.03% | Validation: 73.84% | Best Validation (Ep. 009): 73.84% Time elapsed: 7.79 min Epoch: 010/150 | Batch 0000/0351 | Loss: 0.5813 Epoch: 010/150 | Batch 0100/0351 | Loss: 0.7054 Epoch: 010/150 | Batch 0200/0351 | Loss: 0.7625 Epoch: 010/150 | Batch 0300/0351 | Loss: 0.7164 Epoch: 010/150 | Train: 77.20% | Validation: 76.62% | Best Validation (Ep. 010): 76.62% Time elapsed: 8.66 min Epoch: 011/150 | Batch 0000/0351 | Loss: 0.7189 Epoch: 011/150 | Batch 0100/0351 | Loss: 0.4702 Epoch: 011/150 | Batch 0200/0351 | Loss: 0.7412 Epoch: 011/150 | Batch 0300/0351 | Loss: 0.5919 Epoch: 011/150 | Train: 76.31% | Validation: 74.86% | Best Validation (Ep. 010): 76.62% Time elapsed: 9.53 min Epoch: 012/150 | Batch 0000/0351 | Loss: 0.7127 Epoch: 012/150 | Batch 0100/0351 | Loss: 0.5896 Epoch: 012/150 | Batch 0200/0351 | Loss: 0.5654 Epoch: 012/150 | Batch 0300/0351 | Loss: 0.4949 Epoch: 012/150 | Train: 80.35% | Validation: 79.04% | Best Validation (Ep. 012): 79.04% Time elapsed: 10.44 min Epoch: 013/150 | Batch 0000/0351 | Loss: 0.5763 Epoch: 013/150 | Batch 0100/0351 | Loss: 0.5745 Epoch: 013/150 | Batch 0200/0351 | Loss: 0.5589 Epoch: 013/150 | Batch 0300/0351 | Loss: 0.6949 Epoch: 013/150 | Train: 78.98% | Validation: 77.86% | Best Validation (Ep. 012): 79.04% Time elapsed: 11.31 min Epoch: 014/150 | Batch 0000/0351 | Loss: 0.6520 Epoch: 014/150 | Batch 0100/0351 | Loss: 0.4873 Epoch: 014/150 | Batch 0200/0351 | Loss: 0.4623 Epoch: 014/150 | Batch 0300/0351 | Loss: 0.5459 Epoch: 014/150 | Train: 81.25% | Validation: 79.72% | Best Validation (Ep. 014): 79.72% Time elapsed: 12.17 min Epoch: 015/150 | Batch 0000/0351 | Loss: 0.4355 Epoch: 015/150 | Batch 0100/0351 | Loss: 0.5277 Epoch: 015/150 | Batch 0200/0351 | Loss: 0.5896 Epoch: 015/150 | Batch 0300/0351 | Loss: 0.5777 Epoch: 015/150 | Train: 84.09% | Validation: 81.84% | Best Validation (Ep. 015): 81.84% Time elapsed: 13.03 min Epoch: 016/150 | Batch 0000/0351 | Loss: 0.4460 Epoch: 016/150 | Batch 0100/0351 | Loss: 0.5218 Epoch: 016/150 | Batch 0200/0351 | Loss: 0.5683 Epoch: 016/150 | Batch 0300/0351 | Loss: 0.5082 Epoch: 016/150 | Train: 82.59% | Validation: 80.46% | Best Validation (Ep. 015): 81.84% Time elapsed: 13.89 min Epoch: 017/150 | Batch 0000/0351 | Loss: 0.4247 Epoch: 017/150 | Batch 0100/0351 | Loss: 0.3870 Epoch: 017/150 | Batch 0200/0351 | Loss: 0.5071 Epoch: 017/150 | Batch 0300/0351 | Loss: 0.6037 Epoch: 017/150 | Train: 83.26% | Validation: 80.38% | Best Validation (Ep. 015): 81.84% Time elapsed: 14.75 min Epoch: 018/150 | Batch 0000/0351 | Loss: 0.4399 Epoch: 018/150 | Batch 0100/0351 | Loss: 0.4449 Epoch: 018/150 | Batch 0200/0351 | Loss: 0.4676 Epoch: 018/150 | Batch 0300/0351 | Loss: 0.5431 Epoch: 018/150 | Train: 83.80% | Validation: 80.44% | Best Validation (Ep. 015): 81.84% Time elapsed: 15.63 min Epoch: 019/150 | Batch 0000/0351 | Loss: 0.4103 Epoch: 019/150 | Batch 0100/0351 | Loss: 0.3843 Epoch: 019/150 | Batch 0200/0351 | Loss: 0.4179 Epoch: 019/150 | Batch 0300/0351 | Loss: 0.4919 Epoch: 019/150 | Train: 84.11% | Validation: 80.50% | Best Validation (Ep. 015): 81.84% Time elapsed: 16.51 min Epoch: 020/150 | Batch 0000/0351 | Loss: 0.5522 Epoch: 020/150 | Batch 0100/0351 | Loss: 0.3271 Epoch: 020/150 | Batch 0200/0351 | Loss: 0.3693 Epoch: 020/150 | Batch 0300/0351 | Loss: 0.5061 Epoch: 020/150 | Train: 87.20% | Validation: 82.66% | Best Validation (Ep. 020): 82.66% Time elapsed: 17.37 min Epoch: 021/150 | Batch 0000/0351 | Loss: 0.3792 Epoch: 021/150 | Batch 0100/0351 | Loss: 0.3229 Epoch: 021/150 | Batch 0200/0351 | Loss: 0.4606 Epoch: 021/150 | Batch 0300/0351 | Loss: 0.3971 Epoch: 021/150 | Train: 85.71% | Validation: 82.16% | Best Validation (Ep. 020): 82.66% Time elapsed: 18.24 min Epoch: 022/150 | Batch 0000/0351 | Loss: 0.2492 Epoch: 022/150 | Batch 0100/0351 | Loss: 0.2129 Epoch: 022/150 | Batch 0200/0351 | Loss: 0.2835 Epoch: 022/150 | Batch 0300/0351 | Loss: 0.3144 Epoch: 022/150 | Train: 83.39% | Validation: 80.02% | Best Validation (Ep. 020): 82.66% Time elapsed: 19.10 min Epoch: 023/150 | Batch 0000/0351 | Loss: 0.4545 Epoch: 023/150 | Batch 0100/0351 | Loss: 0.4287 Epoch: 023/150 | Batch 0200/0351 | Loss: 0.4463 Epoch: 023/150 | Batch 0300/0351 | Loss: 0.3120 Epoch: 023/150 | Train: 88.37% | Validation: 83.82% | Best Validation (Ep. 023): 83.82% Time elapsed: 20.02 min Epoch: 024/150 | Batch 0000/0351 | Loss: 0.4822 Epoch: 024/150 | Batch 0100/0351 | Loss: 0.3733 Epoch: 024/150 | Batch 0200/0351 | Loss: 0.4763 Epoch: 024/150 | Batch 0300/0351 | Loss: 0.5389 Epoch: 024/150 | Train: 86.10% | Validation: 81.92% | Best Validation (Ep. 023): 83.82% Time elapsed: 20.89 min Epoch: 025/150 | Batch 0000/0351 | Loss: 0.2415 Epoch: 025/150 | Batch 0100/0351 | Loss: 0.3500 Epoch: 025/150 | Batch 0200/0351 | Loss: 0.3641 Epoch: 025/150 | Batch 0300/0351 | Loss: 0.3182 Epoch: 025/150 | Train: 88.62% | Validation: 83.66% | Best Validation (Ep. 023): 83.82% Time elapsed: 21.76 min Epoch: 026/150 | Batch 0000/0351 | Loss: 0.4064 Epoch: 026/150 | Batch 0100/0351 | Loss: 0.4457 Epoch: 026/150 | Batch 0200/0351 | Loss: 0.5218 Epoch: 026/150 | Batch 0300/0351 | Loss: 0.5764 Epoch: 026/150 | Train: 87.76% | Validation: 83.38% | Best Validation (Ep. 023): 83.82% Time elapsed: 22.63 min Epoch: 027/150 | Batch 0000/0351 | Loss: 0.2614 Epoch: 027/150 | Batch 0100/0351 | Loss: 0.3178 Epoch: 027/150 | Batch 0200/0351 | Loss: 0.3174 Epoch: 027/150 | Batch 0300/0351 | Loss: 0.2870 Epoch: 027/150 | Train: 89.58% | Validation: 84.08% | Best Validation (Ep. 027): 84.08% Time elapsed: 23.51 min Epoch: 028/150 | Batch 0000/0351 | Loss: 0.3685 Epoch: 028/150 | Batch 0100/0351 | Loss: 0.3565 Epoch: 028/150 | Batch 0200/0351 | Loss: 0.2585 Epoch: 028/150 | Batch 0300/0351 | Loss: 0.3306 Epoch: 028/150 | Train: 89.52% | Validation: 83.72% | Best Validation (Ep. 027): 84.08% Time elapsed: 24.39 min Epoch: 029/150 | Batch 0000/0351 | Loss: 0.1689 Epoch: 029/150 | Batch 0100/0351 | Loss: 0.3759 Epoch: 029/150 | Batch 0200/0351 | Loss: 0.4033 Epoch: 029/150 | Batch 0300/0351 | Loss: 0.4485 Epoch: 029/150 | Train: 89.93% | Validation: 84.00% | Best Validation (Ep. 027): 84.08% Time elapsed: 25.26 min Epoch: 030/150 | Batch 0000/0351 | Loss: 0.2971 Epoch: 030/150 | Batch 0100/0351 | Loss: 0.3079 Epoch: 030/150 | Batch 0200/0351 | Loss: 0.3339 Epoch: 030/150 | Batch 0300/0351 | Loss: 0.2783 Epoch: 030/150 | Train: 91.36% | Validation: 84.94% | Best Validation (Ep. 030): 84.94% Time elapsed: 26.15 min Epoch: 031/150 | Batch 0000/0351 | Loss: 0.1887 Epoch: 031/150 | Batch 0100/0351 | Loss: 0.2952 Epoch: 031/150 | Batch 0200/0351 | Loss: 0.2241 Epoch: 031/150 | Batch 0300/0351 | Loss: 0.3261 Epoch: 031/150 | Train: 90.40% | Validation: 84.66% | Best Validation (Ep. 030): 84.94% Time elapsed: 27.02 min Epoch: 032/150 | Batch 0000/0351 | Loss: 0.2533 Epoch: 032/150 | Batch 0100/0351 | Loss: 0.3185 Epoch: 032/150 | Batch 0200/0351 | Loss: 0.2519 Epoch: 032/150 | Batch 0300/0351 | Loss: 0.3552 Epoch: 032/150 | Train: 90.74% | Validation: 84.26% | Best Validation (Ep. 030): 84.94% Time elapsed: 27.88 min Epoch: 033/150 | Batch 0000/0351 | Loss: 0.3155 Epoch: 033/150 | Batch 0100/0351 | Loss: 0.3487 Epoch: 033/150 | Batch 0200/0351 | Loss: 0.2020 Epoch: 033/150 | Batch 0300/0351 | Loss: 0.2945 Epoch: 033/150 | Train: 90.00% | Validation: 84.02% | Best Validation (Ep. 030): 84.94% Time elapsed: 28.74 min Epoch: 034/150 | Batch 0000/0351 | Loss: 0.2573 Epoch: 034/150 | Batch 0100/0351 | Loss: 0.2897 Epoch: 034/150 | Batch 0200/0351 | Loss: 0.2211 Epoch: 034/150 | Batch 0300/0351 | Loss: 0.2653 Epoch: 034/150 | Train: 91.52% | Validation: 84.84% | Best Validation (Ep. 030): 84.94% Time elapsed: 29.63 min Epoch: 035/150 | Batch 0000/0351 | Loss: 0.1810 Epoch: 035/150 | Batch 0100/0351 | Loss: 0.2115 Epoch: 035/150 | Batch 0200/0351 | Loss: 0.3424 Epoch: 035/150 | Batch 0300/0351 | Loss: 0.2928 Epoch: 035/150 | Train: 90.41% | Validation: 84.00% | Best Validation (Ep. 030): 84.94% Time elapsed: 30.50 min Epoch: 036/150 | Batch 0000/0351 | Loss: 0.1692 Epoch: 036/150 | Batch 0100/0351 | Loss: 0.2313 Epoch: 036/150 | Batch 0200/0351 | Loss: 0.3156 Epoch: 036/150 | Batch 0300/0351 | Loss: 0.2261 Epoch: 036/150 | Train: 90.41% | Validation: 83.96% | Best Validation (Ep. 030): 84.94% Time elapsed: 31.36 min Epoch: 037/150 | Batch 0000/0351 | Loss: 0.2431 Epoch: 037/150 | Batch 0100/0351 | Loss: 0.1006 Epoch: 037/150 | Batch 0200/0351 | Loss: 0.2682 Epoch: 037/150 | Batch 0300/0351 | Loss: 0.2071 Epoch: 037/150 | Train: 93.40% | Validation: 85.42% | Best Validation (Ep. 037): 85.42% Time elapsed: 32.21 min Epoch: 038/150 | Batch 0000/0351 | Loss: 0.2596 Epoch: 038/150 | Batch 0100/0351 | Loss: 0.2263 Epoch: 038/150 | Batch 0200/0351 | Loss: 0.2058 Epoch: 038/150 | Batch 0300/0351 | Loss: 0.2102 Epoch: 038/150 | Train: 93.50% | Validation: 86.14% | Best Validation (Ep. 038): 86.14% Time elapsed: 33.06 min Epoch: 039/150 | Batch 0000/0351 | Loss: 0.2108 Epoch: 039/150 | Batch 0100/0351 | Loss: 0.2511 Epoch: 039/150 | Batch 0200/0351 | Loss: 0.2016 Epoch: 039/150 | Batch 0300/0351 | Loss: 0.3840 Epoch: 039/150 | Train: 91.98% | Validation: 85.06% | Best Validation (Ep. 038): 86.14% Time elapsed: 33.93 min Epoch: 040/150 | Batch 0000/0351 | Loss: 0.2488 Epoch: 040/150 | Batch 0100/0351 | Loss: 0.2063 Epoch: 040/150 | Batch 0200/0351 | Loss: 0.2128 Epoch: 040/150 | Batch 0300/0351 | Loss: 0.3241 Epoch: 040/150 | Train: 89.09% | Validation: 82.06% | Best Validation (Ep. 038): 86.14% Time elapsed: 34.80 min Epoch: 041/150 | Batch 0000/0351 | Loss: 0.1167 Epoch: 041/150 | Batch 0100/0351 | Loss: 0.2869 Epoch: 041/150 | Batch 0200/0351 | Loss: 0.2452 Epoch: 041/150 | Batch 0300/0351 | Loss: 0.2792 Epoch: 041/150 | Train: 93.57% | Validation: 84.62% | Best Validation (Ep. 038): 86.14% Time elapsed: 35.68 min Epoch: 042/150 | Batch 0000/0351 | Loss: 0.3007 Epoch: 042/150 | Batch 0100/0351 | Loss: 0.1952 Epoch: 042/150 | Batch 0200/0351 | Loss: 0.1107 Epoch: 042/150 | Batch 0300/0351 | Loss: 0.2617 Epoch: 042/150 | Train: 93.93% | Validation: 85.88% | Best Validation (Ep. 038): 86.14% Time elapsed: 36.55 min Epoch: 043/150 | Batch 0000/0351 | Loss: 0.2771 Epoch: 043/150 | Batch 0100/0351 | Loss: 0.2831 Epoch: 043/150 | Batch 0200/0351 | Loss: 0.2344 Epoch: 043/150 | Batch 0300/0351 | Loss: 0.1679 Epoch: 043/150 | Train: 93.60% | Validation: 86.02% | Best Validation (Ep. 038): 86.14% Time elapsed: 37.44 min Epoch: 044/150 | Batch 0000/0351 | Loss: 0.2043 Epoch: 044/150 | Batch 0100/0351 | Loss: 0.2213 Epoch: 044/150 | Batch 0200/0351 | Loss: 0.1647 Epoch: 044/150 | Batch 0300/0351 | Loss: 0.2492 Epoch: 044/150 | Train: 93.70% | Validation: 85.42% | Best Validation (Ep. 038): 86.14% Time elapsed: 38.31 min Epoch: 045/150 | Batch 0000/0351 | Loss: 0.1570 Epoch: 045/150 | Batch 0100/0351 | Loss: 0.2081 Epoch: 045/150 | Batch 0200/0351 | Loss: 0.2272 Epoch: 045/150 | Batch 0300/0351 | Loss: 0.2297 Epoch: 045/150 | Train: 94.26% | Validation: 85.44% | Best Validation (Ep. 038): 86.14% Time elapsed: 39.17 min Epoch: 046/150 | Batch 0000/0351 | Loss: 0.3409 Epoch: 046/150 | Batch 0100/0351 | Loss: 0.1622 Epoch: 046/150 | Batch 0200/0351 | Loss: 0.2247 Epoch: 046/150 | Batch 0300/0351 | Loss: 0.0928 Epoch: 046/150 | Train: 93.34% | Validation: 84.48% | Best Validation (Ep. 038): 86.14% Time elapsed: 40.05 min Epoch: 047/150 | Batch 0000/0351 | Loss: 0.0986 Epoch: 047/150 | Batch 0100/0351 | Loss: 0.1063 Epoch: 047/150 | Batch 0200/0351 | Loss: 0.1660 Epoch: 047/150 | Batch 0300/0351 | Loss: 0.2307 Epoch: 047/150 | Train: 94.50% | Validation: 85.00% | Best Validation (Ep. 038): 86.14% Time elapsed: 40.93 min Epoch: 048/150 | Batch 0000/0351 | Loss: 0.2070 Epoch: 048/150 | Batch 0100/0351 | Loss: 0.2422 Epoch: 048/150 | Batch 0200/0351 | Loss: 0.2504 Epoch: 048/150 | Batch 0300/0351 | Loss: 0.2510 Epoch: 048/150 | Train: 94.40% | Validation: 84.74% | Best Validation (Ep. 038): 86.14% Time elapsed: 41.80 min Epoch: 049/150 | Batch 0000/0351 | Loss: 0.1933 Epoch: 049/150 | Batch 0100/0351 | Loss: 0.3011 Epoch: 049/150 | Batch 0200/0351 | Loss: 0.1541 Epoch: 049/150 | Batch 0300/0351 | Loss: 0.1396 Epoch: 049/150 | Train: 93.82% | Validation: 84.76% | Best Validation (Ep. 038): 86.14% Time elapsed: 42.69 min Epoch: 050/150 | Batch 0000/0351 | Loss: 0.1433 Epoch: 050/150 | Batch 0100/0351 | Loss: 0.2335 Epoch: 050/150 | Batch 0200/0351 | Loss: 0.2193 Epoch: 050/150 | Batch 0300/0351 | Loss: 0.1305 Epoch: 050/150 | Train: 94.20% | Validation: 84.52% | Best Validation (Ep. 038): 86.14% Time elapsed: 43.58 min Epoch: 051/150 | Batch 0000/0351 | Loss: 0.2408 Epoch: 051/150 | Batch 0100/0351 | Loss: 0.1739 Epoch: 051/150 | Batch 0200/0351 | Loss: 0.1410 Epoch: 051/150 | Batch 0300/0351 | Loss: 0.2697 Epoch: 051/150 | Train: 94.84% | Validation: 85.38% | Best Validation (Ep. 038): 86.14% Time elapsed: 44.46 min Epoch: 052/150 | Batch 0000/0351 | Loss: 0.2106 Epoch: 052/150 | Batch 0100/0351 | Loss: 0.2974 Epoch: 052/150 | Batch 0200/0351 | Loss: 0.1508 Epoch: 052/150 | Batch 0300/0351 | Loss: 0.1916 Epoch: 052/150 | Train: 95.75% | Validation: 85.40% | Best Validation (Ep. 038): 86.14% Time elapsed: 45.34 min Epoch: 053/150 | Batch 0000/0351 | Loss: 0.1363 Epoch: 053/150 | Batch 0100/0351 | Loss: 0.1154 Epoch: 053/150 | Batch 0200/0351 | Loss: 0.0859 Epoch: 053/150 | Batch 0300/0351 | Loss: 0.1401 Epoch: 053/150 | Train: 94.67% | Validation: 85.54% | Best Validation (Ep. 038): 86.14% Time elapsed: 46.23 min Epoch: 054/150 | Batch 0000/0351 | Loss: 0.0976 Epoch: 054/150 | Batch 0100/0351 | Loss: 0.1387 Epoch: 054/150 | Batch 0200/0351 | Loss: 0.1506 Epoch: 054/150 | Batch 0300/0351 | Loss: 0.1710 Epoch: 054/150 | Train: 94.46% | Validation: 85.14% | Best Validation (Ep. 038): 86.14% Time elapsed: 47.12 min Epoch: 055/150 | Batch 0000/0351 | Loss: 0.0890 Epoch: 055/150 | Batch 0100/0351 | Loss: 0.1103 Epoch: 055/150 | Batch 0200/0351 | Loss: 0.1358 Epoch: 055/150 | Batch 0300/0351 | Loss: 0.1107 Epoch: 055/150 | Train: 95.33% | Validation: 85.70% | Best Validation (Ep. 038): 86.14% Time elapsed: 47.97 min Epoch: 056/150 | Batch 0000/0351 | Loss: 0.1166 Epoch: 056/150 | Batch 0100/0351 | Loss: 0.1378 Epoch: 056/150 | Batch 0200/0351 | Loss: 0.1750 Epoch: 056/150 | Batch 0300/0351 | Loss: 0.0712 Epoch: 056/150 | Train: 94.18% | Validation: 84.24% | Best Validation (Ep. 038): 86.14% Time elapsed: 48.83 min Epoch: 057/150 | Batch 0000/0351 | Loss: 0.0717 Epoch: 057/150 | Batch 0100/0351 | Loss: 0.1219 Epoch: 057/150 | Batch 0200/0351 | Loss: 0.1949 Epoch: 057/150 | Batch 0300/0351 | Loss: 0.2855 Epoch: 057/150 | Train: 94.90% | Validation: 85.48% | Best Validation (Ep. 038): 86.14% Time elapsed: 49.73 min Epoch: 058/150 | Batch 0000/0351 | Loss: 0.0884 Epoch: 058/150 | Batch 0100/0351 | Loss: 0.1576 Epoch: 058/150 | Batch 0200/0351 | Loss: 0.1707 Epoch: 058/150 | Batch 0300/0351 | Loss: 0.1598 Epoch: 058/150 | Train: 95.49% | Validation: 85.24% | Best Validation (Ep. 038): 86.14% Time elapsed: 50.60 min Epoch: 059/150 | Batch 0000/0351 | Loss: 0.1494 Epoch: 059/150 | Batch 0100/0351 | Loss: 0.0857 Epoch: 059/150 | Batch 0200/0351 | Loss: 0.1301 Epoch: 059/150 | Batch 0300/0351 | Loss: 0.1563 Epoch: 059/150 | Train: 94.30% | Validation: 85.28% | Best Validation (Ep. 038): 86.14% Time elapsed: 51.47 min Epoch: 060/150 | Batch 0000/0351 | Loss: 0.1120 Epoch: 060/150 | Batch 0100/0351 | Loss: 0.1483 Epoch: 060/150 | Batch 0200/0351 | Loss: 0.1704 Epoch: 060/150 | Batch 0300/0351 | Loss: 0.1749 Epoch: 060/150 | Train: 94.92% | Validation: 85.10% | Best Validation (Ep. 038): 86.14% Time elapsed: 52.33 min Epoch: 061/150 | Batch 0000/0351 | Loss: 0.1248 Epoch: 061/150 | Batch 0100/0351 | Loss: 0.1340 Epoch: 061/150 | Batch 0200/0351 | Loss: 0.2045 Epoch: 061/150 | Batch 0300/0351 | Loss: 0.1270 Epoch: 061/150 | Train: 96.13% | Validation: 87.04% | Best Validation (Ep. 061): 87.04% Time elapsed: 53.23 min Epoch: 062/150 | Batch 0000/0351 | Loss: 0.1456 Epoch: 062/150 | Batch 0100/0351 | Loss: 0.1054 Epoch: 062/150 | Batch 0200/0351 | Loss: 0.1980 Epoch: 062/150 | Batch 0300/0351 | Loss: 0.1457 Epoch: 062/150 | Train: 96.32% | Validation: 86.04% | Best Validation (Ep. 061): 87.04% Time elapsed: 54.11 min Epoch: 063/150 | Batch 0000/0351 | Loss: 0.0745 Epoch: 063/150 | Batch 0100/0351 | Loss: 0.1966 Epoch: 063/150 | Batch 0200/0351 | Loss: 0.1626 Epoch: 063/150 | Batch 0300/0351 | Loss: 0.1017 Epoch: 063/150 | Train: 95.57% | Validation: 85.90% | Best Validation (Ep. 061): 87.04% Time elapsed: 55.00 min Epoch: 064/150 | Batch 0000/0351 | Loss: 0.0857 Epoch: 064/150 | Batch 0100/0351 | Loss: 0.1214 Epoch: 064/150 | Batch 0200/0351 | Loss: 0.1723 Epoch: 064/150 | Batch 0300/0351 | Loss: 0.0920 Epoch: 064/150 | Train: 96.53% | Validation: 86.40% | Best Validation (Ep. 061): 87.04% Time elapsed: 55.87 min Epoch: 065/150 | Batch 0000/0351 | Loss: 0.1086 Epoch: 065/150 | Batch 0100/0351 | Loss: 0.1098 Epoch: 065/150 | Batch 0200/0351 | Loss: 0.0685 Epoch: 065/150 | Batch 0300/0351 | Loss: 0.0853 Epoch: 065/150 | Train: 96.16% | Validation: 85.70% | Best Validation (Ep. 061): 87.04% Time elapsed: 56.73 min Epoch: 066/150 | Batch 0000/0351 | Loss: 0.1146 Epoch: 066/150 | Batch 0100/0351 | Loss: 0.0694 Epoch: 066/150 | Batch 0200/0351 | Loss: 0.0657 Epoch: 066/150 | Batch 0300/0351 | Loss: 0.1259 Epoch: 066/150 | Train: 95.72% | Validation: 85.42% | Best Validation (Ep. 061): 87.04% Time elapsed: 57.59 min Epoch: 067/150 | Batch 0000/0351 | Loss: 0.1188 Epoch: 067/150 | Batch 0100/0351 | Loss: 0.1046 Epoch: 067/150 | Batch 0200/0351 | Loss: 0.1335 Epoch: 067/150 | Batch 0300/0351 | Loss: 0.1908 Epoch: 067/150 | Train: 95.64% | Validation: 85.04% | Best Validation (Ep. 061): 87.04% Time elapsed: 58.46 min Epoch: 068/150 | Batch 0000/0351 | Loss: 0.1256 Epoch: 068/150 | Batch 0100/0351 | Loss: 0.1262 Epoch: 068/150 | Batch 0200/0351 | Loss: 0.1822 Epoch: 068/150 | Batch 0300/0351 | Loss: 0.1375 Epoch: 068/150 | Train: 96.51% | Validation: 86.22% | Best Validation (Ep. 061): 87.04% Time elapsed: 59.32 min Epoch: 069/150 | Batch 0000/0351 | Loss: 0.1065 Epoch: 069/150 | Batch 0100/0351 | Loss: 0.2004 Epoch: 069/150 | Batch 0200/0351 | Loss: 0.1515 Epoch: 069/150 | Batch 0300/0351 | Loss: 0.1177 Epoch: 069/150 | Train: 96.20% | Validation: 86.06% | Best Validation (Ep. 061): 87.04% Time elapsed: 60.19 min Epoch: 070/150 | Batch 0000/0351 | Loss: 0.0315 Epoch: 070/150 | Batch 0100/0351 | Loss: 0.0905 Epoch: 070/150 | Batch 0200/0351 | Loss: 0.1322 Epoch: 070/150 | Batch 0300/0351 | Loss: 0.1702 Epoch: 070/150 | Train: 96.78% | Validation: 85.64% | Best Validation (Ep. 061): 87.04% Time elapsed: 61.05 min Epoch: 071/150 | Batch 0000/0351 | Loss: 0.0906 Epoch: 071/150 | Batch 0100/0351 | Loss: 0.1472 Epoch: 071/150 | Batch 0200/0351 | Loss: 0.0835 Epoch: 071/150 | Batch 0300/0351 | Loss: 0.1483 Epoch: 071/150 | Train: 96.85% | Validation: 86.02% | Best Validation (Ep. 061): 87.04% Time elapsed: 61.91 min Epoch: 072/150 | Batch 0000/0351 | Loss: 0.0746 Epoch: 072/150 | Batch 0100/0351 | Loss: 0.1234 Epoch: 072/150 | Batch 0200/0351 | Loss: 0.1938 Epoch: 072/150 | Batch 0300/0351 | Loss: 0.1452 Epoch: 072/150 | Train: 96.76% | Validation: 85.96% | Best Validation (Ep. 061): 87.04% Time elapsed: 62.78 min Epoch: 073/150 | Batch 0000/0351 | Loss: 0.0544 Epoch: 073/150 | Batch 0100/0351 | Loss: 0.2118 Epoch: 073/150 | Batch 0200/0351 | Loss: 0.1018 Epoch: 073/150 | Batch 0300/0351 | Loss: 0.0888 Epoch: 073/150 | Train: 96.11% | Validation: 85.72% | Best Validation (Ep. 061): 87.04% Time elapsed: 63.64 min Epoch: 074/150 | Batch 0000/0351 | Loss: 0.2098 Epoch: 074/150 | Batch 0100/0351 | Loss: 0.0599 Epoch: 074/150 | Batch 0200/0351 | Loss: 0.1871 Epoch: 074/150 | Batch 0300/0351 | Loss: 0.0795 Epoch: 074/150 | Train: 96.85% | Validation: 86.58% | Best Validation (Ep. 061): 87.04% Time elapsed: 64.50 min Epoch: 075/150 | Batch 0000/0351 | Loss: 0.0939 Epoch: 075/150 | Batch 0100/0351 | Loss: 0.0938 Epoch: 075/150 | Batch 0200/0351 | Loss: 0.1493 Epoch: 075/150 | Batch 0300/0351 | Loss: 0.1652 Epoch: 075/150 | Train: 95.75% | Validation: 85.16% | Best Validation (Ep. 061): 87.04% Time elapsed: 65.38 min Epoch: 076/150 | Batch 0000/0351 | Loss: 0.1479 Epoch: 076/150 | Batch 0100/0351 | Loss: 0.0946 Epoch: 076/150 | Batch 0200/0351 | Loss: 0.0799 Epoch: 076/150 | Batch 0300/0351 | Loss: 0.1827 Epoch: 076/150 | Train: 96.73% | Validation: 86.06% | Best Validation (Ep. 061): 87.04% Time elapsed: 66.26 min Epoch: 077/150 | Batch 0000/0351 | Loss: 0.0973 Epoch: 077/150 | Batch 0100/0351 | Loss: 0.0624 Epoch: 077/150 | Batch 0200/0351 | Loss: 0.1322 Epoch: 077/150 | Batch 0300/0351 | Loss: 0.1379 Epoch: 077/150 | Train: 97.06% | Validation: 86.50% | Best Validation (Ep. 061): 87.04% Time elapsed: 67.12 min Epoch: 078/150 | Batch 0000/0351 | Loss: 0.0761 Epoch: 078/150 | Batch 0100/0351 | Loss: 0.0700 Epoch: 078/150 | Batch 0200/0351 | Loss: 0.1945 Epoch: 078/150 | Batch 0300/0351 | Loss: 0.1026 Epoch: 078/150 | Train: 96.49% | Validation: 85.84% | Best Validation (Ep. 061): 87.04% Time elapsed: 67.99 min Epoch: 079/150 | Batch 0000/0351 | Loss: 0.1537 Epoch: 079/150 | Batch 0100/0351 | Loss: 0.1341 Epoch: 079/150 | Batch 0200/0351 | Loss: 0.1535 Epoch: 079/150 | Batch 0300/0351 | Loss: 0.2012 Epoch: 079/150 | Train: 97.05% | Validation: 86.04% | Best Validation (Ep. 061): 87.04% Time elapsed: 68.89 min Epoch: 080/150 | Batch 0000/0351 | Loss: 0.0727 Epoch: 080/150 | Batch 0100/0351 | Loss: 0.0410 Epoch: 080/150 | Batch 0200/0351 | Loss: 0.0855 Epoch: 080/150 | Batch 0300/0351 | Loss: 0.0788 Epoch: 080/150 | Train: 97.21% | Validation: 86.38% | Best Validation (Ep. 061): 87.04% Time elapsed: 69.77 min Epoch: 081/150 | Batch 0000/0351 | Loss: 0.0502 Epoch: 081/150 | Batch 0100/0351 | Loss: 0.0804 Epoch: 081/150 | Batch 0200/0351 | Loss: 0.1103 Epoch: 081/150 | Batch 0300/0351 | Loss: 0.1613 Epoch: 081/150 | Train: 97.18% | Validation: 86.54% | Best Validation (Ep. 061): 87.04% Time elapsed: 70.65 min Epoch: 082/150 | Batch 0000/0351 | Loss: 0.0663 Epoch: 082/150 | Batch 0100/0351 | Loss: 0.0809 Epoch: 082/150 | Batch 0200/0351 | Loss: 0.2974 Epoch: 082/150 | Batch 0300/0351 | Loss: 0.0784 Epoch: 082/150 | Train: 97.34% | Validation: 86.08% | Best Validation (Ep. 061): 87.04% Time elapsed: 71.51 min Epoch: 083/150 | Batch 0000/0351 | Loss: 0.0758 Epoch: 083/150 | Batch 0100/0351 | Loss: 0.1724 Epoch: 083/150 | Batch 0200/0351 | Loss: 0.0440 Epoch: 083/150 | Batch 0300/0351 | Loss: 0.0850 Epoch: 083/150 | Train: 96.78% | Validation: 86.50% | Best Validation (Ep. 061): 87.04% Time elapsed: 72.39 min Epoch: 084/150 | Batch 0000/0351 | Loss: 0.1021 Epoch: 084/150 | Batch 0100/0351 | Loss: 0.1038 Epoch: 084/150 | Batch 0200/0351 | Loss: 0.0551 Epoch: 084/150 | Batch 0300/0351 | Loss: 0.1448 Epoch: 084/150 | Train: 97.38% | Validation: 86.44% | Best Validation (Ep. 061): 87.04% Time elapsed: 73.27 min Epoch: 085/150 | Batch 0000/0351 | Loss: 0.0923 Epoch: 085/150 | Batch 0100/0351 | Loss: 0.1872 Epoch: 085/150 | Batch 0200/0351 | Loss: 0.0828 Epoch: 085/150 | Batch 0300/0351 | Loss: 0.0772 Epoch: 085/150 | Train: 97.04% | Validation: 86.50% | Best Validation (Ep. 061): 87.04% Time elapsed: 74.14 min Epoch: 086/150 | Batch 0000/0351 | Loss: 0.0405 Epoch: 086/150 | Batch 0100/0351 | Loss: 0.0745 Epoch: 086/150 | Batch 0200/0351 | Loss: 0.1266 Epoch: 086/150 | Batch 0300/0351 | Loss: 0.0696 Epoch: 086/150 | Train: 96.98% | Validation: 86.02% | Best Validation (Ep. 061): 87.04% Time elapsed: 75.01 min Epoch: 087/150 | Batch 0000/0351 | Loss: 0.0465 Epoch: 087/150 | Batch 0100/0351 | Loss: 0.1641 Epoch: 087/150 | Batch 0200/0351 | Loss: 0.0499 Epoch: 087/150 | Batch 0300/0351 | Loss: 0.0890 Epoch: 087/150 | Train: 97.54% | Validation: 86.72% | Best Validation (Ep. 061): 87.04% Time elapsed: 75.88 min Epoch: 088/150 | Batch 0000/0351 | Loss: 0.0617 Epoch: 088/150 | Batch 0100/0351 | Loss: 0.0869 Epoch: 088/150 | Batch 0200/0351 | Loss: 0.0848 Epoch: 088/150 | Batch 0300/0351 | Loss: 0.0292 Epoch: 088/150 | Train: 97.19% | Validation: 86.46% | Best Validation (Ep. 061): 87.04% Time elapsed: 76.73 min Epoch: 089/150 | Batch 0000/0351 | Loss: 0.0594 Epoch: 089/150 | Batch 0100/0351 | Loss: 0.1233 Epoch: 089/150 | Batch 0200/0351 | Loss: 0.0862 Epoch: 089/150 | Batch 0300/0351 | Loss: 0.1266 Epoch: 089/150 | Train: 97.47% | Validation: 86.84% | Best Validation (Ep. 061): 87.04% Time elapsed: 77.59 min Epoch: 090/150 | Batch 0000/0351 | Loss: 0.0712 Epoch: 090/150 | Batch 0100/0351 | Loss: 0.0395 Epoch: 090/150 | Batch 0200/0351 | Loss: 0.0696 Epoch: 090/150 | Batch 0300/0351 | Loss: 0.0404 Epoch: 090/150 | Train: 96.56% | Validation: 85.36% | Best Validation (Ep. 061): 87.04% Time elapsed: 78.45 min Epoch: 091/150 | Batch 0000/0351 | Loss: 0.0755 Epoch: 091/150 | Batch 0100/0351 | Loss: 0.0531 Epoch: 091/150 | Batch 0200/0351 | Loss: 0.0827 Epoch: 091/150 | Batch 0300/0351 | Loss: 0.1106 Epoch: 091/150 | Train: 97.77% | Validation: 86.42% | Best Validation (Ep. 061): 87.04% Time elapsed: 79.31 min Epoch: 092/150 | Batch 0000/0351 | Loss: 0.0790 Epoch: 092/150 | Batch 0100/0351 | Loss: 0.0692 Epoch: 092/150 | Batch 0200/0351 | Loss: 0.1383 Epoch: 092/150 | Batch 0300/0351 | Loss: 0.1625 Epoch: 092/150 | Train: 97.38% | Validation: 86.70% | Best Validation (Ep. 061): 87.04% Time elapsed: 80.18 min Epoch: 093/150 | Batch 0000/0351 | Loss: 0.0448 Epoch: 093/150 | Batch 0100/0351 | Loss: 0.0607 Epoch: 093/150 | Batch 0200/0351 | Loss: 0.1137 Epoch: 093/150 | Batch 0300/0351 | Loss: 0.1099 Epoch: 093/150 | Train: 97.73% | Validation: 86.92% | Best Validation (Ep. 061): 87.04% Time elapsed: 81.04 min Epoch: 094/150 | Batch 0000/0351 | Loss: 0.0872 Epoch: 094/150 | Batch 0100/0351 | Loss: 0.0492 Epoch: 094/150 | Batch 0200/0351 | Loss: 0.1232 Epoch: 094/150 | Batch 0300/0351 | Loss: 0.1285 Epoch: 094/150 | Train: 97.97% | Validation: 86.96% | Best Validation (Ep. 061): 87.04% Time elapsed: 81.90 min Epoch: 095/150 | Batch 0000/0351 | Loss: 0.0407 Epoch: 095/150 | Batch 0100/0351 | Loss: 0.0355 Epoch: 095/150 | Batch 0200/0351 | Loss: 0.0834 Epoch: 095/150 | Batch 0300/0351 | Loss: 0.1341 Epoch: 095/150 | Train: 96.63% | Validation: 86.46% | Best Validation (Ep. 061): 87.04% Time elapsed: 82.81 min Epoch: 096/150 | Batch 0000/0351 | Loss: 0.0988 Epoch: 096/150 | Batch 0100/0351 | Loss: 0.0749 Epoch: 096/150 | Batch 0200/0351 | Loss: 0.1119 Epoch: 096/150 | Batch 0300/0351 | Loss: 0.1543 Epoch: 096/150 | Train: 97.47% | Validation: 86.42% | Best Validation (Ep. 061): 87.04% Time elapsed: 83.68 min Epoch: 097/150 | Batch 0000/0351 | Loss: 0.0997 Epoch: 097/150 | Batch 0100/0351 | Loss: 0.0489 Epoch: 097/150 | Batch 0200/0351 | Loss: 0.0951 Epoch: 097/150 | Batch 0300/0351 | Loss: 0.0359 Epoch: 097/150 | Train: 97.62% | Validation: 86.60% | Best Validation (Ep. 061): 87.04% Time elapsed: 84.57 min Epoch: 098/150 | Batch 0000/0351 | Loss: 0.0665 Epoch: 098/150 | Batch 0100/0351 | Loss: 0.0549 Epoch: 098/150 | Batch 0200/0351 | Loss: 0.0772 Epoch: 098/150 | Batch 0300/0351 | Loss: 0.0737 Epoch: 098/150 | Train: 95.73% | Validation: 84.66% | Best Validation (Ep. 061): 87.04% Time elapsed: 85.43 min Epoch: 099/150 | Batch 0000/0351 | Loss: 0.1015 Epoch: 099/150 | Batch 0100/0351 | Loss: 0.0650 Epoch: 099/150 | Batch 0200/0351 | Loss: 0.0349 Epoch: 099/150 | Batch 0300/0351 | Loss: 0.0789 Epoch: 099/150 | Train: 97.95% | Validation: 86.54% | Best Validation (Ep. 061): 87.04% Time elapsed: 86.30 min Epoch: 100/150 | Batch 0000/0351 | Loss: 0.0311 Epoch: 100/150 | Batch 0100/0351 | Loss: 0.1712 Epoch: 100/150 | Batch 0200/0351 | Loss: 0.0504 Epoch: 100/150 | Batch 0300/0351 | Loss: 0.0560 Epoch: 100/150 | Train: 97.98% | Validation: 86.48% | Best Validation (Ep. 061): 87.04% Time elapsed: 87.15 min Epoch: 101/150 | Batch 0000/0351 | Loss: 0.0730 Epoch: 101/150 | Batch 0100/0351 | Loss: 0.0632 Epoch: 101/150 | Batch 0200/0351 | Loss: 0.0983 Epoch: 101/150 | Batch 0300/0351 | Loss: 0.1211 Epoch: 101/150 | Train: 97.09% | Validation: 85.48% | Best Validation (Ep. 061): 87.04% Time elapsed: 88.03 min Epoch: 102/150 | Batch 0000/0351 | Loss: 0.0487 Epoch: 102/150 | Batch 0100/0351 | Loss: 0.0871 Epoch: 102/150 | Batch 0200/0351 | Loss: 0.0807 Epoch: 102/150 | Batch 0300/0351 | Loss: 0.1258 Epoch: 102/150 | Train: 97.28% | Validation: 85.64% | Best Validation (Ep. 061): 87.04% Time elapsed: 88.90 min Epoch: 103/150 | Batch 0000/0351 | Loss: 0.0198 Epoch: 103/150 | Batch 0100/0351 | Loss: 0.0446 Epoch: 103/150 | Batch 0200/0351 | Loss: 0.0963 Epoch: 103/150 | Batch 0300/0351 | Loss: 0.0560 Epoch: 103/150 | Train: 97.58% | Validation: 86.42% | Best Validation (Ep. 061): 87.04% Time elapsed: 89.75 min Epoch: 104/150 | Batch 0000/0351 | Loss: 0.1094 Epoch: 104/150 | Batch 0100/0351 | Loss: 0.0830 Epoch: 104/150 | Batch 0200/0351 | Loss: 0.0752 Epoch: 104/150 | Batch 0300/0351 | Loss: 0.0825 Epoch: 104/150 | Train: 97.33% | Validation: 86.32% | Best Validation (Ep. 061): 87.04% Time elapsed: 90.61 min Epoch: 105/150 | Batch 0000/0351 | Loss: 0.1095 Epoch: 105/150 | Batch 0100/0351 | Loss: 0.0428 Epoch: 105/150 | Batch 0200/0351 | Loss: 0.0335 Epoch: 105/150 | Batch 0300/0351 | Loss: 0.0809 Epoch: 105/150 | Train: 98.09% | Validation: 86.50% | Best Validation (Ep. 061): 87.04% Time elapsed: 91.49 min Epoch: 106/150 | Batch 0000/0351 | Loss: 0.0613 Epoch: 106/150 | Batch 0100/0351 | Loss: 0.0835 Epoch: 106/150 | Batch 0200/0351 | Loss: 0.0444 Epoch: 106/150 | Batch 0300/0351 | Loss: 0.0440 Epoch: 106/150 | Train: 98.14% | Validation: 87.10% | Best Validation (Ep. 106): 87.10% Time elapsed: 92.37 min Epoch: 107/150 | Batch 0000/0351 | Loss: 0.0399 Epoch: 107/150 | Batch 0100/0351 | Loss: 0.0592 Epoch: 107/150 | Batch 0200/0351 | Loss: 0.1067 Epoch: 107/150 | Batch 0300/0351 | Loss: 0.0645 Epoch: 107/150 | Train: 98.12% | Validation: 86.54% | Best Validation (Ep. 106): 87.10% Time elapsed: 93.24 min Epoch: 108/150 | Batch 0000/0351 | Loss: 0.0656 Epoch: 108/150 | Batch 0100/0351 | Loss: 0.0873 Epoch: 108/150 | Batch 0200/0351 | Loss: 0.0397 Epoch: 108/150 | Batch 0300/0351 | Loss: 0.0853 Epoch: 108/150 | Train: 98.04% | Validation: 86.90% | Best Validation (Ep. 106): 87.10% Time elapsed: 94.10 min Epoch: 109/150 | Batch 0000/0351 | Loss: 0.0379 Epoch: 109/150 | Batch 0100/0351 | Loss: 0.0650 Epoch: 109/150 | Batch 0200/0351 | Loss: 0.0647 Epoch: 109/150 | Batch 0300/0351 | Loss: 0.0836 Epoch: 109/150 | Train: 97.69% | Validation: 86.36% | Best Validation (Ep. 106): 87.10% Time elapsed: 94.97 min Epoch: 110/150 | Batch 0000/0351 | Loss: 0.1155 Epoch: 110/150 | Batch 0100/0351 | Loss: 0.0555 Epoch: 110/150 | Batch 0200/0351 | Loss: 0.0853 Epoch: 110/150 | Batch 0300/0351 | Loss: 0.0504 Epoch: 110/150 | Train: 97.41% | Validation: 86.10% | Best Validation (Ep. 106): 87.10% Time elapsed: 95.85 min Epoch: 111/150 | Batch 0000/0351 | Loss: 0.0858 Epoch: 111/150 | Batch 0100/0351 | Loss: 0.0253 Epoch: 111/150 | Batch 0200/0351 | Loss: 0.0757 Epoch: 111/150 | Batch 0300/0351 | Loss: 0.0739 Epoch: 111/150 | Train: 97.80% | Validation: 86.18% | Best Validation (Ep. 106): 87.10% Time elapsed: 96.71 min Epoch: 112/150 | Batch 0000/0351 | Loss: 0.0274 Epoch: 112/150 | Batch 0100/0351 | Loss: 0.0511 Epoch: 112/150 | Batch 0200/0351 | Loss: 0.0458 Epoch: 112/150 | Batch 0300/0351 | Loss: 0.0244 Epoch: 112/150 | Train: 97.67% | Validation: 86.62% | Best Validation (Ep. 106): 87.10% Time elapsed: 97.58 min Epoch: 113/150 | Batch 0000/0351 | Loss: 0.0344 Epoch: 113/150 | Batch 0100/0351 | Loss: 0.1129 Epoch: 113/150 | Batch 0200/0351 | Loss: 0.0309 Epoch: 113/150 | Batch 0300/0351 | Loss: 0.1761 Epoch: 113/150 | Train: 98.28% | Validation: 87.08% | Best Validation (Ep. 106): 87.10% Time elapsed: 98.47 min Epoch: 114/150 | Batch 0000/0351 | Loss: 0.0844 Epoch: 114/150 | Batch 0100/0351 | Loss: 0.0397 Epoch: 114/150 | Batch 0200/0351 | Loss: 0.1106 Epoch: 114/150 | Batch 0300/0351 | Loss: 0.0524 Epoch: 114/150 | Train: 97.86% | Validation: 86.70% | Best Validation (Ep. 106): 87.10% Time elapsed: 99.33 min Epoch: 115/150 | Batch 0000/0351 | Loss: 0.0584 Epoch: 115/150 | Batch 0100/0351 | Loss: 0.0998 Epoch: 115/150 | Batch 0200/0351 | Loss: 0.0750 Epoch: 115/150 | Batch 0300/0351 | Loss: 0.0905 Epoch: 115/150 | Train: 97.80% | Validation: 86.62% | Best Validation (Ep. 106): 87.10% Time elapsed: 100.21 min Epoch: 116/150 | Batch 0000/0351 | Loss: 0.0821 Epoch: 116/150 | Batch 0100/0351 | Loss: 0.0373 Epoch: 116/150 | Batch 0200/0351 | Loss: 0.0521 Epoch: 116/150 | Batch 0300/0351 | Loss: 0.0301 Epoch: 116/150 | Train: 97.43% | Validation: 86.32% | Best Validation (Ep. 106): 87.10% Time elapsed: 101.08 min Epoch: 117/150 | Batch 0000/0351 | Loss: 0.0572 Epoch: 117/150 | Batch 0100/0351 | Loss: 0.0549 Epoch: 117/150 | Batch 0200/0351 | Loss: 0.0333 Epoch: 117/150 | Batch 0300/0351 | Loss: 0.0920 Epoch: 117/150 | Train: 98.01% | Validation: 86.42% | Best Validation (Ep. 106): 87.10% Time elapsed: 101.94 min Epoch: 118/150 | Batch 0000/0351 | Loss: 0.0945 Epoch: 118/150 | Batch 0100/0351 | Loss: 0.0740 Epoch: 118/150 | Batch 0200/0351 | Loss: 0.0462 Epoch: 118/150 | Batch 0300/0351 | Loss: 0.0481 Epoch: 118/150 | Train: 98.08% | Validation: 86.88% | Best Validation (Ep. 106): 87.10% Time elapsed: 102.80 min Epoch: 119/150 | Batch 0000/0351 | Loss: 0.0346 Epoch: 119/150 | Batch 0100/0351 | Loss: 0.1011 Epoch: 119/150 | Batch 0200/0351 | Loss: 0.0283 Epoch: 119/150 | Batch 0300/0351 | Loss: 0.0874 Epoch: 119/150 | Train: 97.65% | Validation: 85.98% | Best Validation (Ep. 106): 87.10% Time elapsed: 103.66 min Epoch: 120/150 | Batch 0000/0351 | Loss: 0.1384 Epoch: 120/150 | Batch 0100/0351 | Loss: 0.0950 Epoch: 120/150 | Batch 0200/0351 | Loss: 0.0841 Epoch: 120/150 | Batch 0300/0351 | Loss: 0.0495 Epoch: 120/150 | Train: 96.97% | Validation: 86.14% | Best Validation (Ep. 106): 87.10% Time elapsed: 104.53 min Epoch: 121/150 | Batch 0000/0351 | Loss: 0.0512 Epoch: 121/150 | Batch 0100/0351 | Loss: 0.0347 Epoch: 121/150 | Batch 0200/0351 | Loss: 0.1000 Epoch: 121/150 | Batch 0300/0351 | Loss: 0.0704 Epoch: 121/150 | Train: 97.91% | Validation: 86.86% | Best Validation (Ep. 106): 87.10% Time elapsed: 105.40 min Epoch: 122/150 | Batch 0000/0351 | Loss: 0.0557 Epoch: 122/150 | Batch 0100/0351 | Loss: 0.0274 Epoch: 122/150 | Batch 0200/0351 | Loss: 0.0600 Epoch: 122/150 | Batch 0300/0351 | Loss: 0.0628 Epoch: 122/150 | Train: 98.39% | Validation: 86.68% | Best Validation (Ep. 106): 87.10% Time elapsed: 106.31 min Epoch: 123/150 | Batch 0000/0351 | Loss: 0.0728 Epoch: 123/150 | Batch 0100/0351 | Loss: 0.0521 Epoch: 123/150 | Batch 0200/0351 | Loss: 0.0833 Epoch: 123/150 | Batch 0300/0351 | Loss: 0.1560 Epoch: 123/150 | Train: 98.37% | Validation: 87.00% | Best Validation (Ep. 106): 87.10% Time elapsed: 107.15 min Epoch: 124/150 | Batch 0000/0351 | Loss: 0.0146 Epoch: 124/150 | Batch 0100/0351 | Loss: 0.0571 Epoch: 124/150 | Batch 0200/0351 | Loss: 0.0673 Epoch: 124/150 | Batch 0300/0351 | Loss: 0.0391 Epoch: 124/150 | Train: 98.19% | Validation: 86.76% | Best Validation (Ep. 106): 87.10% Time elapsed: 108.04 min Epoch: 125/150 | Batch 0000/0351 | Loss: 0.0742 Epoch: 125/150 | Batch 0100/0351 | Loss: 0.0283 Epoch: 125/150 | Batch 0200/0351 | Loss: 0.0527 Epoch: 125/150 | Batch 0300/0351 | Loss: 0.0320 Epoch: 125/150 | Train: 98.09% | Validation: 86.62% | Best Validation (Ep. 106): 87.10% Time elapsed: 108.91 min Epoch: 126/150 | Batch 0000/0351 | Loss: 0.0384 Epoch: 126/150 | Batch 0100/0351 | Loss: 0.0287 Epoch: 126/150 | Batch 0200/0351 | Loss: 0.1239 Epoch: 126/150 | Batch 0300/0351 | Loss: 0.0646 Epoch: 126/150 | Train: 97.45% | Validation: 86.30% | Best Validation (Ep. 106): 87.10% Time elapsed: 109.76 min Epoch: 127/150 | Batch 0000/0351 | Loss: 0.0586 Epoch: 127/150 | Batch 0100/0351 | Loss: 0.1122 Epoch: 127/150 | Batch 0200/0351 | Loss: 0.0394 Epoch: 127/150 | Batch 0300/0351 | Loss: 0.1061 Epoch: 127/150 | Train: 97.75% | Validation: 86.90% | Best Validation (Ep. 106): 87.10% Time elapsed: 110.62 min Epoch: 128/150 | Batch 0000/0351 | Loss: 0.0886 Epoch: 128/150 | Batch 0100/0351 | Loss: 0.0417 Epoch: 128/150 | Batch 0200/0351 | Loss: 0.0410 Epoch: 128/150 | Batch 0300/0351 | Loss: 0.0560 Epoch: 128/150 | Train: 98.46% | Validation: 87.00% | Best Validation (Ep. 106): 87.10% Time elapsed: 111.51 min Epoch: 129/150 | Batch 0000/0351 | Loss: 0.0284 Epoch: 129/150 | Batch 0100/0351 | Loss: 0.0562 Epoch: 129/150 | Batch 0200/0351 | Loss: 0.0882 Epoch: 129/150 | Batch 0300/0351 | Loss: 0.0242 Epoch: 129/150 | Train: 97.77% | Validation: 86.12% | Best Validation (Ep. 106): 87.10% Time elapsed: 112.39 min Epoch: 130/150 | Batch 0000/0351 | Loss: 0.0451 Epoch: 130/150 | Batch 0100/0351 | Loss: 0.0247 Epoch: 130/150 | Batch 0200/0351 | Loss: 0.0266 Epoch: 130/150 | Batch 0300/0351 | Loss: 0.0257 Epoch: 130/150 | Train: 98.26% | Validation: 87.22% | Best Validation (Ep. 130): 87.22% Time elapsed: 113.28 min Epoch: 131/150 | Batch 0000/0351 | Loss: 0.0787 Epoch: 131/150 | Batch 0100/0351 | Loss: 0.0251 Epoch: 131/150 | Batch 0200/0351 | Loss: 0.0493 Epoch: 131/150 | Batch 0300/0351 | Loss: 0.0947 Epoch: 131/150 | Train: 97.74% | Validation: 86.96% | Best Validation (Ep. 130): 87.22% Time elapsed: 114.16 min Epoch: 132/150 | Batch 0000/0351 | Loss: 0.0458 Epoch: 132/150 | Batch 0100/0351 | Loss: 0.0746 Epoch: 132/150 | Batch 0200/0351 | Loss: 0.0347 Epoch: 132/150 | Batch 0300/0351 | Loss: 0.0471 Epoch: 132/150 | Train: 97.75% | Validation: 86.62% | Best Validation (Ep. 130): 87.22% Time elapsed: 115.04 min Epoch: 133/150 | Batch 0000/0351 | Loss: 0.0366 Epoch: 133/150 | Batch 0100/0351 | Loss: 0.0140 Epoch: 133/150 | Batch 0200/0351 | Loss: 0.0361 Epoch: 133/150 | Batch 0300/0351 | Loss: 0.0636 Epoch: 133/150 | Train: 98.22% | Validation: 87.06% | Best Validation (Ep. 130): 87.22% Time elapsed: 115.90 min Epoch: 134/150 | Batch 0000/0351 | Loss: 0.0863 Epoch: 134/150 | Batch 0100/0351 | Loss: 0.0992 Epoch: 134/150 | Batch 0200/0351 | Loss: 0.0873 Epoch: 134/150 | Batch 0300/0351 | Loss: 0.0917 Epoch: 134/150 | Train: 98.24% | Validation: 86.42% | Best Validation (Ep. 130): 87.22% Time elapsed: 116.77 min Epoch: 135/150 | Batch 0000/0351 | Loss: 0.0559 Epoch: 135/150 | Batch 0100/0351 | Loss: 0.1339 Epoch: 135/150 | Batch 0200/0351 | Loss: 0.0477 Epoch: 135/150 | Batch 0300/0351 | Loss: 0.0362 Epoch: 135/150 | Train: 98.30% | Validation: 87.08% | Best Validation (Ep. 130): 87.22% Time elapsed: 117.65 min Epoch: 136/150 | Batch 0000/0351 | Loss: 0.0975 Epoch: 136/150 | Batch 0100/0351 | Loss: 0.0318 Epoch: 136/150 | Batch 0200/0351 | Loss: 0.0811 Epoch: 136/150 | Batch 0300/0351 | Loss: 0.0900 Epoch: 136/150 | Train: 97.96% | Validation: 86.56% | Best Validation (Ep. 130): 87.22% Time elapsed: 118.53 min Epoch: 137/150 | Batch 0000/0351 | Loss: 0.0582 Epoch: 137/150 | Batch 0100/0351 | Loss: 0.0134 Epoch: 137/150 | Batch 0200/0351 | Loss: 0.0323 Epoch: 137/150 | Batch 0300/0351 | Loss: 0.0852 Epoch: 137/150 | Train: 97.91% | Validation: 86.76% | Best Validation (Ep. 130): 87.22% Time elapsed: 119.40 min Epoch: 138/150 | Batch 0000/0351 | Loss: 0.0229 Epoch: 138/150 | Batch 0100/0351 | Loss: 0.0469 Epoch: 138/150 | Batch 0200/0351 | Loss: 0.0574 Epoch: 138/150 | Batch 0300/0351 | Loss: 0.0365 Epoch: 138/150 | Train: 97.97% | Validation: 86.82% | Best Validation (Ep. 130): 87.22% Time elapsed: 120.27 min Epoch: 139/150 | Batch 0000/0351 | Loss: 0.0780 Epoch: 139/150 | Batch 0100/0351 | Loss: 0.0760 Epoch: 139/150 | Batch 0200/0351 | Loss: 0.0441 Epoch: 139/150 | Batch 0300/0351 | Loss: 0.0878 Epoch: 139/150 | Train: 98.36% | Validation: 87.00% | Best Validation (Ep. 130): 87.22% Time elapsed: 121.13 min Epoch: 140/150 | Batch 0000/0351 | Loss: 0.0450 Epoch: 140/150 | Batch 0100/0351 | Loss: 0.0712 Epoch: 140/150 | Batch 0200/0351 | Loss: 0.0679 Epoch: 140/150 | Batch 0300/0351 | Loss: 0.0619 Epoch: 140/150 | Train: 98.34% | Validation: 86.74% | Best Validation (Ep. 130): 87.22% Time elapsed: 122.00 min Epoch: 141/150 | Batch 0000/0351 | Loss: 0.0516 Epoch: 141/150 | Batch 0100/0351 | Loss: 0.0921 Epoch: 141/150 | Batch 0200/0351 | Loss: 0.0380 Epoch: 141/150 | Batch 0300/0351 | Loss: 0.0518 Epoch: 141/150 | Train: 98.39% | Validation: 86.98% | Best Validation (Ep. 130): 87.22% Time elapsed: 122.89 min Epoch: 142/150 | Batch 0000/0351 | Loss: 0.0585 Epoch: 142/150 | Batch 0100/0351 | Loss: 0.0445 Epoch: 142/150 | Batch 0200/0351 | Loss: 0.0723 Epoch: 142/150 | Batch 0300/0351 | Loss: 0.0662 Epoch: 142/150 | Train: 98.31% | Validation: 87.12% | Best Validation (Ep. 130): 87.22% Time elapsed: 123.78 min Epoch: 143/150 | Batch 0000/0351 | Loss: 0.0739 Epoch: 143/150 | Batch 0100/0351 | Loss: 0.0531 Epoch: 143/150 | Batch 0200/0351 | Loss: 0.0587 Epoch: 143/150 | Batch 0300/0351 | Loss: 0.0883 Epoch: 143/150 | Train: 97.79% | Validation: 86.68% | Best Validation (Ep. 130): 87.22% Time elapsed: 124.66 min Epoch: 144/150 | Batch 0000/0351 | Loss: 0.0463 Epoch: 144/150 | Batch 0100/0351 | Loss: 0.1072 Epoch: 144/150 | Batch 0200/0351 | Loss: 0.0183 Epoch: 144/150 | Batch 0300/0351 | Loss: 0.1323 Epoch: 144/150 | Train: 98.22% | Validation: 86.94% | Best Validation (Ep. 130): 87.22% Time elapsed: 125.51 min Epoch: 145/150 | Batch 0000/0351 | Loss: 0.1739 Epoch: 145/150 | Batch 0100/0351 | Loss: 0.0420 Epoch: 145/150 | Batch 0200/0351 | Loss: 0.0211 Epoch: 145/150 | Batch 0300/0351 | Loss: 0.0415 Epoch: 145/150 | Train: 98.23% | Validation: 86.82% | Best Validation (Ep. 130): 87.22% Time elapsed: 126.38 min Epoch: 146/150 | Batch 0000/0351 | Loss: 0.0285 Epoch: 146/150 | Batch 0100/0351 | Loss: 0.0303 Epoch: 146/150 | Batch 0200/0351 | Loss: 0.0267 Epoch: 146/150 | Batch 0300/0351 | Loss: 0.1048 Epoch: 146/150 | Train: 98.17% | Validation: 86.86% | Best Validation (Ep. 130): 87.22% Time elapsed: 127.26 min Epoch: 147/150 | Batch 0000/0351 | Loss: 0.0363 Epoch: 147/150 | Batch 0100/0351 | Loss: 0.1178 Epoch: 147/150 | Batch 0200/0351 | Loss: 0.0514 Epoch: 147/150 | Batch 0300/0351 | Loss: 0.0793 Epoch: 147/150 | Train: 98.76% | Validation: 87.32% | Best Validation (Ep. 147): 87.32% Time elapsed: 128.15 min Epoch: 148/150 | Batch 0000/0351 | Loss: 0.0373 Epoch: 148/150 | Batch 0100/0351 | Loss: 0.0231 Epoch: 148/150 | Batch 0200/0351 | Loss: 0.0483 Epoch: 148/150 | Batch 0300/0351 | Loss: 0.0807 Epoch: 148/150 | Train: 98.13% | Validation: 86.64% | Best Validation (Ep. 147): 87.32% Time elapsed: 129.01 min Epoch: 149/150 | Batch 0000/0351 | Loss: 0.0521 Epoch: 149/150 | Batch 0100/0351 | Loss: 0.0324 Epoch: 149/150 | Batch 0200/0351 | Loss: 0.0399 Epoch: 149/150 | Batch 0300/0351 | Loss: 0.0580 Epoch: 149/150 | Train: 98.48% | Validation: 87.04% | Best Validation (Ep. 147): 87.32% Time elapsed: 129.87 min Epoch: 150/150 | Batch 0000/0351 | Loss: 0.0176 Epoch: 150/150 | Batch 0100/0351 | Loss: 0.1038 Epoch: 150/150 | Batch 0200/0351 | Loss: 0.0755 Epoch: 150/150 | Batch 0300/0351 | Loss: 0.0555 Epoch: 150/150 | Train: 98.03% | Validation: 86.52% | Best Validation (Ep. 147): 87.32% Time elapsed: 130.74 min Total Training Time: 130.74 min Test accuracy 85.83%
model.load_state_dict(torch.load('mobilenet-v2-best-1.pt'))
model.eval()
test_acc = compute_accuracy(model, test_loader, device=DEVICE)
print(f'Test accuracy: {test_acc:.2f}%')
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-11-d43cc3db6d49> in <module> ----> 1 model.load_state_dict(torch.load('mobilenet-v2-best-1.pt')) 2 model.eval() 3 test_acc = compute_accuracy(model, test_loader, device=DEVICE) 4 print(f'Test accuracy: {test_acc:.2f}%') ~/miniforge3/lib/python3.8/site-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict) 1221 1222 if len(error_msgs) > 0: -> 1223 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( 1224 self.__class__.__name__, "\n\t".join(error_msgs))) 1225 return _IncompatibleKeys(missing_keys, unexpected_keys) RuntimeError: Error(s) in loading state_dict for MobileNetV2: Missing key(s) in state_dict: "features.1.conv.0.0.weight", "features.1.conv.0.1.weight", "features.1.conv.0.1.bias", "features.1.conv.0.1.running_mean", "features.1.conv.0.1.running_var", "features.1.conv.1.weight", "features.1.conv.2.weight", "features.1.conv.2.bias", "features.1.conv.2.running_mean", "features.1.conv.2.running_var", "features.2.conv.0.0.weight", "features.2.conv.0.1.weight", "features.2.conv.0.1.bias", "features.2.conv.0.1.running_mean", "features.2.conv.0.1.running_var", "features.2.conv.1.0.weight", "features.2.conv.1.1.weight", "features.2.conv.1.1.bias", "features.2.conv.1.1.running_mean", "features.2.conv.1.1.running_var", "features.2.conv.2.weight", "features.2.conv.3.weight", "features.2.conv.3.bias", "features.2.conv.3.running_mean", "features.2.conv.3.running_var", "features.3.conv.0.0.weight", "features.3.conv.0.1.weight", "features.3.conv.0.1.bias", "features.3.conv.0.1.running_mean", "features.3.conv.0.1.running_var", "features.3.conv.1.0.weight", "features.3.conv.1.1.weight", "features.3.conv.1.1.bias", "features.3.conv.1.1.running_mean", "features.3.conv.1.1.running_var", "features.3.conv.2.weight", "features.3.conv.3.weight", "features.3.conv.3.bias", "features.3.conv.3.running_mean", "features.3.conv.3.running_var", "features.4.conv.0.0.weight", "features.4.conv.0.1.weight", "features.4.conv.0.1.bias", "features.4.conv.0.1.running_mean", "features.4.conv.0.1.running_var", "features.4.conv.1.0.weight", "features.4.conv.1.1.weight", "features.4.conv.1.1.bias", "features.4.conv.1.1.running_mean", "features.4.conv.1.1.running_var", "features.4.conv.2.weight", "features.4.conv.3.weight", "features.4.conv.3.bias", "features.4.conv.3.running_mean", "features.4.conv.3.running_var", "features.5.conv.0.0.weight", "features.5.conv.0.1.weight", "features.5.conv.0.1.bias", "features.5.conv.0.1.running_mean", "features.5.conv.0.1.running_var", "features.5.conv.1.0.weight", "features.5.conv.1.1.weight", "features.5.conv.1.1.bias", "features.5.conv.1.1.running_mean", "features.5.conv.1.1.running_var", "features.5.conv.2.weight", "features.5.conv.3.weight", "features.5.conv.3.bias", "features.5.conv.3.running_mean", "features.5.conv.3.running_var", "features.6.conv.0.0.weight", "features.6.conv.0.1.weight", "features.6.conv.0.1.bias", "features.6.conv.0.1.running_mean", "features.6.conv.0.1.running_var", "features.6.conv.1.0.weight", "features.6.conv.1.1.weight", "features.6.conv.1.1.bias", "features.6.conv.1.1.running_mean", "features.6.conv.1.1.running_var", "features.6.conv.2.weight", "features.6.conv.3.weight", "features.6.conv.3.bias", "features.6.conv.3.running_mean", "features.6.conv.3.running_var", "features.7.conv.0.0.weight", "features.7.conv.0.1.weight", "features.7.conv.0.1.bias", "features.7.conv.0.1.running_mean", "features.7.conv.0.1.running_var", "features.7.conv.1.0.weight", "features.7.conv.1.1.weight", "features.7.conv.1.1.bias", "features.7.conv.1.1.running_mean", "features.7.conv.1.1.running_var", "features.7.conv.2.weight", "features.7.conv.3.weight", "features.7.conv.3.bias", "features.7.conv.3.running_mean", "features.7.conv.3.running_var", "features.8.conv.0.0.weight", "features.8.conv.0.1.weight", "features.8.conv.0.1.bias", "features.8.conv.0.1.running_mean", "features.8.conv.0.1.running_var", "features.8.conv.1.0.weight", "features.8.conv.1.1.weight", "features.8.conv.1.1.bias", "features.8.conv.1.1.running_mean", "features.8.conv.1.1.running_var", "features.8.conv.2.weight", "features.8.conv.3.weight", "features.8.conv.3.bias", "features.8.conv.3.running_mean", "features.8.conv.3.running_var", "features.9.conv.0.0.weight", "features.9.conv.0.1.weight", "features.9.conv.0.1.bias", "features.9.conv.0.1.running_mean", "features.9.conv.0.1.running_var", "features.9.conv.1.0.weight", "features.9.conv.1.1.weight", "features.9.conv.1.1.bias", "features.9.conv.1.1.running_mean", "features.9.conv.1.1.running_var", "features.9.conv.2.weight", "features.9.conv.3.weight", "features.9.conv.3.bias", "features.9.conv.3.running_mean", "features.9.conv.3.running_var", "features.10.conv.0.0.weight", "features.10.conv.0.1.weight", "features.10.conv.0.1.bias", "features.10.conv.0.1.running_mean", "features.10.conv.0.1.running_var", "features.10.conv.1.0.weight", "features.10.conv.1.1.weight", "features.10.conv.1.1.bias", "features.10.conv.1.1.running_mean", "features.10.conv.1.1.running_var", "features.10.conv.2.weight", "features.10.conv.3.weight", "features.10.conv.3.bias", "features.10.conv.3.running_mean", "features.10.conv.3.running_var", "features.11.conv.0.0.weight", "features.11.conv.0.1.weight", "features.11.conv.0.1.bias", "features.11.conv.0.1.running_mean", "features.11.conv.0.1.running_var", "features.11.conv.1.0.weight", "features.11.conv.1.1.weight", "features.11.conv.1.1.bias", "features.11.conv.1.1.running_mean", "features.11.conv.1.1.running_var", "features.11.conv.2.weight", "features.11.conv.3.weight", "features.11.conv.3.bias", "features.11.conv.3.running_mean", "features.11.conv.3.running_var", "features.12.conv.0.0.weight", "features.12.conv.0.1.weight", "features.12.conv.0.1.bias", "features.12.conv.0.1.running_mean", "features.12.conv.0.1.running_var", "features.12.conv.1.0.weight", "features.12.conv.1.1.weight", "features.12.conv.1.1.bias", "features.12.conv.1.1.running_mean", "features.12.conv.1.1.running_var", "features.12.conv.2.weight", "features.12.conv.3.weight", "features.12.conv.3.bias", "features.12.conv.3.running_mean", "features.12.conv.3.running_var", "features.13.conv.0.0.weight", "features.13.conv.0.1.weight", "features.13.conv.0.1.bias", "features.13.conv.0.1.running_mean", "features.13.conv.0.1.running_var", "features.13.conv.1.0.weight", "features.13.conv.1.1.weight", "features.13.conv.1.1.bias", "features.13.conv.1.1.running_mean", "features.13.conv.1.1.running_var", "features.13.conv.2.weight", "features.13.conv.3.weight", "features.13.conv.3.bias", "features.13.conv.3.running_mean", "features.13.conv.3.running_var", "features.14.conv.0.0.weight", "features.14.conv.0.1.weight", "features.14.conv.0.1.bias", "features.14.conv.0.1.running_mean", "features.14.conv.0.1.running_var", "features.14.conv.1.0.weight", "features.14.conv.1.1.weight", "features.14.conv.1.1.bias", "features.14.conv.1.1.running_mean", "features.14.conv.1.1.running_var", "features.14.conv.2.weight", "features.14.conv.3.weight", "features.14.conv.3.bias", "features.14.conv.3.running_mean", "features.14.conv.3.running_var", "features.15.conv.0.0.weight", "features.15.conv.0.1.weight", "features.15.conv.0.1.bias", "features.15.conv.0.1.running_mean", "features.15.conv.0.1.running_var", "features.15.conv.1.0.weight", "features.15.conv.1.1.weight", "features.15.conv.1.1.bias", "features.15.conv.1.1.running_mean", "features.15.conv.1.1.running_var", "features.15.conv.2.weight", "features.15.conv.3.weight", "features.15.conv.3.bias", "features.15.conv.3.running_mean", "features.15.conv.3.running_var", "features.16.conv.0.0.weight", "features.16.conv.0.1.weight", "features.16.conv.0.1.bias", "features.16.conv.0.1.running_mean", "features.16.conv.0.1.running_var", "features.16.conv.1.0.weight", "features.16.conv.1.1.weight", "features.16.conv.1.1.bias", "features.16.conv.1.1.running_mean", "features.16.conv.1.1.running_var", "features.16.conv.2.weight", "features.16.conv.3.weight", "features.16.conv.3.bias", "features.16.conv.3.running_mean", "features.16.conv.3.running_var", "features.17.conv.0.0.weight", "features.17.conv.0.1.weight", "features.17.conv.0.1.bias", "features.17.conv.0.1.running_mean", "features.17.conv.0.1.running_var", "features.17.conv.1.0.weight", "features.17.conv.1.1.weight", "features.17.conv.1.1.bias", "features.17.conv.1.1.running_mean", "features.17.conv.1.1.running_var", "features.17.conv.2.weight", "features.17.conv.3.weight", "features.17.conv.3.bias", "features.17.conv.3.running_mean", "features.17.conv.3.running_var", "features.18.0.weight", "features.18.1.weight", "features.18.1.bias", "features.18.1.running_mean", "features.18.1.running_var", "classifier.1.weight", "classifier.1.bias". Unexpected key(s) in state_dict: "features.1.block.0.0.weight", "features.1.block.0.1.weight", "features.1.block.0.1.bias", "features.1.block.0.1.running_mean", "features.1.block.0.1.running_var", "features.1.block.0.1.num_batches_tracked", "features.1.block.1.0.weight", "features.1.block.1.1.weight", "features.1.block.1.1.bias", "features.1.block.1.1.running_mean", "features.1.block.1.1.running_var", "features.1.block.1.1.num_batches_tracked", "features.2.block.0.0.weight", "features.2.block.0.1.weight", "features.2.block.0.1.bias", "features.2.block.0.1.running_mean", "features.2.block.0.1.running_var", "features.2.block.0.1.num_batches_tracked", "features.2.block.1.0.weight", "features.2.block.1.1.weight", "features.2.block.1.1.bias", "features.2.block.1.1.running_mean", "features.2.block.1.1.running_var", "features.2.block.1.1.num_batches_tracked", "features.2.block.2.0.weight", "features.2.block.2.1.weight", "features.2.block.2.1.bias", "features.2.block.2.1.running_mean", "features.2.block.2.1.running_var", "features.2.block.2.1.num_batches_tracked", "features.3.block.0.0.weight", "features.3.block.0.1.weight", "features.3.block.0.1.bias", "features.3.block.0.1.running_mean", "features.3.block.0.1.running_var", "features.3.block.0.1.num_batches_tracked", "features.3.block.1.0.weight", "features.3.block.1.1.weight", "features.3.block.1.1.bias", "features.3.block.1.1.running_mean", "features.3.block.1.1.running_var", "features.3.block.1.1.num_batches_tracked", "features.3.block.2.0.weight", "features.3.block.2.1.weight", "features.3.block.2.1.bias", "features.3.block.2.1.running_mean", "features.3.block.2.1.running_var", "features.3.block.2.1.num_batches_tracked", "features.4.block.0.0.weight", "features.4.block.0.1.weight", "features.4.block.0.1.bias", "features.4.block.0.1.running_mean", "features.4.block.0.1.running_var", "features.4.block.0.1.num_batches_tracked", "features.4.block.1.0.weight", "features.4.block.1.1.weight", "features.4.block.1.1.bias", "features.4.block.1.1.running_mean", "features.4.block.1.1.running_var", "features.4.block.1.1.num_batches_tracked", "features.4.block.2.fc1.weight", "features.4.block.2.fc1.bias", "features.4.block.2.fc2.weight", "features.4.block.2.fc2.bias", "features.4.block.3.0.weight", "features.4.block.3.1.weight", "features.4.block.3.1.bias", "features.4.block.3.1.running_mean", "features.4.block.3.1.running_var", "features.4.block.3.1.num_batches_tracked", "features.5.block.0.0.weight", "features.5.block.0.1.weight", "features.5.block.0.1.bias", "features.5.block.0.1.running_mean", "features.5.block.0.1.running_var", "features.5.block.0.1.num_batches_tracked", "features.5.block.1.0.weight", "features.5.block.1.1.weight", "features.5.block.1.1.bias", "features.5.block.1.1.running_mean", "features.5.block.1.1.running_var", "features.5.block.1.1.num_batches_tracked", "features.5.block.2.fc1.weight", "features.5.block.2.fc1.bias", "features.5.block.2.fc2.weight", "features.5.block.2.fc2.bias", "features.5.block.3.0.weight", "features.5.block.3.1.weight", "features.5.block.3.1.bias", "features.5.block.3.1.running_mean", "features.5.block.3.1.running_var", "features.5.block.3.1.num_batches_tracked", "features.6.block.0.0.weight", "features.6.block.0.1.weight", "features.6.block.0.1.bias", "features.6.block.0.1.running_mean", "features.6.block.0.1.running_var", "features.6.block.0.1.num_batches_tracked", "features.6.block.1.0.weight", "features.6.block.1.1.weight", "features.6.block.1.1.bias", "features.6.block.1.1.running_mean", "features.6.block.1.1.running_var", "features.6.block.1.1.num_batches_tracked", "features.6.block.2.fc1.weight", "features.6.block.2.fc1.bias", "features.6.block.2.fc2.weight", "features.6.block.2.fc2.bias", "features.6.block.3.0.weight", "features.6.block.3.1.weight", "features.6.block.3.1.bias", "features.6.block.3.1.running_mean", "features.6.block.3.1.running_var", "features.6.block.3.1.num_batches_tracked", "features.7.block.0.0.weight", "features.7.block.0.1.weight", "features.7.block.0.1.bias", "features.7.block.0.1.running_mean", "features.7.block.0.1.running_var", "features.7.block.0.1.num_batches_tracked", "features.7.block.1.0.weight", "features.7.block.1.1.weight", "features.7.block.1.1.bias", "features.7.block.1.1.running_mean", "features.7.block.1.1.running_var", "features.7.block.1.1.num_batches_tracked", "features.7.block.2.0.weight", "features.7.block.2.1.weight", "features.7.block.2.1.bias", "features.7.block.2.1.running_mean", "features.7.block.2.1.running_var", "features.7.block.2.1.num_batches_tracked", "features.8.block.0.0.weight", "features.8.block.0.1.weight", "features.8.block.0.1.bias", "features.8.block.0.1.running_mean", "features.8.block.0.1.running_var", "features.8.block.0.1.num_batches_tracked", "features.8.block.1.0.weight", "features.8.block.1.1.weight", "features.8.block.1.1.bias", "features.8.block.1.1.running_mean", "features.8.block.1.1.running_var", "features.8.block.1.1.num_batches_tracked", "features.8.block.2.0.weight", "features.8.block.2.1.weight", "features.8.block.2.1.bias", "features.8.block.2.1.running_mean", "features.8.block.2.1.running_var", "features.8.block.2.1.num_batches_tracked", "features.9.block.0.0.weight", "features.9.block.0.1.weight", "features.9.block.0.1.bias", "features.9.block.0.1.running_mean", "features.9.block.0.1.running_var", "features.9.block.0.1.num_batches_tracked", "features.9.block.1.0.weight", "features.9.block.1.1.weight", "features.9.block.1.1.bias", "features.9.block.1.1.running_mean", "features.9.block.1.1.running_var", "features.9.block.1.1.num_batches_tracked", "features.9.block.2.0.weight", "features.9.block.2.1.weight", "features.9.block.2.1.bias", "features.9.block.2.1.running_mean", "features.9.block.2.1.running_var", "features.9.block.2.1.num_batches_tracked", "features.10.block.0.0.weight", "features.10.block.0.1.weight", "features.10.block.0.1.bias", "features.10.block.0.1.running_mean", "features.10.block.0.1.running_var", "features.10.block.0.1.num_batches_tracked", "features.10.block.1.0.weight", "features.10.block.1.1.weight", "features.10.block.1.1.bias", "features.10.block.1.1.running_mean", "features.10.block.1.1.running_var", "features.10.block.1.1.num_batches_tracked", "features.10.block.2.0.weight", "features.10.block.2.1.weight", "features.10.block.2.1.bias", "features.10.block.2.1.running_mean", "features.10.block.2.1.running_var", "features.10.block.2.1.num_batches_tracked", "features.11.block.0.0.weight", "features.11.block.0.1.weight", "features.11.block.0.1.bias", "features.11.block.0.1.running_mean", "features.11.block.0.1.running_var", "features.11.block.0.1.num_batches_tracked", "features.11.block.1.0.weight", "features.11.block.1.1.weight", "features.11.block.1.1.bias", "features.11.block.1.1.running_mean", "features.11.block.1.1.running_var", "features.11.block.1.1.num_batches_tracked", "features.11.block.2.fc1.weight", "features.11.block.2.fc1.bias", "features.11.block.2.fc2.weight", "features.11.block.2.fc2.bias", "features.11.block.3.0.weight", "features.11.block.3.1.weight", "features.11.block.3.1.bias", "features.11.block.3.1.running_mean", "features.11.block.3.1.running_var", "features.11.block.3.1.num_batches_tracked", "features.12.block.0.0.weight", "features.12.block.0.1.weight", "features.12.block.0.1.bias", "features.12.block.0.1.running_mean", "features.12.block.0.1.running_var", "features.12.block.0.1.num_batches_tracked", "features.12.block.1.0.weight", "features.12.block.1.1.weight", "features.12.block.1.1.bias", "features.12.block.1.1.running_mean", "features.12.block.1.1.running_var", "features.12.block.1.1.num_batches_tracked", "features.12.block.2.fc1.weight", "features.12.block.2.fc1.bias", "features.12.block.2.fc2.weight", "features.12.block.2.fc2.bias", "features.12.block.3.0.weight", "features.12.block.3.1.weight", "features.12.block.3.1.bias", "features.12.block.3.1.running_mean", "features.12.block.3.1.running_var", "features.12.block.3.1.num_batches_tracked", "features.13.block.0.0.weight", "features.13.block.0.1.weight", "features.13.block.0.1.bias", "features.13.block.0.1.running_mean", "features.13.block.0.1.running_var", "features.13.block.0.1.num_batches_tracked", "features.13.block.1.0.weight", "features.13.block.1.1.weight", "features.13.block.1.1.bias", "features.13.block.1.1.running_mean", "features.13.block.1.1.running_var", "features.13.block.1.1.num_batches_tracked", "features.13.block.2.fc1.weight", "features.13.block.2.fc1.bias", "features.13.block.2.fc2.weight", "features.13.block.2.fc2.bias", "features.13.block.3.0.weight", "features.13.block.3.1.weight", "features.13.block.3.1.bias", "features.13.block.3.1.running_mean", "features.13.block.3.1.running_var", "features.13.block.3.1.num_batches_tracked", "features.14.block.0.0.weight", "features.14.block.0.1.weight", "features.14.block.0.1.bias", "features.14.block.0.1.running_mean", "features.14.block.0.1.running_var", "features.14.block.0.1.num_batches_tracked", "features.14.block.1.0.weight", "features.14.block.1.1.weight", "features.14.block.1.1.bias", "features.14.block.1.1.running_mean", "features.14.block.1.1.running_var", "features.14.block.1.1.num_batches_tracked", "features.14.block.2.fc1.weight", "features.14.block.2.fc1.bias", "features.14.block.2.fc2.weight", "features.14.block.2.fc2.bias", "features.14.block.3.0.weight", "features.14.block.3.1.weight", "features.14.block.3.1.bias", "features.14.block.3.1.running_mean", "features.14.block.3.1.running_var", "features.14.block.3.1.num_batches_tracked", "features.15.block.0.0.weight", "features.15.block.0.1.weight", "features.15.block.0.1.bias", "features.15.block.0.1.running_mean", "features.15.block.0.1.running_var", "features.15.block.0.1.num_batches_tracked", "features.15.block.1.0.weight", "features.15.block.1.1.weight", "features.15.block.1.1.bias", "features.15.block.1.1.running_mean", "features.15.block.1.1.running_var", "features.15.block.1.1.num_batches_tracked", "features.15.block.2.fc1.weight", "features.15.block.2.fc1.bias", "features.15.block.2.fc2.weight", "features.15.block.2.fc2.bias", "features.15.block.3.0.weight", "features.15.block.3.1.weight", "features.15.block.3.1.bias", "features.15.block.3.1.running_mean", "features.15.block.3.1.running_var", "features.15.block.3.1.num_batches_tracked", "features.16.0.weight", "features.16.1.weight", "features.16.1.bias", "features.16.1.running_mean", "features.16.1.running_var", "features.16.1.num_batches_tracked", "classifier.3.weight", "classifier.3.bias", "classifier.0.weight", "classifier.0.bias". size mismatch for features.0.0.weight: copying a param with shape torch.Size([16, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 3, 3, 3]). size mismatch for features.0.1.weight: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for features.0.1.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for features.0.1.running_mean: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for features.0.1.running_var: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([32]).
model.cpu()
unnormalizer = UnNormalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
class_dict = {0: 'airplane',
1: 'automobile',
2: 'bird',
3: 'cat',
4: 'deer',
5: 'dog',
6: 'frog',
7: 'horse',
8: 'ship',
9: 'truck'}
show_examples(model=model, data_loader=test_loader, unnormalizer=unnormalizer, class_dict=class_dict)
mat = compute_confusion_matrix(model=model, data_loader=test_loader, device=torch.device('cpu'))
plot_confusion_matrix(mat, class_names=class_dict.values())
plt.show()