Deep Learning Models -- A collection of various deep learning architectures, models, and tips for TensorFlow and PyTorch in Jupyter Notebooks.

In [1]:
%load_ext watermark
%watermark -a 'Sebastian Raschka' -v -p torch
Sebastian Raschka 

CPython 3.6.8
IPython 7.2.0

torch 1.0.0
  • Runs on CPU (not recommended here) or GPU (if available)

Model Zoo -- Convolutional Autoencoder with Nearest-neighbor Interpolation (Trained on 10 categories of the Quickdraw dataset)

A convolutional autoencoder using nearest neighbor upscaling layers that compresses 768-pixel Quickdraw images down to a 7x7x8 (392 pixel) representation.

Imports

In [2]:
import os
import time

import numpy as np
import pandas as pd
from PIL import Image
import matplotlib.pyplot as plt

import torch
import torch.nn as nn
import torch.nn.functional as F

from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from torchvision import transforms


if torch.cuda.is_available():
    torch.backends.cudnn.deterministic = True

Dataset

This notebook is based on Google's Quickdraw dataset (https://quickdraw.withgoogle.com). In particular we will be working with an arbitrary subset of 10 categories in png format:

label_dict = {
         "lollipop": 0,
         "binoculars": 1,
         "mouse": 2,
         "basket": 3,
         "penguin": 4,
         "washing machine": 5,
         "canoe": 6,
         "eyeglasses": 7,
         "beach": 8,
         "screwdriver": 9,
}

(The class labels 0-9 can be ignored in this notebook).

For more details on obtaining and preparing the dataset, please see the

notebook.

In [3]:
df = pd.read_csv('quickdraw_png_set1_train.csv', index_col=0)
df.head()

main_dir = 'quickdraw-png_set1/'

img = Image.open(os.path.join(main_dir, df.index[99]))
img = np.asarray(img, dtype=np.uint8)
print(img.shape)
plt.imshow(np.array(img), cmap='binary')
plt.show()
(28, 28)

Create a Custom Data Loader

In [4]:
class QuickdrawDataset(Dataset):
    """Custom Dataset for loading Quickdraw images"""

    def __init__(self, txt_path, img_dir, transform=None):
    
        df = pd.read_csv(txt_path, sep=",", index_col=0)
        self.img_dir = img_dir
        self.txt_path = txt_path
        self.img_names = df.index.values
        self.y = df['Label'].values
        self.transform = transform

    def __getitem__(self, index):
        img = Image.open(os.path.join(self.img_dir,
                                      self.img_names[index]))
        
        if self.transform is not None:
            img = self.transform(img)
        
        label = self.y[index]
        return img, label

    def __len__(self):
        return self.y.shape[0]
In [5]:
# Note that transforms.ToTensor()
# already divides pixels by 255. internally


BATCH_SIZE = 128

custom_transform = transforms.Compose([#transforms.Lambda(lambda x: x/255.),
                                       transforms.ToTensor()])

train_dataset = QuickdrawDataset(txt_path='quickdraw_png_set1_train.csv',
                                 img_dir='quickdraw-png_set1/',
                                 transform=custom_transform)

train_loader = DataLoader(dataset=train_dataset,
                          batch_size=BATCH_SIZE,
                          shuffle=True,
                          num_workers=4) 
In [6]:
device = torch.device("cuda:3" if torch.cuda.is_available() else "cpu")
torch.manual_seed(0)

num_epochs = 2
for epoch in range(num_epochs):

    for batch_idx, (x, y) in enumerate(train_loader):
        
        print('Epoch:', epoch+1, end='')
        print(' | Batch index:', batch_idx, end='')
        print(' | Batch size:', y.size()[0])
        
        x = x.to(device)
        y = y.to(device)
        break
Epoch: 1 | Batch index: 0 | Batch size: 128
Epoch: 2 | Batch index: 0 | Batch size: 128

Settings

In [7]:
##########################
### SETTINGS
##########################

# Device
device = torch.device("cuda:3" if torch.cuda.is_available() else "cpu")
print('Device:', device)

# Hyperparameters
random_seed = 123
learning_rate = 0.0005
num_epochs = 50
Device: cuda:3

Model

In [8]:
##########################
### MODEL
##########################


class Autoencoder(torch.nn.Module):

    def __init__(self):
        super(Autoencoder, self).__init__()
        
        # calculate same padding:
        # (w - k + 2*p)/s + 1 = o
        # => p = (s(o-1) - w + k)/2
        
        ### ENCODER
        
        # 28x28x1 => 28x28x4
        self.conv_1 = torch.nn.Conv2d(in_channels=1,
                                      out_channels=4,
                                      kernel_size=(3, 3),
                                      stride=(1, 1),
                                      # (1(28-1) - 28 + 3) / 2 = 1
                                      padding=1)
        # 28x28x4 => 14x14x4                              
        self.pool_1 = torch.nn.MaxPool2d(kernel_size=(2, 2),
                                         stride=(2, 2),
                                         # (2(14-1) - 28 + 2) / 2 = 0
                                         padding=0)                                       
        # 14x14x4 => 14x14x8
        self.conv_2 = torch.nn.Conv2d(in_channels=4,
                                      out_channels=8,
                                      kernel_size=(3, 3),
                                      stride=(1, 1),
                                      # (1(14-1) - 14 + 3) / 2 = 1
                                      padding=1)                 
        # 14x14x8 => 7x7x8                             
        self.pool_2 = torch.nn.MaxPool2d(kernel_size=(2, 2),
                                         stride=(2, 2),
                                         # (2(7-1) - 14 + 2) / 2 = 0
                                         padding=0)
        
        ### DECODER
                                         
        # 7x7x8 => 14x14x8                          
        
        ## interpolation
        
        # 14x14x8 => 14x14x8
        self.conv_3 = torch.nn.Conv2d(in_channels=8,
                                      out_channels=4,
                                      kernel_size=(3, 3),
                                      stride=(1, 1),
                                      # (1(14-1) - 14 + 3) / 2 = 1
                                      padding=1)
        # 14x14x4 => 28x28x4                            

        ## interpolation
        
        # 28x28x4 => 28x28x1
        self.conv_4 = torch.nn.Conv2d(in_channels=4,
                                      out_channels=1,
                                      kernel_size=(3, 3),
                                      stride=(1, 1),
                                      # (1(28-1) - 28 + 3) / 2 = 1
                                      padding=1)
        
    def forward(self, x):
        
        ### ENCODER
        x = self.conv_1(x)
        x = F.leaky_relu(x)
        x = self.pool_1(x)
        x = self.conv_2(x)
        x = F.leaky_relu(x)
        x = self.pool_2(x)
        
        ### DECODER
        x = F.interpolate(x, scale_factor=2, mode='nearest')
        x = self.conv_3(x)
        x = F.leaky_relu(x)
        x = F.interpolate(x, scale_factor=2, mode='nearest')
        x = self.conv_4(x)
        x = F.leaky_relu(x)
        x = torch.sigmoid(x)
        return x

    
torch.manual_seed(random_seed)
model = Autoencoder()
model = model.to(device)
    

##########################
### COST AND OPTIMIZER
##########################

cost_fn = torch.nn.BCELoss() # torch.nn.MSELoss()
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)

Training

In [9]:
##########################
### TRAINING
##########################

epoch_start = 1


torch.manual_seed(random_seed)
model = Autoencoder()
model = model.to(device)

optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)


################## Load previous
# the code saves the autoencoder
# after each epoch so that in case
# the training process gets interrupted,
# we will not have to start training it
# from scratch
files = os.listdir()

start_time = time.time()
for epoch in range(epoch_start, num_epochs+1):
    
    
    for batch_idx, (x, y) in enumerate(train_loader):

        # don't need labels, only the images (features)
        features = x.to(device)
        
        ### FORWARD AND BACK PROP
        decoded = model(features)
        cost = F.mse_loss(decoded, features)
        optimizer.zero_grad()
        
        cost.backward()
        
        ### UPDATE MODEL PARAMETERS
        optimizer.step()
        
        ### LOGGING
        if not batch_idx % 500:
            print ('Epoch: %03d/%03d | Batch %04d/%04d | Cost: %.4f' 
                   %(epoch, num_epochs, batch_idx, 
                     len(train_loader), cost))

        
    print('Time elapsed: %.2f min' % ((time.time() - start_time)/60))
print('Total Training Time: %.2f min' % ((time.time() - start_time)/60))
        
# Save model
if os.path.isfile('autoencoder_quickdraw-1_i_%d_%s.pt' % (epoch-1, device)):
    os.remove('autoencoder_quickdraw-1_i_%d_%s.pt' % (epoch-1, device))
torch.save(model.state_dict(), 'autoencoder_quickdraw-1_i_%d_%s.pt' % (epoch, device))
Epoch: 001/050 | Batch 0000/8290 | Cost: 0.2212
Epoch: 001/050 | Batch 0500/8290 | Cost: 0.0968
Epoch: 001/050 | Batch 1000/8290 | Cost: 0.0681
Epoch: 001/050 | Batch 1500/8290 | Cost: 0.0658
Epoch: 001/050 | Batch 2000/8290 | Cost: 0.0531
Epoch: 001/050 | Batch 2500/8290 | Cost: 0.0411
Epoch: 001/050 | Batch 3000/8290 | Cost: 0.0417
Epoch: 001/050 | Batch 3500/8290 | Cost: 0.0363
Epoch: 001/050 | Batch 4000/8290 | Cost: 0.0338
Epoch: 001/050 | Batch 4500/8290 | Cost: 0.0352
Epoch: 001/050 | Batch 5000/8290 | Cost: 0.0363
Epoch: 001/050 | Batch 5500/8290 | Cost: 0.0334
Epoch: 001/050 | Batch 6000/8290 | Cost: 0.0346
Epoch: 001/050 | Batch 6500/8290 | Cost: 0.0299
Epoch: 001/050 | Batch 7000/8290 | Cost: 0.0320
Epoch: 001/050 | Batch 7500/8290 | Cost: 0.0288
Epoch: 001/050 | Batch 8000/8290 | Cost: 0.0288
Time elapsed: 1.08 min
Epoch: 002/050 | Batch 0000/8290 | Cost: 0.0308
Epoch: 002/050 | Batch 0500/8290 | Cost: 0.0291
Epoch: 002/050 | Batch 1000/8290 | Cost: 0.0292
Epoch: 002/050 | Batch 1500/8290 | Cost: 0.0291
Epoch: 002/050 | Batch 2000/8290 | Cost: 0.0259
Epoch: 002/050 | Batch 2500/8290 | Cost: 0.0274
Epoch: 002/050 | Batch 3000/8290 | Cost: 0.0257
Epoch: 002/050 | Batch 3500/8290 | Cost: 0.0262
Epoch: 002/050 | Batch 4000/8290 | Cost: 0.0261
Epoch: 002/050 | Batch 4500/8290 | Cost: 0.0281
Epoch: 002/050 | Batch 5000/8290 | Cost: 0.0238
Epoch: 002/050 | Batch 5500/8290 | Cost: 0.0236
Epoch: 002/050 | Batch 6000/8290 | Cost: 0.0234
Epoch: 002/050 | Batch 6500/8290 | Cost: 0.0219
Epoch: 002/050 | Batch 7000/8290 | Cost: 0.0225
Epoch: 002/050 | Batch 7500/8290 | Cost: 0.0237
Epoch: 002/050 | Batch 8000/8290 | Cost: 0.0237
Time elapsed: 2.01 min
Epoch: 003/050 | Batch 0000/8290 | Cost: 0.0263
Epoch: 003/050 | Batch 0500/8290 | Cost: 0.0231
Epoch: 003/050 | Batch 1000/8290 | Cost: 0.0231
Epoch: 003/050 | Batch 1500/8290 | Cost: 0.0238
Epoch: 003/050 | Batch 2000/8290 | Cost: 0.0235
Epoch: 003/050 | Batch 2500/8290 | Cost: 0.0218
Epoch: 003/050 | Batch 3000/8290 | Cost: 0.0214
Epoch: 003/050 | Batch 3500/8290 | Cost: 0.0223
Epoch: 003/050 | Batch 4000/8290 | Cost: 0.0230
Epoch: 003/050 | Batch 4500/8290 | Cost: 0.0231
Epoch: 003/050 | Batch 5000/8290 | Cost: 0.0222
Epoch: 003/050 | Batch 5500/8290 | Cost: 0.0240
Epoch: 003/050 | Batch 6000/8290 | Cost: 0.0224
Epoch: 003/050 | Batch 6500/8290 | Cost: 0.0221
Epoch: 003/050 | Batch 7000/8290 | Cost: 0.0225
Epoch: 003/050 | Batch 7500/8290 | Cost: 0.0223
Epoch: 003/050 | Batch 8000/8290 | Cost: 0.0210
Time elapsed: 2.95 min
Epoch: 004/050 | Batch 0000/8290 | Cost: 0.0215
Epoch: 004/050 | Batch 0500/8290 | Cost: 0.0225
Epoch: 004/050 | Batch 1000/8290 | Cost: 0.0235
Epoch: 004/050 | Batch 1500/8290 | Cost: 0.0230
Epoch: 004/050 | Batch 2000/8290 | Cost: 0.0218
Epoch: 004/050 | Batch 2500/8290 | Cost: 0.0228
Epoch: 004/050 | Batch 3000/8290 | Cost: 0.0223
Epoch: 004/050 | Batch 3500/8290 | Cost: 0.0221
Epoch: 004/050 | Batch 4000/8290 | Cost: 0.0225
Epoch: 004/050 | Batch 4500/8290 | Cost: 0.0212
Epoch: 004/050 | Batch 5000/8290 | Cost: 0.0219
Epoch: 004/050 | Batch 5500/8290 | Cost: 0.0216
Epoch: 004/050 | Batch 6000/8290 | Cost: 0.0229
Epoch: 004/050 | Batch 6500/8290 | Cost: 0.0221
Epoch: 004/050 | Batch 7000/8290 | Cost: 0.0237
Epoch: 004/050 | Batch 7500/8290 | Cost: 0.0195
Epoch: 004/050 | Batch 8000/8290 | Cost: 0.0195
Time elapsed: 3.88 min
Epoch: 005/050 | Batch 0000/8290 | Cost: 0.0219
Epoch: 005/050 | Batch 0500/8290 | Cost: 0.0214
Epoch: 005/050 | Batch 1000/8290 | Cost: 0.0217
Epoch: 005/050 | Batch 1500/8290 | Cost: 0.0210
Epoch: 005/050 | Batch 2000/8290 | Cost: 0.0220
Epoch: 005/050 | Batch 2500/8290 | Cost: 0.0215
Epoch: 005/050 | Batch 3000/8290 | Cost: 0.0213
Epoch: 005/050 | Batch 3500/8290 | Cost: 0.0214
Epoch: 005/050 | Batch 4000/8290 | Cost: 0.0232
Epoch: 005/050 | Batch 4500/8290 | Cost: 0.0216
Epoch: 005/050 | Batch 5000/8290 | Cost: 0.0214
Epoch: 005/050 | Batch 5500/8290 | Cost: 0.0228
Epoch: 005/050 | Batch 6000/8290 | Cost: 0.0211
Epoch: 005/050 | Batch 6500/8290 | Cost: 0.0221
Epoch: 005/050 | Batch 7000/8290 | Cost: 0.0216
Epoch: 005/050 | Batch 7500/8290 | Cost: 0.0216
Epoch: 005/050 | Batch 8000/8290 | Cost: 0.0208
Time elapsed: 4.82 min
Epoch: 006/050 | Batch 0000/8290 | Cost: 0.0227
Epoch: 006/050 | Batch 0500/8290 | Cost: 0.0226
Epoch: 006/050 | Batch 1000/8290 | Cost: 0.0214
Epoch: 006/050 | Batch 1500/8290 | Cost: 0.0206
Epoch: 006/050 | Batch 2000/8290 | Cost: 0.0209
Epoch: 006/050 | Batch 2500/8290 | Cost: 0.0208
Epoch: 006/050 | Batch 3000/8290 | Cost: 0.0215
Epoch: 006/050 | Batch 3500/8290 | Cost: 0.0226
Epoch: 006/050 | Batch 4000/8290 | Cost: 0.0203
Epoch: 006/050 | Batch 4500/8290 | Cost: 0.0195
Epoch: 006/050 | Batch 5000/8290 | Cost: 0.0215
Epoch: 006/050 | Batch 5500/8290 | Cost: 0.0204
Epoch: 006/050 | Batch 6000/8290 | Cost: 0.0196
Epoch: 006/050 | Batch 6500/8290 | Cost: 0.0209
Epoch: 006/050 | Batch 7000/8290 | Cost: 0.0197
Epoch: 006/050 | Batch 7500/8290 | Cost: 0.0191
Epoch: 006/050 | Batch 8000/8290 | Cost: 0.0218
Time elapsed: 5.76 min
Epoch: 007/050 | Batch 0000/8290 | Cost: 0.0198
Epoch: 007/050 | Batch 0500/8290 | Cost: 0.0211
Epoch: 007/050 | Batch 1000/8290 | Cost: 0.0218
Epoch: 007/050 | Batch 1500/8290 | Cost: 0.0216
Epoch: 007/050 | Batch 2000/8290 | Cost: 0.0218
Epoch: 007/050 | Batch 2500/8290 | Cost: 0.0203
Epoch: 007/050 | Batch 3000/8290 | Cost: 0.0196
Epoch: 007/050 | Batch 3500/8290 | Cost: 0.0203
Epoch: 007/050 | Batch 4000/8290 | Cost: 0.0202
Epoch: 007/050 | Batch 4500/8290 | Cost: 0.0219
Epoch: 007/050 | Batch 5000/8290 | Cost: 0.0190
Epoch: 007/050 | Batch 5500/8290 | Cost: 0.0204
Epoch: 007/050 | Batch 6000/8290 | Cost: 0.0206
Epoch: 007/050 | Batch 6500/8290 | Cost: 0.0201
Epoch: 007/050 | Batch 7000/8290 | Cost: 0.0210
Epoch: 007/050 | Batch 7500/8290 | Cost: 0.0213
Epoch: 007/050 | Batch 8000/8290 | Cost: 0.0215
Time elapsed: 6.69 min
Epoch: 008/050 | Batch 0000/8290 | Cost: 0.0218
Epoch: 008/050 | Batch 0500/8290 | Cost: 0.0229
Epoch: 008/050 | Batch 1000/8290 | Cost: 0.0194
Epoch: 008/050 | Batch 1500/8290 | Cost: 0.0220
Epoch: 008/050 | Batch 2000/8290 | Cost: 0.0208
Epoch: 008/050 | Batch 2500/8290 | Cost: 0.0209
Epoch: 008/050 | Batch 3000/8290 | Cost: 0.0197
Epoch: 008/050 | Batch 3500/8290 | Cost: 0.0218
Epoch: 008/050 | Batch 4000/8290 | Cost: 0.0214
Epoch: 008/050 | Batch 4500/8290 | Cost: 0.0209
Epoch: 008/050 | Batch 5000/8290 | Cost: 0.0202
Epoch: 008/050 | Batch 5500/8290 | Cost: 0.0202
Epoch: 008/050 | Batch 6000/8290 | Cost: 0.0215
Epoch: 008/050 | Batch 6500/8290 | Cost: 0.0213
Epoch: 008/050 | Batch 7000/8290 | Cost: 0.0215
Epoch: 008/050 | Batch 7500/8290 | Cost: 0.0201
Epoch: 008/050 | Batch 8000/8290 | Cost: 0.0215
Time elapsed: 7.62 min
Epoch: 009/050 | Batch 0000/8290 | Cost: 0.0212
Epoch: 009/050 | Batch 0500/8290 | Cost: 0.0211
Epoch: 009/050 | Batch 1000/8290 | Cost: 0.0208
Epoch: 009/050 | Batch 1500/8290 | Cost: 0.0213
Epoch: 009/050 | Batch 2000/8290 | Cost: 0.0196
Epoch: 009/050 | Batch 2500/8290 | Cost: 0.0199
Epoch: 009/050 | Batch 3000/8290 | Cost: 0.0211
Epoch: 009/050 | Batch 3500/8290 | Cost: 0.0218
Epoch: 009/050 | Batch 4000/8290 | Cost: 0.0201
Epoch: 009/050 | Batch 4500/8290 | Cost: 0.0208
Epoch: 009/050 | Batch 5000/8290 | Cost: 0.0202
Epoch: 009/050 | Batch 5500/8290 | Cost: 0.0202
Epoch: 009/050 | Batch 6000/8290 | Cost: 0.0214
Epoch: 009/050 | Batch 6500/8290 | Cost: 0.0197
Epoch: 009/050 | Batch 7000/8290 | Cost: 0.0205
Epoch: 009/050 | Batch 7500/8290 | Cost: 0.0196
Epoch: 009/050 | Batch 8000/8290 | Cost: 0.0199
Time elapsed: 8.55 min
Epoch: 010/050 | Batch 0000/8290 | Cost: 0.0200
Epoch: 010/050 | Batch 0500/8290 | Cost: 0.0210
Epoch: 010/050 | Batch 1000/8290 | Cost: 0.0203
Epoch: 010/050 | Batch 1500/8290 | Cost: 0.0198
Epoch: 010/050 | Batch 2000/8290 | Cost: 0.0186
Epoch: 010/050 | Batch 2500/8290 | Cost: 0.0205
Epoch: 010/050 | Batch 3000/8290 | Cost: 0.0201
Epoch: 010/050 | Batch 3500/8290 | Cost: 0.0197
Epoch: 010/050 | Batch 4000/8290 | Cost: 0.0211
Epoch: 010/050 | Batch 4500/8290 | Cost: 0.0182
Epoch: 010/050 | Batch 5000/8290 | Cost: 0.0208
Epoch: 010/050 | Batch 5500/8290 | Cost: 0.0182
Epoch: 010/050 | Batch 6000/8290 | Cost: 0.0209
Epoch: 010/050 | Batch 6500/8290 | Cost: 0.0229
Epoch: 010/050 | Batch 7000/8290 | Cost: 0.0180
Epoch: 010/050 | Batch 7500/8290 | Cost: 0.0211
Epoch: 010/050 | Batch 8000/8290 | Cost: 0.0194
Time elapsed: 9.48 min
Epoch: 011/050 | Batch 0000/8290 | Cost: 0.0203
Epoch: 011/050 | Batch 0500/8290 | Cost: 0.0197
Epoch: 011/050 | Batch 1000/8290 | Cost: 0.0212
Epoch: 011/050 | Batch 1500/8290 | Cost: 0.0207
Epoch: 011/050 | Batch 2000/8290 | Cost: 0.0203
Epoch: 011/050 | Batch 2500/8290 | Cost: 0.0194
Epoch: 011/050 | Batch 3000/8290 | Cost: 0.0191
Epoch: 011/050 | Batch 3500/8290 | Cost: 0.0202
Epoch: 011/050 | Batch 4000/8290 | Cost: 0.0206
Epoch: 011/050 | Batch 4500/8290 | Cost: 0.0213
Epoch: 011/050 | Batch 5000/8290 | Cost: 0.0205
Epoch: 011/050 | Batch 5500/8290 | Cost: 0.0221
Epoch: 011/050 | Batch 6000/8290 | Cost: 0.0193
Epoch: 011/050 | Batch 6500/8290 | Cost: 0.0203
Epoch: 011/050 | Batch 7000/8290 | Cost: 0.0205
Epoch: 011/050 | Batch 7500/8290 | Cost: 0.0202
Epoch: 011/050 | Batch 8000/8290 | Cost: 0.0206
Time elapsed: 10.40 min
Epoch: 012/050 | Batch 0000/8290 | Cost: 0.0201
Epoch: 012/050 | Batch 0500/8290 | Cost: 0.0190
Epoch: 012/050 | Batch 1000/8290 | Cost: 0.0190
Epoch: 012/050 | Batch 1500/8290 | Cost: 0.0200
Epoch: 012/050 | Batch 2000/8290 | Cost: 0.0216
Epoch: 012/050 | Batch 2500/8290 | Cost: 0.0199
Epoch: 012/050 | Batch 3000/8290 | Cost: 0.0206
Epoch: 012/050 | Batch 3500/8290 | Cost: 0.0199
Epoch: 012/050 | Batch 4000/8290 | Cost: 0.0202
Epoch: 012/050 | Batch 4500/8290 | Cost: 0.0208
Epoch: 012/050 | Batch 5000/8290 | Cost: 0.0201
Epoch: 012/050 | Batch 5500/8290 | Cost: 0.0206
Epoch: 012/050 | Batch 6000/8290 | Cost: 0.0192
Epoch: 012/050 | Batch 6500/8290 | Cost: 0.0210
Epoch: 012/050 | Batch 7000/8290 | Cost: 0.0228
Epoch: 012/050 | Batch 7500/8290 | Cost: 0.0200
Epoch: 012/050 | Batch 8000/8290 | Cost: 0.0191
Time elapsed: 11.33 min
Epoch: 013/050 | Batch 0000/8290 | Cost: 0.0196
Epoch: 013/050 | Batch 0500/8290 | Cost: 0.0193
Epoch: 013/050 | Batch 1000/8290 | Cost: 0.0188
Epoch: 013/050 | Batch 1500/8290 | Cost: 0.0187
Epoch: 013/050 | Batch 2000/8290 | Cost: 0.0205
Epoch: 013/050 | Batch 2500/8290 | Cost: 0.0195
Epoch: 013/050 | Batch 3000/8290 | Cost: 0.0201
Epoch: 013/050 | Batch 3500/8290 | Cost: 0.0216
Epoch: 013/050 | Batch 4000/8290 | Cost: 0.0205
Epoch: 013/050 | Batch 4500/8290 | Cost: 0.0194
Epoch: 013/050 | Batch 5000/8290 | Cost: 0.0202
Epoch: 013/050 | Batch 5500/8290 | Cost: 0.0213
Epoch: 013/050 | Batch 6000/8290 | Cost: 0.0186
Epoch: 013/050 | Batch 6500/8290 | Cost: 0.0195
Epoch: 013/050 | Batch 7000/8290 | Cost: 0.0181
Epoch: 013/050 | Batch 7500/8290 | Cost: 0.0189
Epoch: 013/050 | Batch 8000/8290 | Cost: 0.0190
Time elapsed: 12.27 min
Epoch: 014/050 | Batch 0000/8290 | Cost: 0.0192
Epoch: 014/050 | Batch 0500/8290 | Cost: 0.0198
Epoch: 014/050 | Batch 1000/8290 | Cost: 0.0209
Epoch: 014/050 | Batch 1500/8290 | Cost: 0.0188
Epoch: 014/050 | Batch 2000/8290 | Cost: 0.0200
Epoch: 014/050 | Batch 2500/8290 | Cost: 0.0190
Epoch: 014/050 | Batch 3000/8290 | Cost: 0.0200
Epoch: 014/050 | Batch 3500/8290 | Cost: 0.0203
Epoch: 014/050 | Batch 4000/8290 | Cost: 0.0205
Epoch: 014/050 | Batch 4500/8290 | Cost: 0.0184
Epoch: 014/050 | Batch 5000/8290 | Cost: 0.0194
Epoch: 014/050 | Batch 5500/8290 | Cost: 0.0193
Epoch: 014/050 | Batch 6000/8290 | Cost: 0.0195
Epoch: 014/050 | Batch 6500/8290 | Cost: 0.0195
Epoch: 014/050 | Batch 7000/8290 | Cost: 0.0214
Epoch: 014/050 | Batch 7500/8290 | Cost: 0.0189
Epoch: 014/050 | Batch 8000/8290 | Cost: 0.0201
Time elapsed: 13.20 min
Epoch: 015/050 | Batch 0000/8290 | Cost: 0.0200
Epoch: 015/050 | Batch 0500/8290 | Cost: 0.0198
Epoch: 015/050 | Batch 1000/8290 | Cost: 0.0181
Epoch: 015/050 | Batch 1500/8290 | Cost: 0.0196
Epoch: 015/050 | Batch 2000/8290 | Cost: 0.0204
Epoch: 015/050 | Batch 2500/8290 | Cost: 0.0186
Epoch: 015/050 | Batch 3000/8290 | Cost: 0.0201
Epoch: 015/050 | Batch 3500/8290 | Cost: 0.0201
Epoch: 015/050 | Batch 4000/8290 | Cost: 0.0193
Epoch: 015/050 | Batch 4500/8290 | Cost: 0.0197
Epoch: 015/050 | Batch 5000/8290 | Cost: 0.0181
Epoch: 015/050 | Batch 5500/8290 | Cost: 0.0194
Epoch: 015/050 | Batch 6000/8290 | Cost: 0.0190
Epoch: 015/050 | Batch 6500/8290 | Cost: 0.0202
Epoch: 015/050 | Batch 7000/8290 | Cost: 0.0188
Epoch: 015/050 | Batch 7500/8290 | Cost: 0.0208
Epoch: 015/050 | Batch 8000/8290 | Cost: 0.0185
Time elapsed: 14.14 min
Epoch: 016/050 | Batch 0000/8290 | Cost: 0.0186
Epoch: 016/050 | Batch 0500/8290 | Cost: 0.0194
Epoch: 016/050 | Batch 1000/8290 | Cost: 0.0217
Epoch: 016/050 | Batch 1500/8290 | Cost: 0.0194
Epoch: 016/050 | Batch 2000/8290 | Cost: 0.0180
Epoch: 016/050 | Batch 2500/8290 | Cost: 0.0194
Epoch: 016/050 | Batch 3000/8290 | Cost: 0.0197
Epoch: 016/050 | Batch 3500/8290 | Cost: 0.0183
Epoch: 016/050 | Batch 4000/8290 | Cost: 0.0198
Epoch: 016/050 | Batch 4500/8290 | Cost: 0.0193
Epoch: 016/050 | Batch 5000/8290 | Cost: 0.0198
Epoch: 016/050 | Batch 5500/8290 | Cost: 0.0177
Epoch: 016/050 | Batch 6000/8290 | Cost: 0.0195
Epoch: 016/050 | Batch 6500/8290 | Cost: 0.0203
Epoch: 016/050 | Batch 7000/8290 | Cost: 0.0181
Epoch: 016/050 | Batch 7500/8290 | Cost: 0.0196
Epoch: 016/050 | Batch 8000/8290 | Cost: 0.0186
Time elapsed: 15.08 min
Epoch: 017/050 | Batch 0000/8290 | Cost: 0.0179
Epoch: 017/050 | Batch 0500/8290 | Cost: 0.0200
Epoch: 017/050 | Batch 1000/8290 | Cost: 0.0202
Epoch: 017/050 | Batch 1500/8290 | Cost: 0.0198
Epoch: 017/050 | Batch 2000/8290 | Cost: 0.0199
Epoch: 017/050 | Batch 2500/8290 | Cost: 0.0201
Epoch: 017/050 | Batch 3000/8290 | Cost: 0.0195
Epoch: 017/050 | Batch 3500/8290 | Cost: 0.0193
Epoch: 017/050 | Batch 4000/8290 | Cost: 0.0191
Epoch: 017/050 | Batch 4500/8290 | Cost: 0.0205
Epoch: 017/050 | Batch 5000/8290 | Cost: 0.0200
Epoch: 017/050 | Batch 5500/8290 | Cost: 0.0200
Epoch: 017/050 | Batch 6000/8290 | Cost: 0.0202
Epoch: 017/050 | Batch 6500/8290 | Cost: 0.0193
Epoch: 017/050 | Batch 7000/8290 | Cost: 0.0192
Epoch: 017/050 | Batch 7500/8290 | Cost: 0.0207
Epoch: 017/050 | Batch 8000/8290 | Cost: 0.0183
Time elapsed: 16.02 min
Epoch: 018/050 | Batch 0000/8290 | Cost: 0.0199
Epoch: 018/050 | Batch 0500/8290 | Cost: 0.0202
Epoch: 018/050 | Batch 1000/8290 | Cost: 0.0203
Epoch: 018/050 | Batch 1500/8290 | Cost: 0.0193
Epoch: 018/050 | Batch 2000/8290 | Cost: 0.0190
Epoch: 018/050 | Batch 2500/8290 | Cost: 0.0205
Epoch: 018/050 | Batch 3000/8290 | Cost: 0.0210
Epoch: 018/050 | Batch 3500/8290 | Cost: 0.0184
Epoch: 018/050 | Batch 4000/8290 | Cost: 0.0197
Epoch: 018/050 | Batch 4500/8290 | Cost: 0.0206
Epoch: 018/050 | Batch 5000/8290 | Cost: 0.0173
Epoch: 018/050 | Batch 5500/8290 | Cost: 0.0177
Epoch: 018/050 | Batch 6000/8290 | Cost: 0.0198
Epoch: 018/050 | Batch 6500/8290 | Cost: 0.0200
Epoch: 018/050 | Batch 7000/8290 | Cost: 0.0203
Epoch: 018/050 | Batch 7500/8290 | Cost: 0.0199
Epoch: 018/050 | Batch 8000/8290 | Cost: 0.0193
Time elapsed: 16.96 min
Epoch: 019/050 | Batch 0000/8290 | Cost: 0.0193
Epoch: 019/050 | Batch 0500/8290 | Cost: 0.0193
Epoch: 019/050 | Batch 1000/8290 | Cost: 0.0202
Epoch: 019/050 | Batch 1500/8290 | Cost: 0.0210
Epoch: 019/050 | Batch 2000/8290 | Cost: 0.0193
Epoch: 019/050 | Batch 2500/8290 | Cost: 0.0193
Epoch: 019/050 | Batch 3000/8290 | Cost: 0.0197
Epoch: 019/050 | Batch 3500/8290 | Cost: 0.0197
Epoch: 019/050 | Batch 4000/8290 | Cost: 0.0208
Epoch: 019/050 | Batch 4500/8290 | Cost: 0.0199
Epoch: 019/050 | Batch 5000/8290 | Cost: 0.0191
Epoch: 019/050 | Batch 5500/8290 | Cost: 0.0204
Epoch: 019/050 | Batch 6000/8290 | Cost: 0.0208
Epoch: 019/050 | Batch 6500/8290 | Cost: 0.0207
Epoch: 019/050 | Batch 7000/8290 | Cost: 0.0184
Epoch: 019/050 | Batch 7500/8290 | Cost: 0.0182
Epoch: 019/050 | Batch 8000/8290 | Cost: 0.0203
Time elapsed: 17.91 min
Epoch: 020/050 | Batch 0000/8290 | Cost: 0.0189
Epoch: 020/050 | Batch 0500/8290 | Cost: 0.0190
Epoch: 020/050 | Batch 1000/8290 | Cost: 0.0204
Epoch: 020/050 | Batch 1500/8290 | Cost: 0.0174
Epoch: 020/050 | Batch 2000/8290 | Cost: 0.0205
Epoch: 020/050 | Batch 2500/8290 | Cost: 0.0191
Epoch: 020/050 | Batch 3000/8290 | Cost: 0.0187
Epoch: 020/050 | Batch 3500/8290 | Cost: 0.0192
Epoch: 020/050 | Batch 4000/8290 | Cost: 0.0207
Epoch: 020/050 | Batch 4500/8290 | Cost: 0.0183
Epoch: 020/050 | Batch 5000/8290 | Cost: 0.0191
Epoch: 020/050 | Batch 5500/8290 | Cost: 0.0202
Epoch: 020/050 | Batch 6000/8290 | Cost: 0.0208
Epoch: 020/050 | Batch 6500/8290 | Cost: 0.0211
Epoch: 020/050 | Batch 7000/8290 | Cost: 0.0202
Epoch: 020/050 | Batch 7500/8290 | Cost: 0.0199
Epoch: 020/050 | Batch 8000/8290 | Cost: 0.0184
Time elapsed: 18.85 min
Epoch: 021/050 | Batch 0000/8290 | Cost: 0.0188
Epoch: 021/050 | Batch 0500/8290 | Cost: 0.0208
Epoch: 021/050 | Batch 1000/8290 | Cost: 0.0190
Epoch: 021/050 | Batch 1500/8290 | Cost: 0.0204
Epoch: 021/050 | Batch 2000/8290 | Cost: 0.0203
Epoch: 021/050 | Batch 2500/8290 | Cost: 0.0188
Epoch: 021/050 | Batch 3000/8290 | Cost: 0.0205
Epoch: 021/050 | Batch 3500/8290 | Cost: 0.0188
Epoch: 021/050 | Batch 4000/8290 | Cost: 0.0195
Epoch: 021/050 | Batch 4500/8290 | Cost: 0.0199
Epoch: 021/050 | Batch 5000/8290 | Cost: 0.0198
Epoch: 021/050 | Batch 5500/8290 | Cost: 0.0208
Epoch: 021/050 | Batch 6000/8290 | Cost: 0.0195
Epoch: 021/050 | Batch 6500/8290 | Cost: 0.0194
Epoch: 021/050 | Batch 7000/8290 | Cost: 0.0187
Epoch: 021/050 | Batch 7500/8290 | Cost: 0.0175
Epoch: 021/050 | Batch 8000/8290 | Cost: 0.0195
Time elapsed: 19.79 min
Epoch: 022/050 | Batch 0000/8290 | Cost: 0.0184
Epoch: 022/050 | Batch 0500/8290 | Cost: 0.0184
Epoch: 022/050 | Batch 1000/8290 | Cost: 0.0206
Epoch: 022/050 | Batch 1500/8290 | Cost: 0.0195
Epoch: 022/050 | Batch 2000/8290 | Cost: 0.0192
Epoch: 022/050 | Batch 2500/8290 | Cost: 0.0184
Epoch: 022/050 | Batch 3000/8290 | Cost: 0.0208
Epoch: 022/050 | Batch 3500/8290 | Cost: 0.0194
Epoch: 022/050 | Batch 4000/8290 | Cost: 0.0206
Epoch: 022/050 | Batch 4500/8290 | Cost: 0.0184
Epoch: 022/050 | Batch 5000/8290 | Cost: 0.0201
Epoch: 022/050 | Batch 5500/8290 | Cost: 0.0196
Epoch: 022/050 | Batch 6000/8290 | Cost: 0.0192
Epoch: 022/050 | Batch 6500/8290 | Cost: 0.0196
Epoch: 022/050 | Batch 7000/8290 | Cost: 0.0198
Epoch: 022/050 | Batch 7500/8290 | Cost: 0.0183
Epoch: 022/050 | Batch 8000/8290 | Cost: 0.0199
Time elapsed: 20.72 min
Epoch: 023/050 | Batch 0000/8290 | Cost: 0.0206
Epoch: 023/050 | Batch 0500/8290 | Cost: 0.0210
Epoch: 023/050 | Batch 1000/8290 | Cost: 0.0193
Epoch: 023/050 | Batch 1500/8290 | Cost: 0.0186
Epoch: 023/050 | Batch 2000/8290 | Cost: 0.0180
Epoch: 023/050 | Batch 2500/8290 | Cost: 0.0201
Epoch: 023/050 | Batch 3000/8290 | Cost: 0.0192
Epoch: 023/050 | Batch 3500/8290 | Cost: 0.0187
Epoch: 023/050 | Batch 4000/8290 | Cost: 0.0195
Epoch: 023/050 | Batch 4500/8290 | Cost: 0.0174
Epoch: 023/050 | Batch 5000/8290 | Cost: 0.0199
Epoch: 023/050 | Batch 5500/8290 | Cost: 0.0193
Epoch: 023/050 | Batch 6000/8290 | Cost: 0.0183
Epoch: 023/050 | Batch 6500/8290 | Cost: 0.0193
Epoch: 023/050 | Batch 7000/8290 | Cost: 0.0182
Epoch: 023/050 | Batch 7500/8290 | Cost: 0.0186
Epoch: 023/050 | Batch 8000/8290 | Cost: 0.0208
Time elapsed: 21.65 min
Epoch: 024/050 | Batch 0000/8290 | Cost: 0.0189
Epoch: 024/050 | Batch 0500/8290 | Cost: 0.0189
Epoch: 024/050 | Batch 1000/8290 | Cost: 0.0191
Epoch: 024/050 | Batch 1500/8290 | Cost: 0.0193
Epoch: 024/050 | Batch 2000/8290 | Cost: 0.0192
Epoch: 024/050 | Batch 2500/8290 | Cost: 0.0193
Epoch: 024/050 | Batch 3000/8290 | Cost: 0.0201
Epoch: 024/050 | Batch 3500/8290 | Cost: 0.0193
Epoch: 024/050 | Batch 4000/8290 | Cost: 0.0201
Epoch: 024/050 | Batch 4500/8290 | Cost: 0.0205
Epoch: 024/050 | Batch 5000/8290 | Cost: 0.0193
Epoch: 024/050 | Batch 5500/8290 | Cost: 0.0186
Epoch: 024/050 | Batch 6000/8290 | Cost: 0.0187
Epoch: 024/050 | Batch 6500/8290 | Cost: 0.0186
Epoch: 024/050 | Batch 7000/8290 | Cost: 0.0191
Epoch: 024/050 | Batch 7500/8290 | Cost: 0.0202
Epoch: 024/050 | Batch 8000/8290 | Cost: 0.0172
Time elapsed: 22.58 min
Epoch: 025/050 | Batch 0000/8290 | Cost: 0.0195
Epoch: 025/050 | Batch 0500/8290 | Cost: 0.0203
Epoch: 025/050 | Batch 1000/8290 | Cost: 0.0179
Epoch: 025/050 | Batch 1500/8290 | Cost: 0.0182
Epoch: 025/050 | Batch 2000/8290 | Cost: 0.0195
Epoch: 025/050 | Batch 2500/8290 | Cost: 0.0181
Epoch: 025/050 | Batch 3000/8290 | Cost: 0.0191
Epoch: 025/050 | Batch 3500/8290 | Cost: 0.0181
Epoch: 025/050 | Batch 4000/8290 | Cost: 0.0189
Epoch: 025/050 | Batch 4500/8290 | Cost: 0.0199
Epoch: 025/050 | Batch 5000/8290 | Cost: 0.0211
Epoch: 025/050 | Batch 5500/8290 | Cost: 0.0176
Epoch: 025/050 | Batch 6000/8290 | Cost: 0.0179
Epoch: 025/050 | Batch 6500/8290 | Cost: 0.0186
Epoch: 025/050 | Batch 7000/8290 | Cost: 0.0182
Epoch: 025/050 | Batch 7500/8290 | Cost: 0.0174
Epoch: 025/050 | Batch 8000/8290 | Cost: 0.0187
Time elapsed: 23.52 min
Epoch: 026/050 | Batch 0000/8290 | Cost: 0.0196
Epoch: 026/050 | Batch 0500/8290 | Cost: 0.0174
Epoch: 026/050 | Batch 1000/8290 | Cost: 0.0183
Epoch: 026/050 | Batch 1500/8290 | Cost: 0.0193
Epoch: 026/050 | Batch 2000/8290 | Cost: 0.0183
Epoch: 026/050 | Batch 2500/8290 | Cost: 0.0173
Epoch: 026/050 | Batch 3000/8290 | Cost: 0.0190
Epoch: 026/050 | Batch 3500/8290 | Cost: 0.0181
Epoch: 026/050 | Batch 4000/8290 | Cost: 0.0190
Epoch: 026/050 | Batch 4500/8290 | Cost: 0.0193
Epoch: 026/050 | Batch 5000/8290 | Cost: 0.0194
Epoch: 026/050 | Batch 5500/8290 | Cost: 0.0196
Epoch: 026/050 | Batch 6000/8290 | Cost: 0.0193
Epoch: 026/050 | Batch 6500/8290 | Cost: 0.0187
Epoch: 026/050 | Batch 7000/8290 | Cost: 0.0175
Epoch: 026/050 | Batch 7500/8290 | Cost: 0.0176
Epoch: 026/050 | Batch 8000/8290 | Cost: 0.0177
Time elapsed: 24.45 min
Epoch: 027/050 | Batch 0000/8290 | Cost: 0.0190
Epoch: 027/050 | Batch 0500/8290 | Cost: 0.0180
Epoch: 027/050 | Batch 1000/8290 | Cost: 0.0183
Epoch: 027/050 | Batch 1500/8290 | Cost: 0.0182
Epoch: 027/050 | Batch 2000/8290 | Cost: 0.0194
Epoch: 027/050 | Batch 2500/8290 | Cost: 0.0192
Epoch: 027/050 | Batch 3000/8290 | Cost: 0.0196
Epoch: 027/050 | Batch 3500/8290 | Cost: 0.0183
Epoch: 027/050 | Batch 4000/8290 | Cost: 0.0191
Epoch: 027/050 | Batch 4500/8290 | Cost: 0.0177
Epoch: 027/050 | Batch 5000/8290 | Cost: 0.0178
Epoch: 027/050 | Batch 5500/8290 | Cost: 0.0198
Epoch: 027/050 | Batch 6000/8290 | Cost: 0.0205
Epoch: 027/050 | Batch 6500/8290 | Cost: 0.0192
Epoch: 027/050 | Batch 7000/8290 | Cost: 0.0190
Epoch: 027/050 | Batch 7500/8290 | Cost: 0.0194
Epoch: 027/050 | Batch 8000/8290 | Cost: 0.0176
Time elapsed: 25.39 min
Epoch: 028/050 | Batch 0000/8290 | Cost: 0.0173
Epoch: 028/050 | Batch 0500/8290 | Cost: 0.0178
Epoch: 028/050 | Batch 1000/8290 | Cost: 0.0179
Epoch: 028/050 | Batch 1500/8290 | Cost: 0.0169
Epoch: 028/050 | Batch 2000/8290 | Cost: 0.0173
Epoch: 028/050 | Batch 2500/8290 | Cost: 0.0184
Epoch: 028/050 | Batch 3000/8290 | Cost: 0.0185
Epoch: 028/050 | Batch 3500/8290 | Cost: 0.0183
Epoch: 028/050 | Batch 4000/8290 | Cost: 0.0183
Epoch: 028/050 | Batch 4500/8290 | Cost: 0.0174
Epoch: 028/050 | Batch 5000/8290 | Cost: 0.0191
Epoch: 028/050 | Batch 5500/8290 | Cost: 0.0187
Epoch: 028/050 | Batch 6000/8290 | Cost: 0.0171
Epoch: 028/050 | Batch 6500/8290 | Cost: 0.0179
Epoch: 028/050 | Batch 7000/8290 | Cost: 0.0200
Epoch: 028/050 | Batch 7500/8290 | Cost: 0.0189
Epoch: 028/050 | Batch 8000/8290 | Cost: 0.0198
Time elapsed: 26.33 min
Epoch: 029/050 | Batch 0000/8290 | Cost: 0.0195
Epoch: 029/050 | Batch 0500/8290 | Cost: 0.0179
Epoch: 029/050 | Batch 1000/8290 | Cost: 0.0185
Epoch: 029/050 | Batch 1500/8290 | Cost: 0.0184
Epoch: 029/050 | Batch 2000/8290 | Cost: 0.0191
Epoch: 029/050 | Batch 2500/8290 | Cost: 0.0190
Epoch: 029/050 | Batch 3000/8290 | Cost: 0.0183
Epoch: 029/050 | Batch 3500/8290 | Cost: 0.0188
Epoch: 029/050 | Batch 4000/8290 | Cost: 0.0183
Epoch: 029/050 | Batch 4500/8290 | Cost: 0.0181
Epoch: 029/050 | Batch 5000/8290 | Cost: 0.0195
Epoch: 029/050 | Batch 5500/8290 | Cost: 0.0176
Epoch: 029/050 | Batch 6000/8290 | Cost: 0.0183
Epoch: 029/050 | Batch 6500/8290 | Cost: 0.0169
Epoch: 029/050 | Batch 7000/8290 | Cost: 0.0183
Epoch: 029/050 | Batch 7500/8290 | Cost: 0.0181
Epoch: 029/050 | Batch 8000/8290 | Cost: 0.0192
Time elapsed: 27.27 min
Epoch: 030/050 | Batch 0000/8290 | Cost: 0.0165
Epoch: 030/050 | Batch 0500/8290 | Cost: 0.0184
Epoch: 030/050 | Batch 1000/8290 | Cost: 0.0184
Epoch: 030/050 | Batch 1500/8290 | Cost: 0.0187
Epoch: 030/050 | Batch 2000/8290 | Cost: 0.0178
Epoch: 030/050 | Batch 2500/8290 | Cost: 0.0185
Epoch: 030/050 | Batch 3000/8290 | Cost: 0.0199
Epoch: 030/050 | Batch 3500/8290 | Cost: 0.0181
Epoch: 030/050 | Batch 4000/8290 | Cost: 0.0192
Epoch: 030/050 | Batch 4500/8290 | Cost: 0.0199
Epoch: 030/050 | Batch 5000/8290 | Cost: 0.0198
Epoch: 030/050 | Batch 5500/8290 | Cost: 0.0184
Epoch: 030/050 | Batch 6000/8290 | Cost: 0.0170
Epoch: 030/050 | Batch 6500/8290 | Cost: 0.0184
Epoch: 030/050 | Batch 7000/8290 | Cost: 0.0182
Epoch: 030/050 | Batch 7500/8290 | Cost: 0.0184
Epoch: 030/050 | Batch 8000/8290 | Cost: 0.0175
Time elapsed: 28.21 min
Epoch: 031/050 | Batch 0000/8290 | Cost: 0.0193
Epoch: 031/050 | Batch 0500/8290 | Cost: 0.0169
Epoch: 031/050 | Batch 1000/8290 | Cost: 0.0184
Epoch: 031/050 | Batch 1500/8290 | Cost: 0.0187
Epoch: 031/050 | Batch 2000/8290 | Cost: 0.0184
Epoch: 031/050 | Batch 2500/8290 | Cost: 0.0158
Epoch: 031/050 | Batch 3000/8290 | Cost: 0.0178
Epoch: 031/050 | Batch 3500/8290 | Cost: 0.0203
Epoch: 031/050 | Batch 4000/8290 | Cost: 0.0188
Epoch: 031/050 | Batch 4500/8290 | Cost: 0.0180
Epoch: 031/050 | Batch 5000/8290 | Cost: 0.0179
Epoch: 031/050 | Batch 5500/8290 | Cost: 0.0192
Epoch: 031/050 | Batch 6000/8290 | Cost: 0.0191
Epoch: 031/050 | Batch 6500/8290 | Cost: 0.0182
Epoch: 031/050 | Batch 7000/8290 | Cost: 0.0199
Epoch: 031/050 | Batch 7500/8290 | Cost: 0.0181
Epoch: 031/050 | Batch 8000/8290 | Cost: 0.0184
Time elapsed: 29.14 min
Epoch: 032/050 | Batch 0000/8290 | Cost: 0.0186
Epoch: 032/050 | Batch 0500/8290 | Cost: 0.0187
Epoch: 032/050 | Batch 1000/8290 | Cost: 0.0193
Epoch: 032/050 | Batch 1500/8290 | Cost: 0.0189
Epoch: 032/050 | Batch 2000/8290 | Cost: 0.0189
Epoch: 032/050 | Batch 2500/8290 | Cost: 0.0200
Epoch: 032/050 | Batch 3000/8290 | Cost: 0.0188
Epoch: 032/050 | Batch 3500/8290 | Cost: 0.0195
Epoch: 032/050 | Batch 4000/8290 | Cost: 0.0190
Epoch: 032/050 | Batch 4500/8290 | Cost: 0.0182
Epoch: 032/050 | Batch 5000/8290 | Cost: 0.0155
Epoch: 032/050 | Batch 5500/8290 | Cost: 0.0218
Epoch: 032/050 | Batch 6000/8290 | Cost: 0.0190
Epoch: 032/050 | Batch 6500/8290 | Cost: 0.0186
Epoch: 032/050 | Batch 7000/8290 | Cost: 0.0176
Epoch: 032/050 | Batch 7500/8290 | Cost: 0.0197
Epoch: 032/050 | Batch 8000/8290 | Cost: 0.0190
Time elapsed: 30.07 min
Epoch: 033/050 | Batch 0000/8290 | Cost: 0.0188
Epoch: 033/050 | Batch 0500/8290 | Cost: 0.0182
Epoch: 033/050 | Batch 1000/8290 | Cost: 0.0189
Epoch: 033/050 | Batch 1500/8290 | Cost: 0.0172
Epoch: 033/050 | Batch 2000/8290 | Cost: 0.0174
Epoch: 033/050 | Batch 2500/8290 | Cost: 0.0203
Epoch: 033/050 | Batch 3000/8290 | Cost: 0.0205
Epoch: 033/050 | Batch 3500/8290 | Cost: 0.0194
Epoch: 033/050 | Batch 4000/8290 | Cost: 0.0177
Epoch: 033/050 | Batch 4500/8290 | Cost: 0.0192
Epoch: 033/050 | Batch 5000/8290 | Cost: 0.0192
Epoch: 033/050 | Batch 5500/8290 | Cost: 0.0196
Epoch: 033/050 | Batch 6000/8290 | Cost: 0.0180
Epoch: 033/050 | Batch 6500/8290 | Cost: 0.0196
Epoch: 033/050 | Batch 7000/8290 | Cost: 0.0186
Epoch: 033/050 | Batch 7500/8290 | Cost: 0.0180
Epoch: 033/050 | Batch 8000/8290 | Cost: 0.0168
Time elapsed: 31.01 min
Epoch: 034/050 | Batch 0000/8290 | Cost: 0.0188
Epoch: 034/050 | Batch 0500/8290 | Cost: 0.0181
Epoch: 034/050 | Batch 1000/8290 | Cost: 0.0186
Epoch: 034/050 | Batch 1500/8290 | Cost: 0.0177
Epoch: 034/050 | Batch 2000/8290 | Cost: 0.0168
Epoch: 034/050 | Batch 2500/8290 | Cost: 0.0187
Epoch: 034/050 | Batch 3000/8290 | Cost: 0.0193
Epoch: 034/050 | Batch 3500/8290 | Cost: 0.0191
Epoch: 034/050 | Batch 4000/8290 | Cost: 0.0175
Epoch: 034/050 | Batch 4500/8290 | Cost: 0.0169
Epoch: 034/050 | Batch 5000/8290 | Cost: 0.0172
Epoch: 034/050 | Batch 5500/8290 | Cost: 0.0202
Epoch: 034/050 | Batch 6000/8290 | Cost: 0.0190
Epoch: 034/050 | Batch 6500/8290 | Cost: 0.0175
Epoch: 034/050 | Batch 7000/8290 | Cost: 0.0178
Epoch: 034/050 | Batch 7500/8290 | Cost: 0.0184
Epoch: 034/050 | Batch 8000/8290 | Cost: 0.0176
Time elapsed: 31.94 min
Epoch: 035/050 | Batch 0000/8290 | Cost: 0.0174
Epoch: 035/050 | Batch 0500/8290 | Cost: 0.0176
Epoch: 035/050 | Batch 1000/8290 | Cost: 0.0184
Epoch: 035/050 | Batch 1500/8290 | Cost: 0.0180
Epoch: 035/050 | Batch 2000/8290 | Cost: 0.0208
Epoch: 035/050 | Batch 2500/8290 | Cost: 0.0198
Epoch: 035/050 | Batch 3000/8290 | Cost: 0.0177
Epoch: 035/050 | Batch 3500/8290 | Cost: 0.0174
Epoch: 035/050 | Batch 4000/8290 | Cost: 0.0171
Epoch: 035/050 | Batch 4500/8290 | Cost: 0.0187
Epoch: 035/050 | Batch 5000/8290 | Cost: 0.0175
Epoch: 035/050 | Batch 5500/8290 | Cost: 0.0189
Epoch: 035/050 | Batch 6000/8290 | Cost: 0.0191
Epoch: 035/050 | Batch 6500/8290 | Cost: 0.0177
Epoch: 035/050 | Batch 7000/8290 | Cost: 0.0158
Epoch: 035/050 | Batch 7500/8290 | Cost: 0.0175
Epoch: 035/050 | Batch 8000/8290 | Cost: 0.0190
Time elapsed: 32.87 min
Epoch: 036/050 | Batch 0000/8290 | Cost: 0.0170
Epoch: 036/050 | Batch 0500/8290 | Cost: 0.0188
Epoch: 036/050 | Batch 1000/8290 | Cost: 0.0172
Epoch: 036/050 | Batch 1500/8290 | Cost: 0.0193
Epoch: 036/050 | Batch 2000/8290 | Cost: 0.0168
Epoch: 036/050 | Batch 2500/8290 | Cost: 0.0194
Epoch: 036/050 | Batch 3000/8290 | Cost: 0.0190
Epoch: 036/050 | Batch 3500/8290 | Cost: 0.0189
Epoch: 036/050 | Batch 4000/8290 | Cost: 0.0191
Epoch: 036/050 | Batch 4500/8290 | Cost: 0.0180
Epoch: 036/050 | Batch 5000/8290 | Cost: 0.0202
Epoch: 036/050 | Batch 5500/8290 | Cost: 0.0179
Epoch: 036/050 | Batch 6000/8290 | Cost: 0.0200
Epoch: 036/050 | Batch 6500/8290 | Cost: 0.0175
Epoch: 036/050 | Batch 7000/8290 | Cost: 0.0194
Epoch: 036/050 | Batch 7500/8290 | Cost: 0.0190
Epoch: 036/050 | Batch 8000/8290 | Cost: 0.0189
Time elapsed: 33.80 min
Epoch: 037/050 | Batch 0000/8290 | Cost: 0.0180
Epoch: 037/050 | Batch 0500/8290 | Cost: 0.0181
Epoch: 037/050 | Batch 1000/8290 | Cost: 0.0194
Epoch: 037/050 | Batch 1500/8290 | Cost: 0.0185
Epoch: 037/050 | Batch 2000/8290 | Cost: 0.0190
Epoch: 037/050 | Batch 2500/8290 | Cost: 0.0195
Epoch: 037/050 | Batch 3000/8290 | Cost: 0.0197
Epoch: 037/050 | Batch 3500/8290 | Cost: 0.0174
Epoch: 037/050 | Batch 4000/8290 | Cost: 0.0196
Epoch: 037/050 | Batch 4500/8290 | Cost: 0.0182
Epoch: 037/050 | Batch 5000/8290 | Cost: 0.0174
Epoch: 037/050 | Batch 5500/8290 | Cost: 0.0175
Epoch: 037/050 | Batch 6000/8290 | Cost: 0.0167
Epoch: 037/050 | Batch 6500/8290 | Cost: 0.0161
Epoch: 037/050 | Batch 7000/8290 | Cost: 0.0162
Epoch: 037/050 | Batch 7500/8290 | Cost: 0.0179
Epoch: 037/050 | Batch 8000/8290 | Cost: 0.0196
Time elapsed: 34.73 min
Epoch: 038/050 | Batch 0000/8290 | Cost: 0.0174
Epoch: 038/050 | Batch 0500/8290 | Cost: 0.0184
Epoch: 038/050 | Batch 1000/8290 | Cost: 0.0178
Epoch: 038/050 | Batch 1500/8290 | Cost: 0.0190
Epoch: 038/050 | Batch 2000/8290 | Cost: 0.0182
Epoch: 038/050 | Batch 2500/8290 | Cost: 0.0168
Epoch: 038/050 | Batch 3000/8290 | Cost: 0.0185
Epoch: 038/050 | Batch 3500/8290 | Cost: 0.0178
Epoch: 038/050 | Batch 4000/8290 | Cost: 0.0194
Epoch: 038/050 | Batch 4500/8290 | Cost: 0.0178
Epoch: 038/050 | Batch 5000/8290 | Cost: 0.0193
Epoch: 038/050 | Batch 5500/8290 | Cost: 0.0192
Epoch: 038/050 | Batch 6000/8290 | Cost: 0.0182
Epoch: 038/050 | Batch 6500/8290 | Cost: 0.0182
Epoch: 038/050 | Batch 7000/8290 | Cost: 0.0184
Epoch: 038/050 | Batch 7500/8290 | Cost: 0.0189
Epoch: 038/050 | Batch 8000/8290 | Cost: 0.0176
Time elapsed: 35.66 min
Epoch: 039/050 | Batch 0000/8290 | Cost: 0.0190
Epoch: 039/050 | Batch 0500/8290 | Cost: 0.0171
Epoch: 039/050 | Batch 1000/8290 | Cost: 0.0185
Epoch: 039/050 | Batch 1500/8290 | Cost: 0.0180
Epoch: 039/050 | Batch 2000/8290 | Cost: 0.0193
Epoch: 039/050 | Batch 2500/8290 | Cost: 0.0196
Epoch: 039/050 | Batch 3000/8290 | Cost: 0.0176
Epoch: 039/050 | Batch 3500/8290 | Cost: 0.0185
Epoch: 039/050 | Batch 4000/8290 | Cost: 0.0176
Epoch: 039/050 | Batch 4500/8290 | Cost: 0.0181
Epoch: 039/050 | Batch 5000/8290 | Cost: 0.0189
Epoch: 039/050 | Batch 5500/8290 | Cost: 0.0176
Epoch: 039/050 | Batch 6000/8290 | Cost: 0.0183
Epoch: 039/050 | Batch 6500/8290 | Cost: 0.0191
Epoch: 039/050 | Batch 7000/8290 | Cost: 0.0177
Epoch: 039/050 | Batch 7500/8290 | Cost: 0.0179
Epoch: 039/050 | Batch 8000/8290 | Cost: 0.0168
Time elapsed: 36.60 min
Epoch: 040/050 | Batch 0000/8290 | Cost: 0.0181
Epoch: 040/050 | Batch 0500/8290 | Cost: 0.0184
Epoch: 040/050 | Batch 1000/8290 | Cost: 0.0177
Epoch: 040/050 | Batch 1500/8290 | Cost: 0.0194
Epoch: 040/050 | Batch 2000/8290 | Cost: 0.0176
Epoch: 040/050 | Batch 2500/8290 | Cost: 0.0197
Epoch: 040/050 | Batch 3000/8290 | Cost: 0.0184
Epoch: 040/050 | Batch 3500/8290 | Cost: 0.0170
Epoch: 040/050 | Batch 4000/8290 | Cost: 0.0182
Epoch: 040/050 | Batch 4500/8290 | Cost: 0.0175
Epoch: 040/050 | Batch 5000/8290 | Cost: 0.0194
Epoch: 040/050 | Batch 5500/8290 | Cost: 0.0166
Epoch: 040/050 | Batch 6000/8290 | Cost: 0.0177
Epoch: 040/050 | Batch 6500/8290 | Cost: 0.0177
Epoch: 040/050 | Batch 7000/8290 | Cost: 0.0179
Epoch: 040/050 | Batch 7500/8290 | Cost: 0.0208
Epoch: 040/050 | Batch 8000/8290 | Cost: 0.0184
Time elapsed: 37.53 min
Epoch: 041/050 | Batch 0000/8290 | Cost: 0.0196
Epoch: 041/050 | Batch 0500/8290 | Cost: 0.0179
Epoch: 041/050 | Batch 1000/8290 | Cost: 0.0183
Epoch: 041/050 | Batch 1500/8290 | Cost: 0.0169
Epoch: 041/050 | Batch 2000/8290 | Cost: 0.0189
Epoch: 041/050 | Batch 2500/8290 | Cost: 0.0187
Epoch: 041/050 | Batch 3000/8290 | Cost: 0.0177
Epoch: 041/050 | Batch 3500/8290 | Cost: 0.0182
Epoch: 041/050 | Batch 4000/8290 | Cost: 0.0173
Epoch: 041/050 | Batch 4500/8290 | Cost: 0.0185
Epoch: 041/050 | Batch 5000/8290 | Cost: 0.0168
Epoch: 041/050 | Batch 5500/8290 | Cost: 0.0196
Epoch: 041/050 | Batch 6000/8290 | Cost: 0.0179
Epoch: 041/050 | Batch 6500/8290 | Cost: 0.0171
Epoch: 041/050 | Batch 7000/8290 | Cost: 0.0181
Epoch: 041/050 | Batch 7500/8290 | Cost: 0.0184
Epoch: 041/050 | Batch 8000/8290 | Cost: 0.0187
Time elapsed: 38.47 min
Epoch: 042/050 | Batch 0000/8290 | Cost: 0.0185
Epoch: 042/050 | Batch 0500/8290 | Cost: 0.0175
Epoch: 042/050 | Batch 1000/8290 | Cost: 0.0188
Epoch: 042/050 | Batch 1500/8290 | Cost: 0.0196
Epoch: 042/050 | Batch 2000/8290 | Cost: 0.0185
Epoch: 042/050 | Batch 2500/8290 | Cost: 0.0189
Epoch: 042/050 | Batch 3000/8290 | Cost: 0.0193
Epoch: 042/050 | Batch 3500/8290 | Cost: 0.0185
Epoch: 042/050 | Batch 4000/8290 | Cost: 0.0179
Epoch: 042/050 | Batch 4500/8290 | Cost: 0.0185
Epoch: 042/050 | Batch 5000/8290 | Cost: 0.0170
Epoch: 042/050 | Batch 5500/8290 | Cost: 0.0187
Epoch: 042/050 | Batch 6000/8290 | Cost: 0.0184
Epoch: 042/050 | Batch 6500/8290 | Cost: 0.0185
Epoch: 042/050 | Batch 7000/8290 | Cost: 0.0156
Epoch: 042/050 | Batch 7500/8290 | Cost: 0.0183
Epoch: 042/050 | Batch 8000/8290 | Cost: 0.0186
Time elapsed: 39.41 min
Epoch: 043/050 | Batch 0000/8290 | Cost: 0.0179
Epoch: 043/050 | Batch 0500/8290 | Cost: 0.0180
Epoch: 043/050 | Batch 1000/8290 | Cost: 0.0189
Epoch: 043/050 | Batch 1500/8290 | Cost: 0.0182
Epoch: 043/050 | Batch 2000/8290 | Cost: 0.0167
Epoch: 043/050 | Batch 2500/8290 | Cost: 0.0178
Epoch: 043/050 | Batch 3000/8290 | Cost: 0.0180
Epoch: 043/050 | Batch 3500/8290 | Cost: 0.0175
Epoch: 043/050 | Batch 4000/8290 | Cost: 0.0177
Epoch: 043/050 | Batch 4500/8290 | Cost: 0.0180
Epoch: 043/050 | Batch 5000/8290 | Cost: 0.0174
Epoch: 043/050 | Batch 5500/8290 | Cost: 0.0200
Epoch: 043/050 | Batch 6000/8290 | Cost: 0.0168
Epoch: 043/050 | Batch 6500/8290 | Cost: 0.0186
Epoch: 043/050 | Batch 7000/8290 | Cost: 0.0186
Epoch: 043/050 | Batch 7500/8290 | Cost: 0.0202
Epoch: 043/050 | Batch 8000/8290 | Cost: 0.0189
Time elapsed: 40.35 min
Epoch: 044/050 | Batch 0000/8290 | Cost: 0.0166
Epoch: 044/050 | Batch 0500/8290 | Cost: 0.0181
Epoch: 044/050 | Batch 1000/8290 | Cost: 0.0185
Epoch: 044/050 | Batch 1500/8290 | Cost: 0.0186
Epoch: 044/050 | Batch 2000/8290 | Cost: 0.0168
Epoch: 044/050 | Batch 2500/8290 | Cost: 0.0166
Epoch: 044/050 | Batch 3000/8290 | Cost: 0.0178
Epoch: 044/050 | Batch 3500/8290 | Cost: 0.0176
Epoch: 044/050 | Batch 4000/8290 | Cost: 0.0180
Epoch: 044/050 | Batch 4500/8290 | Cost: 0.0175
Epoch: 044/050 | Batch 5000/8290 | Cost: 0.0186
Epoch: 044/050 | Batch 5500/8290 | Cost: 0.0162
Epoch: 044/050 | Batch 6000/8290 | Cost: 0.0181
Epoch: 044/050 | Batch 6500/8290 | Cost: 0.0183
Epoch: 044/050 | Batch 7000/8290 | Cost: 0.0190
Epoch: 044/050 | Batch 7500/8290 | Cost: 0.0175
Epoch: 044/050 | Batch 8000/8290 | Cost: 0.0174
Time elapsed: 41.30 min
Epoch: 045/050 | Batch 0000/8290 | Cost: 0.0166
Epoch: 045/050 | Batch 0500/8290 | Cost: 0.0186
Epoch: 045/050 | Batch 1000/8290 | Cost: 0.0186
Epoch: 045/050 | Batch 1500/8290 | Cost: 0.0176
Epoch: 045/050 | Batch 2000/8290 | Cost: 0.0182
Epoch: 045/050 | Batch 2500/8290 | Cost: 0.0188
Epoch: 045/050 | Batch 3000/8290 | Cost: 0.0171
Epoch: 045/050 | Batch 3500/8290 | Cost: 0.0171
Epoch: 045/050 | Batch 4000/8290 | Cost: 0.0187
Epoch: 045/050 | Batch 4500/8290 | Cost: 0.0172
Epoch: 045/050 | Batch 5000/8290 | Cost: 0.0181
Epoch: 045/050 | Batch 5500/8290 | Cost: 0.0183
Epoch: 045/050 | Batch 6000/8290 | Cost: 0.0183
Epoch: 045/050 | Batch 6500/8290 | Cost: 0.0190
Epoch: 045/050 | Batch 7000/8290 | Cost: 0.0177
Epoch: 045/050 | Batch 7500/8290 | Cost: 0.0164
Epoch: 045/050 | Batch 8000/8290 | Cost: 0.0183
Time elapsed: 42.24 min
Epoch: 046/050 | Batch 0000/8290 | Cost: 0.0171
Epoch: 046/050 | Batch 0500/8290 | Cost: 0.0174
Epoch: 046/050 | Batch 1000/8290 | Cost: 0.0176
Epoch: 046/050 | Batch 1500/8290 | Cost: 0.0176
Epoch: 046/050 | Batch 2000/8290 | Cost: 0.0174
Epoch: 046/050 | Batch 2500/8290 | Cost: 0.0194
Epoch: 046/050 | Batch 3000/8290 | Cost: 0.0175
Epoch: 046/050 | Batch 3500/8290 | Cost: 0.0184
Epoch: 046/050 | Batch 4000/8290 | Cost: 0.0187
Epoch: 046/050 | Batch 4500/8290 | Cost: 0.0177
Epoch: 046/050 | Batch 5000/8290 | Cost: 0.0184
Epoch: 046/050 | Batch 5500/8290 | Cost: 0.0190
Epoch: 046/050 | Batch 6000/8290 | Cost: 0.0171
Epoch: 046/050 | Batch 6500/8290 | Cost: 0.0184
Epoch: 046/050 | Batch 7000/8290 | Cost: 0.0167
Epoch: 046/050 | Batch 7500/8290 | Cost: 0.0185
Epoch: 046/050 | Batch 8000/8290 | Cost: 0.0188
Time elapsed: 43.18 min
Epoch: 047/050 | Batch 0000/8290 | Cost: 0.0184
Epoch: 047/050 | Batch 0500/8290 | Cost: 0.0167
Epoch: 047/050 | Batch 1000/8290 | Cost: 0.0169
Epoch: 047/050 | Batch 1500/8290 | Cost: 0.0182
Epoch: 047/050 | Batch 2000/8290 | Cost: 0.0191
Epoch: 047/050 | Batch 2500/8290 | Cost: 0.0172
Epoch: 047/050 | Batch 3000/8290 | Cost: 0.0169
Epoch: 047/050 | Batch 3500/8290 | Cost: 0.0183
Epoch: 047/050 | Batch 4000/8290 | Cost: 0.0173
Epoch: 047/050 | Batch 4500/8290 | Cost: 0.0163
Epoch: 047/050 | Batch 5000/8290 | Cost: 0.0165
Epoch: 047/050 | Batch 5500/8290 | Cost: 0.0184
Epoch: 047/050 | Batch 6000/8290 | Cost: 0.0163
Epoch: 047/050 | Batch 6500/8290 | Cost: 0.0181
Epoch: 047/050 | Batch 7000/8290 | Cost: 0.0184
Epoch: 047/050 | Batch 7500/8290 | Cost: 0.0181
Epoch: 047/050 | Batch 8000/8290 | Cost: 0.0180
Time elapsed: 44.11 min
Epoch: 048/050 | Batch 0000/8290 | Cost: 0.0173
Epoch: 048/050 | Batch 0500/8290 | Cost: 0.0166
Epoch: 048/050 | Batch 1000/8290 | Cost: 0.0177
Epoch: 048/050 | Batch 1500/8290 | Cost: 0.0174
Epoch: 048/050 | Batch 2000/8290 | Cost: 0.0188
Epoch: 048/050 | Batch 2500/8290 | Cost: 0.0192
Epoch: 048/050 | Batch 3000/8290 | Cost: 0.0170
Epoch: 048/050 | Batch 3500/8290 | Cost: 0.0170
Epoch: 048/050 | Batch 4000/8290 | Cost: 0.0194
Epoch: 048/050 | Batch 4500/8290 | Cost: 0.0185
Epoch: 048/050 | Batch 5000/8290 | Cost: 0.0180
Epoch: 048/050 | Batch 5500/8290 | Cost: 0.0187
Epoch: 048/050 | Batch 6000/8290 | Cost: 0.0168
Epoch: 048/050 | Batch 6500/8290 | Cost: 0.0199
Epoch: 048/050 | Batch 7000/8290 | Cost: 0.0174
Epoch: 048/050 | Batch 7500/8290 | Cost: 0.0189
Epoch: 048/050 | Batch 8000/8290 | Cost: 0.0175
Time elapsed: 45.03 min
Epoch: 049/050 | Batch 0000/8290 | Cost: 0.0185
Epoch: 049/050 | Batch 0500/8290 | Cost: 0.0185
Epoch: 049/050 | Batch 1000/8290 | Cost: 0.0180
Epoch: 049/050 | Batch 1500/8290 | Cost: 0.0173
Epoch: 049/050 | Batch 2000/8290 | Cost: 0.0163
Epoch: 049/050 | Batch 2500/8290 | Cost: 0.0191
Epoch: 049/050 | Batch 3000/8290 | Cost: 0.0177
Epoch: 049/050 | Batch 3500/8290 | Cost: 0.0161
Epoch: 049/050 | Batch 4000/8290 | Cost: 0.0180
Epoch: 049/050 | Batch 4500/8290 | Cost: 0.0179
Epoch: 049/050 | Batch 5000/8290 | Cost: 0.0173
Epoch: 049/050 | Batch 5500/8290 | Cost: 0.0190
Epoch: 049/050 | Batch 6000/8290 | Cost: 0.0165
Epoch: 049/050 | Batch 6500/8290 | Cost: 0.0186
Epoch: 049/050 | Batch 7000/8290 | Cost: 0.0161
Epoch: 049/050 | Batch 7500/8290 | Cost: 0.0173
Epoch: 049/050 | Batch 8000/8290 | Cost: 0.0178
Time elapsed: 45.96 min
Epoch: 050/050 | Batch 0000/8290 | Cost: 0.0171
Epoch: 050/050 | Batch 0500/8290 | Cost: 0.0168
Epoch: 050/050 | Batch 1000/8290 | Cost: 0.0178
Epoch: 050/050 | Batch 1500/8290 | Cost: 0.0169
Epoch: 050/050 | Batch 2000/8290 | Cost: 0.0172
Epoch: 050/050 | Batch 2500/8290 | Cost: 0.0169
Epoch: 050/050 | Batch 3000/8290 | Cost: 0.0168
Epoch: 050/050 | Batch 3500/8290 | Cost: 0.0155
Epoch: 050/050 | Batch 4000/8290 | Cost: 0.0180
Epoch: 050/050 | Batch 4500/8290 | Cost: 0.0187
Epoch: 050/050 | Batch 5000/8290 | Cost: 0.0189
Epoch: 050/050 | Batch 5500/8290 | Cost: 0.0182
Epoch: 050/050 | Batch 6000/8290 | Cost: 0.0193
Epoch: 050/050 | Batch 6500/8290 | Cost: 0.0189
Epoch: 050/050 | Batch 7000/8290 | Cost: 0.0176
Epoch: 050/050 | Batch 7500/8290 | Cost: 0.0174
Epoch: 050/050 | Batch 8000/8290 | Cost: 0.0180
Time elapsed: 46.89 min
Total Training Time: 46.89 min

Evaluation

In [10]:
%matplotlib inline
import matplotlib.pyplot as plt


model = Autoencoder()
model = model.to(device)
model.load_state_dict(torch.load('autoencoder_quickdraw-1_i_%d_%s.pt' % (num_epochs, device)))
model.eval()
torch.manual_seed(random_seed)

for batch_idx, (x, y) in enumerate(train_loader):
    features = x.to(device)
    decoded = model(features)
    break



##########################
### VISUALIZATION
##########################

n_images = 5

fig, axes = plt.subplots(nrows=2, ncols=n_images, 
                         sharex=True, sharey=True, figsize=(18, 5))
orig_images = features.detach().cpu().numpy()[:n_images]
orig_images = np.moveaxis(orig_images, 1, -1)

decoded_images = decoded.detach().cpu().numpy()[:n_images]
decoded_images = np.moveaxis(decoded_images, 1, -1)


for i in range(n_images):
    for ax, img in zip(axes, [orig_images, decoded_images]):
        ax[i].axis('off')
        ax[i].imshow(img[i].reshape(28, 28), cmap='binary')
In [11]:
%watermark -iv
numpy       1.15.4
pandas      0.23.4
PIL.Image   5.3.0
torch       1.0.0