Lenet5是Yann LeCun发明卷积神经网络,当时这个网络是用来做数字识别的,Yann LeCun用这个卷积神经网络将识别准确率提高到了99%,将其应用与数字识别,当时几乎垄断了美国的支票、邮票数字识别,造成了很大影响,目前Yann LeCun在Facebook担任AI首席科学家,带领着Facebook 的AI团队一路高歌
下面图片中左边开始依次是Yann LeCun、Bengio、Hinton以及华人学者吴恩达
import torch
import torch.nn as nn
from torchvision import datasets,transforms
import torch.optim as optim
import torch.nn.functional as F
这种方式下载数据太慢了,本人直接从官网下载
batch_size = 100
cifar_train = datasets.CIFAR10(root = 'CIFAR_10',train = True,transform = transforms.Compose([
transforms.Resize((32,32)),
transforms.ToTensor()]),download = True)
train_loader = torch.utils.data.DataLoader(cifar_train,train = True,batch_size=batch_size,shuffle=True)
cifar_test = datasets.CIFAR10(root = 'CIFAR_10',train = False,transform = transforms.Compose([
transforms.Resize((32,32)),
transforms.Totensor()]),download = True)
test_loader = torch.utils.data.DataLoader(cifar_test,train = False,batch_size = batch_size,shuffle = True)
官网下载数据集截图如下:
import pickle
import numpy as plt
def load(filename):
with open(filename, 'rb') as fo:
data = pickle.load(fo, encoding='latin1')
return data
fil = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_1'
batch_1 = load(fil)
print(batch_1['data'].shape)
print(batch_1.keys())
(10000, 3072)
dict_keys(['batch_label', 'labels', 'data', 'filenames'])
#数据查看
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
a = batch_1['data']
imgs = a[5, :].reshape([3, 32, 32])
print(imgs)
img = np.stack((imgs[0, :, :], imgs[1, :, :], imgs[2, :, :]), 2)
r = imgs[0, :, :]
g = imgs[1, :, :]
b = imgs[2, :, :]
print(img)
#print(img.shape)
#pic = Image.merge('RGB',(r,g,b))
plt.imshow(r)
plt.axis('off')
plt.show()
[[[159 150 153 ... 91 74 76]
[142 146 155 ... 127 122 86]
[109 99 105 ... 137 163 93]
...
[244 240 241 ... 156 179 200]
[246 243 243 ... 162 178 192]
[246 243 244 ... 166 173 182]]
[[102 91 95 ... 71 63 58]
[ 75 72 76 ... 105 111 69]
[ 67 58 59 ... 112 132 72]
...
[129 123 122 ... 42 59 73]
[133 128 127 ... 44 56 65]
[139 133 132 ... 47 51 57]]
[[101 95 97 ... 56 55 55]
[ 68 66 65 ... 71 93 61]
[ 75 60 52 ... 80 105 71]
...
[ 70 65 65 ... 15 26 36]
[ 74 72 70 ... 14 22 27]
[ 82 78 77 ... 14 17 19]]]
[[[159 102 101]
[150 91 95]
[153 95 97]
...
[ 91 71 56]
[ 74 63 55]
[ 76 58 55]]
[[142 75 68]
[146 72 66]
[155 76 65]
...
[127 105 71]
[122 111 93]
[ 86 69 61]]
[[109 67 75]
[ 99 58 60]
[105 59 52]
...
[137 112 80]
[163 132 105]
[ 93 72 71]]
...
[[244 129 70]
[240 123 65]
[241 122 65]
...
[156 42 15]
[179 59 26]
[200 73 36]]
[[246 133 74]
[243 128 72]
[243 127 70]
...
[162 44 14]
[178 56 22]
[192 65 27]]
[[246 139 82]
[243 133 78]
[244 132 77]
...
[166 47 14]
[173 51 17]
[182 57 19]]]
import pickle
import numpy as plt
def load(filename):
with open(filename, 'rb') as fo:
data = pickle.load(fo, encoding='latin1')
return data
fil = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_1'
batch_1 = load(fil)
print(batch_1['data'].shape)
print(batch_1.keys())
(10000, 3072)
dict_keys(['batch_label', 'labels', 'data', 'filenames'])
'''
transform = transforms.Compose([transforms.ToTensor()])
batch1 = []
#batch1.extend([1])
print(type(batch1))
print(batch1)
batch1.extend(batch_1['data'])
batch1.extend(batch_1['labels'])
#batch1 = np.array(batch1)
print(batch1[0].shape)
batch_1 = transform(batch1)
print(batch_1)
File "<ipython-input-7-daf1fc5163f1>", line 14
print(1)
^
SyntaxError: EOF while scanning triple-quoted string literal
```python
import torch
import torch.nn as nn
from torchvision import datasets,transforms
import torch.optim as optim
import torch.nn.functional as F
import pickle
import numpy as plt
# 数据加载预处理
#def load(filename):
# with open(filename, 'rb') as fo:
# data = pickle.load(fo, encoding='latin1')
def load(file):
with open(file, 'rb') as fo:
dict = pickle.load(fo, encoding='bytes')
return dict
fil_1 = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_1'
fil_2 = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_2'
fil_3 = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_3'
fil_4 = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_4'
fil_5 = 'E:\Download\DigitalImage\cifar-10-batches-py\data_batch_5'
fil_6 = 'E:\Download\DigitalImage\cifar-10-batches-py\\test_batch_1'
path = [fil_1,fil_2,fil_3,fil_4,fil_5,fil_6]
train_data = []
test_data = []
for i in range(len(path)):
if i != len(path)-1:
datas = load(path[i])
#print(datas.keys())
a = datas[b'data'].reshape(10000,3,32,32)
# c = torch.from_numpy(a)
# print(type(a))
#print(a.shape)
train_data.append((torch.FloatTensor(a),torch.LongTensor(datas[b'labels'])))
print()
else:
datas = load(path[i])
test_data = [(torch.FloatTensor(datas[b'data'].reshape(10000,3,32,32)),torch.LongTensor(datas[b'labels']))]
#train_batch_1 = load(fil_1)
#train_batch_2 = load(fil_2)
#train_batch_3 = load(fil_3)
#train_batch_4 = load(fil_4)
#train_batch_5 = load(fil_5)
#test_batch = load(fil_6)
#data_1 = (batch_1['data'].reshape(10000,3,32,32),batch_1['labels'])
#print(data_1.shape)
#data_1 = torch.tensor(data_1)
#print(data_1)
for data,label in train_data:
print(data.shape)
print(type(data))
print(test_data)
```
torch.Size([10000, 3, 32, 32])
<class 'torch.Tensor'>
torch.Size([10000, 3, 32, 32])
<class 'torch.Tensor'>
torch.Size([10000, 3, 32, 32])
<class 'torch.Tensor'>
torch.Size([10000, 3, 32, 32])
<class 'torch.Tensor'>
torch.Size([10000, 3, 32, 32])
<class 'torch.Tensor'>
[(tensor([[[[158., 159., 165., ..., 137., 126., 116.],
[152., 151., 159., ..., 136., 125., 119.],
[151., 151., 158., ..., 139., 130., 120.],
...,
[ 68., 42., 31., ..., 38., 13., 40.],
[ 61., 49., 35., ..., 26., 29., 20.],
[ 54., 56., 45., ..., 24., 34., 21.]],
[[112., 111., 116., ..., 95., 91., 85.],
[112., 110., 114., ..., 95., 91., 88.],
[110., 109., 111., ..., 98., 95., 89.],
...,
[124., 100., 88., ..., 97., 64., 85.],
[116., 102., 85., ..., 82., 82., 64.],
[107., 105., 89., ..., 77., 84., 67.]],
[[ 49., 47., 51., ..., 36., 36., 33.],
[ 51., 40., 45., ..., 31., 32., 34.],
[ 47., 33., 36., ..., 34., 34., 33.],
...,
[177., 148., 137., ..., 146., 108., 127.],
[168., 148., 132., ..., 130., 126., 107.],
[160., 149., 132., ..., 124., 129., 110.]]],
[[[235., 231., 232., ..., 233., 233., 232.],
[238., 235., 235., ..., 236., 236., 235.],
[237., 234., 234., ..., 235., 235., 234.],
...,
[ 87., 43., 19., ..., 169., 182., 188.],
[ 82., 46., 36., ..., 174., 185., 187.],
[ 85., 62., 58., ..., 168., 180., 186.]],
[[235., 231., 232., ..., 233., 233., 232.],
[238., 235., 235., ..., 236., 236., 235.],
[237., 234., 234., ..., 235., 235., 234.],
...,
[ 99., 51., 23., ..., 184., 197., 202.],
[ 96., 57., 44., ..., 189., 200., 202.],
[101., 75., 67., ..., 183., 195., 200.]],
[[235., 231., 232., ..., 233., 233., 232.],
[238., 235., 235., ..., 236., 236., 235.],
[237., 234., 234., ..., 235., 235., 234.],
...,
[ 89., 37., 11., ..., 179., 193., 201.],
[ 82., 36., 22., ..., 183., 196., 200.],
[ 83., 48., 38., ..., 178., 191., 199.]]],
[[[158., 158., 139., ..., 228., 237., 238.],
[170., 172., 151., ..., 232., 246., 246.],
[174., 176., 157., ..., 230., 250., 245.],
...,
[ 31., 30., 26., ..., 37., 9., 4.],
[ 23., 27., 25., ..., 19., 4., 5.],
[ 28., 30., 32., ..., 5., 4., 7.]],
[[190., 187., 166., ..., 231., 239., 241.],
[200., 199., 176., ..., 232., 246., 247.],
[201., 200., 179., ..., 229., 249., 244.],
...,
[ 40., 39., 35., ..., 40., 13., 7.],
[ 34., 38., 36., ..., 20., 6., 7.],
[ 41., 43., 45., ..., 6., 5., 8.]],
[[222., 218., 194., ..., 234., 243., 246.],
[229., 226., 201., ..., 236., 250., 251.],
[225., 222., 199., ..., 232., 251., 247.],
...,
[ 45., 44., 40., ..., 46., 14., 5.],
[ 39., 43., 41., ..., 24., 3., 3.],
[ 47., 50., 52., ..., 8., 3., 7.]]],
...,
[[[ 20., 19., 15., ..., 10., 12., 13.],
[ 21., 20., 18., ..., 10., 10., 12.],
[ 21., 21., 20., ..., 12., 12., 13.],
...,
[ 33., 34., 34., ..., 28., 29., 23.],
[ 33., 34., 34., ..., 27., 27., 25.],
[ 31., 32., 33., ..., 24., 26., 25.]],
[[ 15., 14., 14., ..., 9., 11., 12.],
[ 16., 16., 17., ..., 9., 9., 11.],
[ 16., 17., 18., ..., 11., 11., 12.],
...,
[ 25., 26., 26., ..., 25., 25., 20.],
[ 25., 26., 26., ..., 24., 24., 22.],
[ 23., 24., 25., ..., 23., 23., 20.]],
[[ 12., 11., 11., ..., 7., 9., 10.],
[ 13., 13., 12., ..., 7., 7., 9.],
[ 13., 12., 11., ..., 9., 9., 10.],
...,
[ 13., 15., 15., ..., 52., 58., 42.],
[ 14., 15., 15., ..., 52., 56., 47.],
[ 12., 13., 14., ..., 50., 53., 47.]]],
[[[ 25., 15., 23., ..., 61., 92., 75.],
[ 12., 20., 24., ..., 115., 149., 104.],
[ 12., 15., 34., ..., 154., 157., 116.],
...,
[100., 103., 104., ..., 97., 98., 91.],
[103., 104., 107., ..., 101., 99., 92.],
[ 95., 95., 101., ..., 93., 95., 92.]],
[[ 40., 36., 41., ..., 82., 113., 89.],
[ 25., 37., 36., ..., 134., 168., 117.],
[ 25., 29., 40., ..., 172., 175., 129.],
...,
[129., 132., 134., ..., 128., 126., 121.],
[132., 131., 135., ..., 132., 127., 121.],
[126., 123., 128., ..., 124., 123., 120.]],
[[ 12., 3., 18., ..., 78., 112., 92.],
[ 6., 7., 15., ..., 138., 177., 131.],
[ 11., 6., 24., ..., 182., 192., 151.],
...,
[ 81., 84., 86., ..., 84., 84., 79.],
[ 83., 83., 87., ..., 87., 84., 79.],
[ 78., 76., 81., ..., 80., 81., 80.]]],
[[[ 73., 98., 99., ..., 135., 135., 203.],
[ 69., 84., 68., ..., 85., 71., 120.],
[ 69., 90., 62., ..., 74., 53., 62.],
...,
[123., 132., 129., ..., 108., 62., 27.],
[115., 123., 129., ..., 115., 66., 27.],
[116., 121., 129., ..., 116., 68., 27.]],
[[ 78., 103., 106., ..., 150., 149., 215.],
[ 73., 89., 75., ..., 95., 82., 133.],
[ 73., 95., 71., ..., 81., 62., 74.],
...,
[128., 132., 128., ..., 107., 60., 27.],
[121., 124., 126., ..., 116., 65., 27.],
[120., 122., 128., ..., 115., 65., 26.]],
[[ 75., 113., 114., ..., 152., 154., 223.],
[ 70., 97., 81., ..., 89., 80., 135.],
[ 70., 100., 74., ..., 70., 54., 69.],
...,
[ 96., 102., 100., ..., 88., 55., 28.],
[ 91., 95., 99., ..., 94., 59., 27.],
[ 90., 94., 101., ..., 94., 58., 26.]]]]), tensor([3, 8, 8, ..., 5, 1, 7]))]
```python
#由于Sequential里面只能是类,而view和reshape都是方法因此需要定义一个Flatten类
#将它放在Sequential里头
class Flatten(nn.Module):
def __init__(self):
super(Flatten,self).__init__()
def forward(self,input):
return input.view(input.size(0),-1)
class lenet5(nn.Module):
def __init__(self):
super(lenet5,self).__init__()
self.module = nn.Sequential(
nn.Conv2d(3,6,kernel_size=5,stride=1,padding=0),
nn.MaxPool2d(kernel_size=2,stride=2,padding=0),
nn.Conv2d(6,16,kernel_size=5,stride=1,padding=0),
nn.MaxPool2d(kernel_size=2,stride=2,padding=0),
Flatten(),
nn.Linear(16*5*5,120),
nn.ReLU(),
nn.Linear(120,84),
nn.ReLU(),
nn.Linear(84,10)
)
#tem = torch.randn(2,3,32,32)
# out = self.module(tem)
#print(out.shape
#self.loss_fun = nn.CrossEntropyLoss()
def forward(self,x):
logits = self.module(x)
#loss = self.loss_fun(logits,y)
return logits
epochs = 100
device = torch.device('cuda:0')
Lenet5 = lenet5().to(device)
loss_fun = nn.CrossEntropyLoss().to(device)
optimizer = optim.SGD(Lenet5.parameters(),lr = 1e-3)
for epoch in range(epochs):
Lenet5.train()
for batch_idx,(data,label) in enumerate(train_data):
for i in range(100):
datas = data[i*100:(i+1)*100,:,:,:]
#print(data.shape)
datas = datas.to(device)
#print(data.shape)
logits = Lenet5(datas)
labels = label[i*100:(i+1)*100]
labels = labels.to(device)
loss = loss_fun(logits,labels)
optimizer.zero_grad()
loss.backward()
optimizer.step()
print('epoch:{}\tbatch:{}\tloss:{}'.format(epoch,batch_idx,loss.item()))
loss = 0
correct = 0
Lenet5.eval()
with torch.no_grad():
for batch_idx,(data,label) in enumerate(test_data):
for i in range(100):
datas = data[i*100:(i+1)*100,:,:,:]
datas = datas.to(device)
labels = label[i*100:(i+1)*100]
labels = labels.to(device)
logits = Lenet5(datas)
loss += loss_fun(logits,labels).item()
predict = logits.argmax(dim=1)
correct += predict.eq(labels).float().sum().item()
loss /=len(label)
print('epoch:{}\ttest_data_loss:{}\tAccurate{:2f}%'.format(epoch,loss,100.*correct/len(label)))
epoch:0 batch:0 loss:2.1763486862182617
epoch:0 batch:1 loss:1.8485407829284668
epoch:0 batch:2 loss:1.8671174049377441
epoch:0 batch:3 loss:1.8870524168014526
epoch:0 batch:4 loss:1.9330265522003174
epoch:0 test_data_loss:0.017911282896995544 Accurate36.050000%
epoch:1 batch:0 loss:1.8310177326202393
epoch:1 batch:1 loss:1.6556342840194702
epoch:1 batch:2 loss:1.5648118257522583
epoch:1 batch:3 loss:1.6772332191467285
epoch:1 batch:4 loss:1.8390121459960938
epoch:1 test_data_loss:0.01690780953168869 Accurate40.180000%
epoch:2 batch:0 loss:1.6617430448532104
epoch:2 batch:1 loss:1.6150680780410767
epoch:2 batch:2 loss:1.4591856002807617
epoch:2 batch:3 loss:1.5646525621414185
epoch:2 batch:4 loss:1.7958917617797852
epoch:2 test_data_loss:0.01627845757007599 Accurate42.370000%
epoch:3 batch:0 loss:1.578587532043457
epoch:3 batch:1 loss:1.5681748390197754
epoch:3 batch:2 loss:1.4131228923797607
epoch:3 batch:3 loss:1.489415168762207
epoch:3 batch:4 loss:1.7504119873046875
epoch:3 test_data_loss:0.01585704526901245 Accurate43.700000%
epoch:4 batch:0 loss:1.5407977104187012
epoch:4 batch:1 loss:1.5327751636505127
epoch:4 batch:2 loss:1.3862621784210205
epoch:4 batch:3 loss:1.4344329833984375
epoch:4 batch:4 loss:1.6997625827789307
epoch:4 test_data_loss:0.015395513820648193 Accurate45.150000%
epoch:5 batch:0 loss:1.5082505941390991
epoch:5 batch:1 loss:1.520317554473877
epoch:5 batch:2 loss:1.3617457151412964
epoch:5 batch:3 loss:1.3905024528503418
epoch:5 batch:4 loss:1.649784803390503
epoch:5 test_data_loss:0.015025948679447175 Accurate46.260000%
epoch:6 batch:0 loss:1.4764683246612549
epoch:6 batch:1 loss:1.4926671981811523
epoch:6 batch:2 loss:1.3316032886505127
epoch:6 batch:3 loss:1.3512217998504639
epoch:6 batch:4 loss:1.6095126867294312
epoch:6 test_data_loss:0.014772102546691895 Accurate47.390000%
epoch:7 batch:0 loss:1.454451560974121
epoch:7 batch:1 loss:1.4697648286819458
epoch:7 batch:2 loss:1.3248602151870728
epoch:7 batch:3 loss:1.318414568901062
epoch:7 batch:4 loss:1.5752568244934082
epoch:7 test_data_loss:0.014576126658916473 Accurate48.030000%
epoch:8 batch:0 loss:1.4270124435424805
epoch:8 batch:1 loss:1.4474483728408813
epoch:8 batch:2 loss:1.3211431503295898
epoch:8 batch:3 loss:1.2955034971237183
epoch:8 batch:4 loss:1.561460256576538
epoch:8 test_data_loss:0.014510756587982178 Accurate48.240000%
epoch:9 batch:0 loss:1.399457573890686
epoch:9 batch:1 loss:1.4223369359970093
epoch:9 batch:2 loss:1.3062889575958252
epoch:9 batch:3 loss:1.2729438543319702
epoch:9 batch:4 loss:1.5518829822540283
epoch:9 test_data_loss:0.014557824647426606 Accurate48.320000%
epoch:10 batch:0 loss:1.3641740083694458
epoch:10 batch:1 loss:1.3875764608383179
epoch:10 batch:2 loss:1.3025227785110474
epoch:10 batch:3 loss:1.2468807697296143
epoch:10 batch:4 loss:1.5115150213241577
epoch:10 test_data_loss:0.014227166616916656 Accurate49.220000%
epoch:11 batch:0 loss:1.3503832817077637
epoch:11 batch:1 loss:1.3648884296417236
epoch:11 batch:2 loss:1.2871862649917603
epoch:11 batch:3 loss:1.2195641994476318
epoch:11 batch:4 loss:1.492020845413208
epoch:11 test_data_loss:0.014081847751140594 Accurate49.800000%
epoch:12 batch:0 loss:1.3301435708999634
epoch:12 batch:1 loss:1.34531569480896
epoch:12 batch:2 loss:1.2827187776565552
epoch:12 batch:3 loss:1.2025625705718994
epoch:12 batch:4 loss:1.4770184755325317
epoch:12 test_data_loss:0.013916493248939513 Accurate50.580000%
epoch:13 batch:0 loss:1.3146061897277832
epoch:13 batch:1 loss:1.3243380784988403
epoch:13 batch:2 loss:1.2634878158569336
epoch:13 batch:3 loss:1.18169367313385
epoch:13 batch:4 loss:1.4633888006210327
epoch:13 test_data_loss:0.013972422003746033 Accurate50.270000%
epoch:14 batch:0 loss:1.3072998523712158
epoch:14 batch:1 loss:1.319836139678955
epoch:14 batch:2 loss:1.2426447868347168
epoch:14 batch:3 loss:1.1691384315490723
epoch:14 batch:4 loss:1.443387508392334
epoch:14 test_data_loss:0.013678255820274352 Accurate51.560000%
epoch:15 batch:0 loss:1.296415090560913
epoch:15 batch:1 loss:1.3018113374710083
epoch:15 batch:2 loss:1.2236725091934204
epoch:15 batch:3 loss:1.1569795608520508
epoch:15 batch:4 loss:1.4256402254104614
epoch:15 test_data_loss:0.013456743252277375 Accurate52.280000%
epoch:16 batch:0 loss:1.3056328296661377
epoch:16 batch:1 loss:1.285027027130127
epoch:16 batch:2 loss:1.213087797164917
epoch:16 batch:3 loss:1.1255110502243042
epoch:16 batch:4 loss:1.4150794744491577
epoch:16 test_data_loss:0.013432854449748993 Accurate52.480000%
epoch:17 batch:0 loss:1.286566972732544
epoch:17 batch:1 loss:1.273400902748108
epoch:17 batch:2 loss:1.1688098907470703
epoch:17 batch:3 loss:1.1039488315582275
epoch:17 batch:4 loss:1.403935432434082
epoch:17 test_data_loss:0.013373901331424713 Accurate52.670000%
epoch:18 batch:0 loss:1.2652451992034912
epoch:18 batch:1 loss:1.2678509950637817
epoch:18 batch:2 loss:1.1503956317901611
epoch:18 batch:3 loss:1.1067581176757812
epoch:18 batch:4 loss:1.3943153619766235
epoch:18 test_data_loss:0.013238057947158814 Accurate53.140000%
epoch:19 batch:0 loss:1.249767780303955
epoch:19 batch:1 loss:1.2521820068359375
epoch:19 batch:2 loss:1.1296790838241577
epoch:19 batch:3 loss:1.0934704542160034
epoch:19 batch:4 loss:1.3765597343444824
epoch:19 test_data_loss:0.013092611998319625 Accurate53.710000%
epoch:20 batch:0 loss:1.246160626411438
epoch:20 batch:1 loss:1.2418464422225952
epoch:20 batch:2 loss:1.112160563468933
epoch:20 batch:3 loss:1.0844348669052124
epoch:20 batch:4 loss:1.375006079673767
epoch:20 test_data_loss:0.01314392517209053 Accurate53.820000%
epoch:21 batch:0 loss:1.230027675628662
epoch:21 batch:1 loss:1.2319188117980957
epoch:21 batch:2 loss:1.1040558815002441
epoch:21 batch:3 loss:1.0825090408325195
epoch:21 batch:4 loss:1.361841082572937
epoch:21 test_data_loss:0.013016697251796723 Accurate54.540000%
epoch:22 batch:0 loss:1.2315549850463867
epoch:22 batch:1 loss:1.226099967956543
epoch:22 batch:2 loss:1.0663682222366333
epoch:22 batch:3 loss:1.0613822937011719
epoch:22 batch:4 loss:1.3560349941253662
epoch:22 test_data_loss:0.012939717733860016 Accurate54.580000%
epoch:23 batch:0 loss:1.2108231782913208
epoch:23 batch:1 loss:1.211175799369812
epoch:23 batch:2 loss:1.049925684928894
epoch:23 batch:3 loss:1.0554488897323608
epoch:23 batch:4 loss:1.3443384170532227
epoch:23 test_data_loss:0.012848593050241471 Accurate55.140000%
epoch:24 batch:0 loss:1.1964356899261475
epoch:24 batch:1 loss:1.1944196224212646
epoch:24 batch:2 loss:1.056996464729309
epoch:24 batch:3 loss:1.0372012853622437
epoch:24 batch:4 loss:1.3305768966674805
epoch:24 test_data_loss:0.01277999370098114 Accurate55.210000%
epoch:25 batch:0 loss:1.1803444623947144
epoch:25 batch:1 loss:1.180546522140503
epoch:25 batch:2 loss:1.0308318138122559
epoch:25 batch:3 loss:1.032820463180542
epoch:25 batch:4 loss:1.3212608098983765
epoch:25 test_data_loss:0.012731006252765655 Accurate55.280000%
epoch:26 batch:0 loss:1.1709498167037964
epoch:26 batch:1 loss:1.1684887409210205
epoch:26 batch:2 loss:1.0190114974975586
epoch:26 batch:3 loss:1.0146610736846924
epoch:26 batch:4 loss:1.3171403408050537
epoch:26 test_data_loss:0.012678796166181564 Accurate55.680000%
epoch:27 batch:0 loss:1.15721595287323
epoch:27 batch:1 loss:1.1603751182556152
epoch:27 batch:2 loss:0.9998421669006348
epoch:27 batch:3 loss:1.003671646118164
epoch:27 batch:4 loss:1.3122105598449707
epoch:27 test_data_loss:0.012625258141756059 Accurate55.700000%
epoch:28 batch:0 loss:1.147373080253601
epoch:28 batch:1 loss:1.143071174621582
epoch:28 batch:2 loss:0.9861371517181396
epoch:28 batch:3 loss:0.9906672835350037
epoch:28 batch:4 loss:1.300931692123413
epoch:28 test_data_loss:0.0126634123980999 Accurate55.890000%
epoch:29 batch:0 loss:1.134721279144287
epoch:29 batch:1 loss:1.1332404613494873
epoch:29 batch:2 loss:0.9739859104156494
epoch:29 batch:3 loss:0.9740185737609863
epoch:29 batch:4 loss:1.2824451923370361
epoch:29 test_data_loss:0.012466204243898391 Accurate56.550000%
epoch:30 batch:0 loss:1.1220331192016602
epoch:30 batch:1 loss:1.129509687423706
epoch:30 batch:2 loss:0.9555858373641968
epoch:30 batch:3 loss:0.9615256786346436
epoch:30 batch:4 loss:1.2834577560424805
epoch:30 test_data_loss:0.012503732699155808 Accurate56.550000%
epoch:31 batch:0 loss:1.116666316986084
epoch:31 batch:1 loss:1.1220072507858276
epoch:31 batch:2 loss:0.9467626810073853
epoch:31 batch:3 loss:0.9558188915252686
epoch:31 batch:4 loss:1.2670265436172485
epoch:31 test_data_loss:0.012409158754348755 Accurate56.860000%
epoch:32 batch:0 loss:1.10989248752594
epoch:32 batch:1 loss:1.105167031288147
epoch:32 batch:2 loss:0.9359852075576782
epoch:32 batch:3 loss:0.9423297047615051
epoch:32 batch:4 loss:1.2532808780670166
epoch:32 test_data_loss:0.012353265279531478 Accurate57.120000%
epoch:33 batch:0 loss:1.0959490537643433
epoch:33 batch:1 loss:1.0946422815322876
epoch:33 batch:2 loss:0.9063156247138977
epoch:33 batch:3 loss:0.9346637725830078
epoch:33 batch:4 loss:1.247786045074463
epoch:33 test_data_loss:0.012389025342464447 Accurate56.790000%
epoch:34 batch:0 loss:1.0865745544433594
epoch:34 batch:1 loss:1.0887271165847778
epoch:34 batch:2 loss:0.8950309753417969
epoch:34 batch:3 loss:0.9248678088188171
epoch:34 batch:4 loss:1.2340625524520874
epoch:34 test_data_loss:0.012240403681993485 Accurate57.470000%
epoch:35 batch:0 loss:1.0783060789108276
epoch:35 batch:1 loss:1.0845303535461426
epoch:35 batch:2 loss:0.8918731808662415
epoch:35 batch:3 loss:0.9202204346656799
epoch:35 batch:4 loss:1.2402079105377197
epoch:35 test_data_loss:0.012367400372028351 Accurate57.160000%
epoch:36 batch:0 loss:1.0713376998901367
epoch:36 batch:1 loss:1.0743495225906372
epoch:36 batch:2 loss:0.8726376295089722
epoch:36 batch:3 loss:0.9055319428443909
epoch:36 batch:4 loss:1.2279491424560547
epoch:36 test_data_loss:0.01228697457909584 Accurate57.530000%
epoch:37 batch:0 loss:1.063300371170044
epoch:37 batch:1 loss:1.071332573890686
epoch:37 batch:2 loss:0.8584305644035339
epoch:37 batch:3 loss:0.909121572971344
epoch:37 batch:4 loss:1.237462043762207
epoch:37 test_data_loss:0.012473661673069 Accurate56.820000%
epoch:38 batch:0 loss:1.0622907876968384
epoch:38 batch:1 loss:1.0578161478042603
epoch:38 batch:2 loss:0.8334359526634216
epoch:38 batch:3 loss:0.898313581943512
epoch:38 batch:4 loss:1.1832588911056519
epoch:38 test_data_loss:0.012111672431230545 Accurate58.120000%
epoch:39 batch:0 loss:1.053490161895752
epoch:39 batch:1 loss:1.0428667068481445
epoch:39 batch:2 loss:0.8298377394676208
epoch:39 batch:3 loss:0.8762632012367249
epoch:39 batch:4 loss:1.17948579788208
epoch:39 test_data_loss:0.012120541250705719 Accurate58.140000%
epoch:40 batch:0 loss:1.0463067293167114
epoch:40 batch:1 loss:1.0299921035766602
epoch:40 batch:2 loss:0.822319507598877
epoch:40 batch:3 loss:0.8699830770492554
epoch:40 batch:4 loss:1.1946812868118286
epoch:40 test_data_loss:0.012327069675922394 Accurate57.490000%
epoch:41 batch:0 loss:1.0353924036026
epoch:41 batch:1 loss:1.0170131921768188
epoch:41 batch:2 loss:0.8004801273345947
epoch:41 batch:3 loss:0.8667176961898804
epoch:41 batch:4 loss:1.1923938989639282
epoch:41 test_data_loss:0.012430083268880844 Accurate57.260000%
epoch:42 batch:0 loss:1.0293288230895996
epoch:42 batch:1 loss:1.0096769332885742
epoch:42 batch:2 loss:0.7901542782783508
epoch:42 batch:3 loss:0.8506443500518799
epoch:42 batch:4 loss:1.1419620513916016
epoch:42 test_data_loss:0.01194839488863945 Accurate58.890000%
epoch:43 batch:0 loss:1.0246968269348145
epoch:43 batch:1 loss:1.0024477243423462
epoch:43 batch:2 loss:0.7936599850654602
epoch:43 batch:3 loss:0.8373702168464661
epoch:43 batch:4 loss:1.1571813821792603
epoch:43 test_data_loss:0.012122386461496354 Accurate58.550000%
epoch:44 batch:0 loss:1.0186289548873901
epoch:44 batch:1 loss:0.9998814463615417
epoch:44 batch:2 loss:0.7855499386787415
epoch:44 batch:3 loss:0.8292716145515442
epoch:44 batch:4 loss:1.1527979373931885
epoch:44 test_data_loss:0.012184381687641143 Accurate58.440000%
epoch:45 batch:0 loss:1.005703330039978
epoch:45 batch:1 loss:0.9859725832939148
epoch:45 batch:2 loss:0.7656514048576355
epoch:45 batch:3 loss:0.8201987743377686
epoch:45 batch:4 loss:1.1292855739593506
epoch:45 test_data_loss:0.012021716064214706 Accurate58.920000%
epoch:46 batch:0 loss:1.005447268486023
epoch:46 batch:1 loss:0.9808069467544556
epoch:46 batch:2 loss:0.7645500302314758
epoch:46 batch:3 loss:0.8219192624092102
epoch:46 batch:4 loss:1.124232292175293
epoch:46 test_data_loss:0.01202094299197197 Accurate58.790000%
epoch:47 batch:0 loss:0.9986887574195862
epoch:47 batch:1 loss:0.9843454957008362
epoch:47 batch:2 loss:0.7336840033531189
epoch:47 batch:3 loss:0.810841977596283
epoch:47 batch:4 loss:1.1182644367218018
epoch:47 test_data_loss:0.012076971423625946 Accurate58.770000%
epoch:48 batch:0 loss:0.9982472062110901
epoch:48 batch:1 loss:0.9766039252281189
epoch:48 batch:2 loss:0.7371082901954651
epoch:48 batch:3 loss:0.8079491257667542
epoch:48 batch:4 loss:1.0969032049179077
epoch:48 test_data_loss:0.011909782522916794 Accurate59.150000%
epoch:49 batch:0 loss:0.9908055663108826
epoch:49 batch:1 loss:0.9768622517585754
epoch:49 batch:2 loss:0.7220377326011658
epoch:49 batch:3 loss:0.7978006601333618
epoch:49 batch:4 loss:1.0883194208145142
epoch:49 test_data_loss:0.011909426361322403 Accurate59.320000%
epoch:50 batch:0 loss:0.983595073223114
epoch:50 batch:1 loss:0.9729110598564148
epoch:50 batch:2 loss:0.7186201214790344
epoch:50 batch:3 loss:0.7884392738342285
epoch:50 batch:4 loss:1.0851426124572754
epoch:50 test_data_loss:0.011971778297424317 Accurate59.150000%
epoch:51 batch:0 loss:0.9790523052215576
epoch:51 batch:1 loss:0.9831700325012207
epoch:51 batch:2 loss:0.7067458629608154
epoch:51 batch:3 loss:0.7885497212409973
epoch:51 batch:4 loss:1.0863707065582275
epoch:51 test_data_loss:0.012032448935508727 Accurate58.950000%
epoch:52 batch:0 loss:0.976442277431488
epoch:52 batch:1 loss:0.9837910532951355
epoch:52 batch:2 loss:0.6970487833023071
epoch:52 batch:3 loss:0.79522705078125
epoch:52 batch:4 loss:1.0756380558013916
epoch:52 test_data_loss:0.011955438911914825 Accurate59.340000%
epoch:53 batch:0 loss:0.9686588048934937
epoch:53 batch:1 loss:0.9714369773864746
epoch:53 batch:2 loss:0.696596622467041
epoch:53 batch:3 loss:0.7947900295257568
epoch:53 batch:4 loss:1.0634669065475464
epoch:53 test_data_loss:0.011919073539972305 Accurate59.490000%
epoch:54 batch:0 loss:0.9600600600242615
epoch:54 batch:1 loss:0.9552971720695496
epoch:54 batch:2 loss:0.6850804090499878
epoch:54 batch:3 loss:0.7764192819595337
epoch:54 batch:4 loss:1.0798065662384033
epoch:54 test_data_loss:0.012189370846748352 Accurate58.750000%
epoch:55 batch:0 loss:0.948850691318512
epoch:55 batch:1 loss:0.9429957866668701
epoch:55 batch:2 loss:0.6748811602592468
epoch:55 batch:3 loss:0.7751486301422119
epoch:55 batch:4 loss:1.0750495195388794
epoch:55 test_data_loss:0.012300976008176803 Accurate58.620000%
epoch:56 batch:0 loss:0.9466851949691772
epoch:56 batch:1 loss:0.9432587623596191
epoch:56 batch:2 loss:0.6735990047454834
epoch:56 batch:3 loss:0.751315176486969
epoch:56 batch:4 loss:1.0524924993515015
epoch:56 test_data_loss:0.012020810967683792 Accurate59.500000%
epoch:57 batch:0 loss:0.9404129981994629
epoch:57 batch:1 loss:0.939484715461731
epoch:57 batch:2 loss:0.6665537357330322
epoch:57 batch:3 loss:0.773976743221283
epoch:57 batch:4 loss:1.0542845726013184
epoch:57 test_data_loss:0.012102680951356888 Accurate59.310000%
epoch:58 batch:0 loss:0.9338595867156982
epoch:58 batch:1 loss:0.9297202229499817
epoch:58 batch:2 loss:0.6513926982879639
epoch:58 batch:3 loss:0.7511664628982544
epoch:58 batch:4 loss:1.033987045288086
epoch:58 test_data_loss:0.012076104605197906 Accurate59.430000%
epoch:59 batch:0 loss:0.9271847009658813
epoch:59 batch:1 loss:0.9180575609207153
epoch:59 batch:2 loss:0.6456846594810486
epoch:59 batch:3 loss:0.7758282423019409
epoch:59 batch:4 loss:1.0413581132888794
epoch:59 test_data_loss:0.01211642199754715 Accurate59.290000%
epoch:60 batch:0 loss:0.9270028471946716
epoch:60 batch:1 loss:0.9259335994720459
epoch:60 batch:2 loss:0.6387282013893127
epoch:60 batch:3 loss:0.734138548374176
epoch:60 batch:4 loss:1.036148190498352
epoch:60 test_data_loss:0.012161384063959122 Accurate59.220000%
epoch:61 batch:0 loss:0.9203653931617737
epoch:61 batch:1 loss:0.9158979654312134
epoch:61 batch:2 loss:0.6304754018783569
epoch:61 batch:3 loss:0.7710758447647095
epoch:61 batch:4 loss:1.035487413406372
epoch:61 test_data_loss:0.012326200085878373 Accurate58.760000%
epoch:62 batch:0 loss:0.903017520904541
epoch:62 batch:1 loss:0.916846513748169
epoch:62 batch:2 loss:0.6255664229393005
epoch:62 batch:3 loss:0.7590267062187195
epoch:62 batch:4 loss:0.996479868888855
epoch:62 test_data_loss:0.012058472818136216 Accurate59.870000%
epoch:63 batch:0 loss:0.8996082544326782
epoch:63 batch:1 loss:0.9081469774246216
epoch:63 batch:2 loss:0.6192362308502197
epoch:63 batch:3 loss:0.7516011595726013
epoch:63 batch:4 loss:1.0203711986541748
epoch:63 test_data_loss:0.01221827574968338 Accurate59.070000%
epoch:64 batch:0 loss:0.8907505869865417
epoch:64 batch:1 loss:0.9166998267173767
epoch:64 batch:2 loss:0.6077508330345154
epoch:64 batch:3 loss:0.7394577264785767
epoch:64 batch:4 loss:1.0201599597930908
epoch:64 test_data_loss:0.012330314660072327 Accurate58.870000%
epoch:65 batch:0 loss:0.8966385126113892
epoch:65 batch:1 loss:0.8998122215270996
epoch:65 batch:2 loss:0.6034379601478577
epoch:65 batch:3 loss:0.7274463176727295
epoch:65 batch:4 loss:1.005628228187561
epoch:65 test_data_loss:0.01231836119890213 Accurate58.830000%
epoch:66 batch:0 loss:0.883089005947113
epoch:66 batch:1 loss:0.8922118544578552
epoch:66 batch:2 loss:0.596132218837738
epoch:66 batch:3 loss:0.7443216443061829
epoch:66 batch:4 loss:1.0012356042861938
epoch:66 test_data_loss:0.012521785014867783 Accurate58.590000%
epoch:67 batch:0 loss:0.8771061897277832
epoch:67 batch:1 loss:0.8932440876960754
epoch:67 batch:2 loss:0.5898717641830444
epoch:67 batch:3 loss:0.7238337993621826
epoch:67 batch:4 loss:0.99314284324646
epoch:67 test_data_loss:0.012429105460643769 Accurate59.000000%
epoch:68 batch:0 loss:0.8710014820098877
epoch:68 batch:1 loss:0.8868461847305298
epoch:68 batch:2 loss:0.591881513595581
epoch:68 batch:3 loss:0.7148791551589966
epoch:68 batch:4 loss:0.9507726430892944
epoch:68 test_data_loss:0.012235509532690049 Accurate59.500000%
epoch:69 batch:0 loss:0.875399649143219
epoch:69 batch:1 loss:0.882342517375946
epoch:69 batch:2 loss:0.5730912089347839
epoch:69 batch:3 loss:0.7121666073799133
epoch:69 batch:4 loss:0.9842464923858643
epoch:69 test_data_loss:0.012471738237142562 Accurate58.800000%
epoch:70 batch:0 loss:0.8595896363258362
epoch:70 batch:1 loss:0.8784759640693665
epoch:70 batch:2 loss:0.5651609897613525
epoch:70 batch:3 loss:0.7028424143791199
epoch:70 batch:4 loss:0.9836839437484741
epoch:70 test_data_loss:0.012522421032190322 Accurate58.720000%
epoch:71 batch:0 loss:0.8662053942680359
epoch:71 batch:1 loss:0.8788058757781982
epoch:71 batch:2 loss:0.5588352084159851
epoch:71 batch:3 loss:0.690401017665863
epoch:71 batch:4 loss:0.9646252989768982
epoch:71 test_data_loss:0.012400003510713577 Accurate59.110000%
epoch:72 batch:0 loss:0.8529565334320068
epoch:72 batch:1 loss:0.8709671497344971
epoch:72 batch:2 loss:0.553376317024231
epoch:72 batch:3 loss:0.6751856207847595
epoch:72 batch:4 loss:0.9765558838844299
epoch:72 test_data_loss:0.012685820615291596 Accurate58.630000%
epoch:73 batch:0 loss:0.854845404624939
epoch:73 batch:1 loss:0.8709725737571716
epoch:73 batch:2 loss:0.5648348331451416
epoch:73 batch:3 loss:0.6906089782714844
epoch:73 batch:4 loss:0.9492604732513428
epoch:73 test_data_loss:0.012380959230661391 Accurate59.420000%
epoch:74 batch:0 loss:0.8366735577583313
epoch:74 batch:1 loss:0.8609594702720642
epoch:74 batch:2 loss:0.5395348072052002
epoch:74 batch:3 loss:0.6860594749450684
epoch:74 batch:4 loss:0.9336348176002502
epoch:74 test_data_loss:0.01231137964129448 Accurate59.590000%
epoch:75 batch:0 loss:0.8330693244934082
epoch:75 batch:1 loss:0.8502030968666077
epoch:75 batch:2 loss:0.5497587323188782
epoch:75 batch:3 loss:0.6887615323066711
epoch:75 batch:4 loss:0.9692203402519226
epoch:75 test_data_loss:0.01274453642964363 Accurate58.550000%
epoch:76 batch:0 loss:0.8370388150215149
epoch:76 batch:1 loss:0.8443731069564819
epoch:76 batch:2 loss:0.5396125316619873
epoch:76 batch:3 loss:0.6720179915428162
epoch:76 batch:4 loss:0.9343408346176147
epoch:76 test_data_loss:0.012507897245883942 Accurate59.250000%
epoch:77 batch:0 loss:0.8270650506019592
epoch:77 batch:1 loss:0.8446207642555237
epoch:77 batch:2 loss:0.5341995358467102
epoch:77 batch:3 loss:0.6691818833351135
epoch:77 batch:4 loss:0.9361714124679565
epoch:77 test_data_loss:0.01255682343840599 Accurate59.200000%
epoch:78 batch:0 loss:0.8156286478042603
epoch:78 batch:1 loss:0.8541104197502136
epoch:78 batch:2 loss:0.5318109393119812
epoch:78 batch:3 loss:0.6843156218528748
epoch:78 batch:4 loss:0.9118959307670593
epoch:78 test_data_loss:0.012407086634635925 Accurate59.480000%
epoch:79 batch:0 loss:0.8160406351089478
epoch:79 batch:1 loss:0.8300583362579346
epoch:79 batch:2 loss:0.5285741686820984
epoch:79 batch:3 loss:0.6565198302268982
epoch:79 batch:4 loss:0.8986861705780029
epoch:79 test_data_loss:0.012445626938343049 Accurate59.570000%
epoch:80 batch:0 loss:0.8102062344551086
epoch:80 batch:1 loss:0.8347083926200867
epoch:80 batch:2 loss:0.5339607000350952
epoch:80 batch:3 loss:0.6456961035728455
epoch:80 batch:4 loss:0.9030000567436218
epoch:80 test_data_loss:0.012595359736680984 Accurate58.940000%
epoch:81 batch:0 loss:0.8115819692611694
epoch:81 batch:1 loss:0.8459965586662292
epoch:81 batch:2 loss:0.5200003981590271
epoch:81 batch:3 loss:0.6476116180419922
epoch:81 batch:4 loss:0.9068138003349304
epoch:81 test_data_loss:0.012721691608428955 Accurate58.970000%
epoch:82 batch:0 loss:0.7949211597442627
epoch:82 batch:1 loss:0.8297266960144043
epoch:82 batch:2 loss:0.5128525495529175
epoch:82 batch:3 loss:0.6498642563819885
epoch:82 batch:4 loss:0.894875168800354
epoch:82 test_data_loss:0.012713435411453247 Accurate59.090000%
epoch:83 batch:0 loss:0.791240930557251
epoch:83 batch:1 loss:0.8250916004180908
epoch:83 batch:2 loss:0.5194141864776611
epoch:83 batch:3 loss:0.6340817213058472
epoch:83 batch:4 loss:0.8656267523765564
epoch:83 test_data_loss:0.012319718247652054 Accurate60.230000%
epoch:84 batch:0 loss:0.7851470112800598
epoch:84 batch:1 loss:0.8251030445098877
epoch:84 batch:2 loss:0.5101059675216675
epoch:84 batch:3 loss:0.6454721093177795
epoch:84 batch:4 loss:0.8840279579162598
epoch:84 test_data_loss:0.012764427667856217 Accurate59.060000%
epoch:85 batch:0 loss:0.7791163921356201
epoch:85 batch:1 loss:0.8116323947906494
epoch:85 batch:2 loss:0.5036025047302246
epoch:85 batch:3 loss:0.6301839351654053
epoch:85 batch:4 loss:0.879149854183197
epoch:85 test_data_loss:0.012517074817419052 Accurate59.660000%
epoch:86 batch:0 loss:0.7759548425674438
epoch:86 batch:1 loss:0.8047389984130859
epoch:86 batch:2 loss:0.502409815788269
epoch:86 batch:3 loss:0.6240792870521545
epoch:86 batch:4 loss:0.8872179388999939
epoch:86 test_data_loss:0.012680694687366486 Accurate59.530000%
epoch:87 batch:0 loss:0.7670626640319824
epoch:87 batch:1 loss:0.8061250448226929
epoch:87 batch:2 loss:0.49632957577705383
epoch:87 batch:3 loss:0.6225496530532837
epoch:87 batch:4 loss:0.8548753261566162
epoch:87 test_data_loss:0.012535573565959931 Accurate59.960000%
epoch:88 batch:0 loss:0.7627490162849426
epoch:88 batch:1 loss:0.8064558506011963
epoch:88 batch:2 loss:0.4960155189037323
epoch:88 batch:3 loss:0.6191938519477844
epoch:88 batch:4 loss:0.8474365472793579
epoch:88 test_data_loss:0.012563345158100129 Accurate60.110000%
epoch:89 batch:0 loss:0.7571389675140381
epoch:89 batch:1 loss:0.7934638261795044
epoch:89 batch:2 loss:0.48885154724121094
epoch:89 batch:3 loss:0.6137969493865967
epoch:89 batch:4 loss:0.8477094173431396
epoch:89 test_data_loss:0.012598423415422439 Accurate59.830000%
epoch:90 batch:0 loss:0.7546694874763489
epoch:90 batch:1 loss:0.7917743921279907
epoch:90 batch:2 loss:0.4976850152015686
epoch:90 batch:3 loss:0.5993662476539612
epoch:90 batch:4 loss:0.8570490479469299
epoch:90 test_data_loss:0.012875428235530853 Accurate59.410000%
epoch:91 batch:0 loss:0.7442094683647156
epoch:91 batch:1 loss:0.7596681118011475
epoch:91 batch:2 loss:0.4806060492992401
epoch:91 batch:3 loss:0.6272403597831726
epoch:91 batch:4 loss:0.8467599749565125
epoch:91 test_data_loss:0.012833891832828521 Accurate59.470000%
epoch:92 batch:0 loss:0.7448679208755493
epoch:92 batch:1 loss:0.7580040097236633
epoch:92 batch:2 loss:0.47535035014152527
epoch:92 batch:3 loss:0.5988304018974304
epoch:92 batch:4 loss:0.8385698795318604
epoch:92 test_data_loss:0.012903959184885025 Accurate59.550000%
epoch:93 batch:0 loss:0.735319197177887
epoch:93 batch:1 loss:0.7605016827583313
epoch:93 batch:2 loss:0.46915584802627563
epoch:93 batch:3 loss:0.6321775913238525
epoch:93 batch:4 loss:0.8465431928634644
epoch:93 test_data_loss:0.012943225288391114 Accurate59.610000%
epoch:94 batch:0 loss:0.7304616570472717
epoch:94 batch:1 loss:0.7537645101547241
epoch:94 batch:2 loss:0.4738635718822479
epoch:94 batch:3 loss:0.5927462577819824
epoch:94 batch:4 loss:0.8243400454521179
epoch:94 test_data_loss:0.012895413303375245 Accurate59.910000%
epoch:95 batch:0 loss:0.730658769607544
epoch:95 batch:1 loss:0.7524699568748474
epoch:95 batch:2 loss:0.47555482387542725
epoch:95 batch:3 loss:0.616936445236206
epoch:95 batch:4 loss:0.8252308368682861
epoch:95 test_data_loss:0.013015452116727829 Accurate59.520000%
epoch:96 batch:0 loss:0.7283960580825806
epoch:96 batch:1 loss:0.7443860769271851
epoch:96 batch:2 loss:0.46249961853027344
epoch:96 batch:3 loss:0.5884655117988586
epoch:96 batch:4 loss:0.8256667256355286
epoch:96 test_data_loss:0.01306050174832344 Accurate59.630000%
epoch:97 batch:0 loss:0.7096920609474182
epoch:97 batch:1 loss:0.7447115182876587
epoch:97 batch:2 loss:0.4614408016204834
epoch:97 batch:3 loss:0.6058042645454407
epoch:97 batch:4 loss:0.8241249322891235
epoch:97 test_data_loss:0.01324879680275917 Accurate59.010000%
epoch:98 batch:0 loss:0.7114317417144775
epoch:98 batch:1 loss:0.7325578927993774
epoch:98 batch:2 loss:0.45755741000175476
epoch:98 batch:3 loss:0.5789157152175903
epoch:98 batch:4 loss:0.8268184661865234
epoch:98 test_data_loss:0.013244137221574784 Accurate59.220000%
epoch:99 batch:0 loss:0.7111270427703857
epoch:99 batch:1 loss:0.7397462725639343
epoch:99 batch:2 loss:0.4659014642238617
epoch:99 batch:3 loss:0.5717681646347046
epoch:99 batch:4 loss:0.8100776076316833
epoch:99 test_data_loss:0.013112578052282333 Accurate59.910000%
本人只是将其实现出来学习率和参数初始化是随机选取的,
而且只迭代了100次准确就达到了将近60%