CNN+LSTM
CNN+LSTM
Testing MAE in epoch 0: 10.3750925064
Testing MAE in epoch 1: 10.4844141006
Testing MAE in epoch 2: 10.270113945
Testing MAE in epoch 3: 10.3185472488
Testing MAE in epoch 4: 10.2815971375
Testing MAE in epoch 5: 10.6698894501
Testing MAE in epoch 6: 10.1276693344
Testing MAE in epoch 7: 10.0981492996
Testing MAE in epoch 8: 10.1957941055
Testing MAE in epoch 9: 10.5166063309
Testing MAE in epoch 10: 10.5095157623
Testing MAE in epoch 11: 10.3940849304
Testing MAE in epoch 12: 10.305264473
Testing MAE in epoch 13: 10.298617363
Testing MAE in epoch 14: 10.823056221
Testing MAE in epoch 15: 10.0867042542
Testing MAE in epoch 16: 10.3575077057
Testing MAE in epoch 17: 10.3023538589
Testing MAE in epoch 18: 10.313621521
Testing MAE in epoch 19: 10.1169481277
class ConvNet(nn.Module):
def __init__(self, num_classes=1):
super(ConvNet, self).__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(1, 16,kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(16),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer2 = nn.Sequential(
nn.Conv2d(16, 32, kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(32),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.lstm = nn.LSTM(16128,200)
self.fc = nn.Linear(200, 1)
def forward(self, x):
out = self.layer1(x)
#print(out.shape)
out = self.layer2(out)
out = out.reshape(out.size(0), -1)
#print(out.shape)
out = out.unsqueeze(0)
out, hid = self.lstm(out)
#print(out.shape)
out = out.squeeze(0)
out = self.fc(out)
#print(out.shape)
return out
class ConvNet(nn.Module):
def __init__(self, num_classes=1):
super(ConvNet, self).__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(1, 16,kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(16),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer2 = nn.Sequential(
nn.Conv2d(16, 32, kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(32),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer3 = nn.Sequential(
nn.Conv2d(32, 64, kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(64),
nn.ReLU(),
nn.MaxPool2d(kernel_size=4, stride=2))
self.lstm = nn.LSTM(8064,200)
self.fc = nn.Linear(200, 1)
def forward(self, x):
out = self.layer1(x)
#print(out.shape)
out = self.layer2(out)
out = self.layer3(out)
out = out.reshape(out.size(0), -1)
#print(out.shape)
out = out.unsqueeze(0)
out, hid = self.lstm(out)
#print(out.shape)
out = out.squeeze(0)
out = self.fc(out)
#print(out.shape)
return out
Testing MAE in epoch 0: 10.2088651657
Testing MAE in epoch 1: 10.2906723022
Testing MAE in epoch 2: 10.181760788
Testing MAE in epoch 3: 10.5987415314
Testing MAE in epoch 4: 10.182387352
Testing MAE in epoch 5: 10.3811950684
Testing MAE in epoch 6: 10.3703622818
Testing MAE in epoch 7: 10.3837184906
Testing MAE in epoch 8: 10.2380847931
Testing MAE in epoch 9: 10.9325876236
Testing MAE in epoch 10: 10.3778715134
Testing MAE in epoch 11: 10.1646280289
Testing MAE in epoch 12: 10.2416553497
Testing MAE in epoch 13: 10.155752182
Testing MAE in epoch 14: 10.2135791779
Testing MAE in epoch 15: 10.2569732666
Testing MAE in epoch 16: 10.2894687653
Testing MAE in epoch 17: 10.7199611664
Testing MAE in epoch 18: 10.4396028519
Testing MAE in epoch 19: 10.4319229126
class ConvNet(nn.Module):
def __init__(self, num_classes=1):
super(ConvNet, self).__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(1, 16,kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(16),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer2 = nn.Sequential(
nn.Conv2d(16, 32, kernel_size=2, stride=1, padding=2),
nn.BatchNorm2d(32),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.lstm = nn.LSTM(16128,200,3)
self.fc = nn.Linear(200, 1)
def forward(self, x):
out = self.layer1(x)
#print(out.shape)
out = self.layer2(out)
out = out.reshape(out.size(0), -1)
#print(out.shape)
out = out.unsqueeze(0)
out, hid = self.lstm(out)
#print(out.shape)
out = out.squeeze(0)
out = self.fc(out)
#print(out.shape)
return out
Testing MAE in epoch 0: 10.0391073227
Testing MAE in epoch 1: 10.5044641495
Testing MAE in epoch 2: 10.6294088364
Testing MAE in epoch 3: 10.1677951813
Testing MAE in epoch 4: 10.5848722458
Testing MAE in epoch 5: 10.3339357376
Testing MAE in epoch 6: 10.3954181671
Testing MAE in epoch 7: 10.3198976517
Testing MAE in epoch 8: 10.0761852264
Testing MAE in epoch 9: 10.6136617661
Testing MAE in epoch 10: 9.92497634888
Testing MAE in epoch 11: 10.2302398682
Testing MAE in epoch 12: 10.3068552017
Testing MAE in epoch 13: 10.18638134
Testing MAE in epoch 14: 10.0027036667
Testing MAE in epoch 15: 10.5765810013
Testing MAE in epoch 16: 10.223285675
Testing MAE in epoch 17: 10.4815912247
Testing MAE in epoch 18: 10.6809406281
Testing MAE in epoch 19: 10.649895668
CNN+LSTM with 1000 outputs
Testing MAE in epoch 0: 10.1571788788
Testing MAE in epoch 1: 10.0599842072
Testing MAE in epoch 2: 10.590801239
Testing MAE in epoch 3: 9.95899200439
Testing MAE in epoch 4: 9.99138736725
Testing MAE in epoch 5: 10.1518325806
Testing MAE in epoch 6: 10.4582710266
Testing MAE in epoch 7: 10.9011421204
Testing MAE in epoch 8: 10.2009010315
Testing MAE in epoch 9: 10.4495191574
Testing MAE in epoch 10: 10.2944841385
Testing MAE in epoch 11: 10.0457792282
Testing MAE in epoch 12: 10.1445274353
CNN + 5 LSTM
Testing MAE in epoch 0: 10.7628278732
Testing MAE in epoch 1: 10.2336072922
Testing MAE in epoch 2: 10.2210321426
Testing MAE in epoch 3: 10.5542860031
Testing MAE in epoch 4: 10.7996482849
Testing MAE in epoch 5: 10.1400461197
Testing MAE in epoch 6: 10.1726551056
Testing MAE in epoch 7: 11.0996789932
Testing MAE in epoch 8: 10.2891817093
Testing MAE in epoch 9: 10.8611316681
Testing MAE in epoch 10: 10.2157659531
Testing MAE in epoch 11: 10.1307249069
Depth :
- 1 - 9.92
- 2 - 10.10
- 3- 10.01
- 4- 10.00
- 5 - 9.97
Padding = 1
10.221
More layers : 10.08