import torch
from torch.autograd import Variable
from visdom import Visdom
x_data = Variable(torch.Tensor([[0.6], [1.0], [3.5], [4.0]]))
y_data = Variable(torch.Tensor([[0.], [0.], [1.], [1.]]))
class Model(torch.nn.Module):
def __init__(self):
super(Model, self).__init__()
self.linear = torch.nn.Linear(1, 1) # One in one out
self.sigmoid = torch.nn.Sigmoid()
def forward(self, x):
y_pred = self.sigmoid(self.linear(x))
return y_pred
# Our model
model = Model()
# Construct loss function and optimizer
criterion = torch.nn.BCELoss(size_average=True)
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
global_step = 0
viz = Visdom()
viz.line([0.], [0.], win='logistics_loss', opts=dict(title='logistics loss'))
epochs = 5000
# Training loop
for epoch in range(epochs):
# Forward pass
y_pred = model(x_data)
# Compute loss
loss = criterion(y_pred, y_data)
# Zero gradients
optimizer.zero_grad()
# Backward pass
loss.backward()
# update weights
optimizer.step()
global_step +=1
viz.line([loss.item()], [global_step], win='logistics_loss', update='append')
if loss.item() >= 1e-4:
if epoch % 10==0:
print("Epoch {}:\t[{}/{} ({:.0f}%)] \t Loss {:.6f}".format(epoch, global_step, epochs, 100. * global_step / epochs,loss.item()))
else:
print("Come on man!")
break
Epoch 0: [1/5000 (0%)] Loss 0.566876
Epoch 10: [11/5000 (0%)] Loss 0.525785
Epoch 20: [21/5000 (0%)] Loss 0.497004
Epoch 30: [31/5000 (1%)] Loss 0.476217
Epoch 40: [41/5000 (1%)] Loss 0.460689
Epoch 50: [51/5000 (1%)] Loss 0.448684
Epoch 60: [61/5000 (1%)] Loss 0.439089
Epoch 70: [71/5000 (1%)] Loss 0.431176
Epoch 80: [81/5000 (2%)] Loss 0.424461
Epoch 90: [91/5000 (2%)] Loss 0.418614
Epoch 100: [101/5000 (2%)] Loss 0.413408
Epoch 110: [111/5000 (2%)] Loss 0.408684
Epoch 120: [121/5000 (2%)] Loss 0.404327
Epoch 130: [131/5000 (3%)] Loss 0.400255
Epoch 140: [141/5000 (3%)] Loss 0.396408
Epoch 150: [151/5000 (3%)] Loss 0.392742
Epoch 160: [161/5000 (3%)] Loss 0.389222
Epoch 170: [171/5000 (3%)] Loss 0.385823
Epoch 180: [181/5000 (4%)] Loss 0.382528
Epoch 190: [191/5000 (4%)] Loss 0.379319
Epoch 200: [201/5000 (4%)] Loss 0.376187
Epoch 210: [211/5000 (4%)] Loss 0.373122
Epoch 220: [221/5000 (4%)] Loss 0.370117
Epoch 230: [231/5000 (5%)] Loss 0.367167
Epoch 240: [241/5000 (5%)] Loss 0.364267
Epoch 250: [251/5000 (5%)] Loss 0.361413
Epoch 260: [261/5000 (5%)] Loss 0.358603
Epoch 270: [271/5000 (5%)] Loss 0.355834
Epoch 280: [281/5000 (6%)] Loss 0.353105
Epoch 290: [291/5000 (6%)] Loss 0.350413
Epoch 300: [301/5000 (6%)] Loss 0.347757
Epoch 310: [311/5000 (6%)] Loss 0.345135
Epoch 320: [321/5000 (6%)] Loss 0.342548
Epoch 330: [331/5000 (7%)] Loss 0.339993
Epoch 340: [341/5000 (7%)] Loss 0.337471
Epoch 350: [351/5000 (7%)] Loss 0.334979
Epoch 360: [361/5000 (7%)] Loss 0.332519
Epoch 370: [371/5000 (7%)] Loss 0.330088
Epoch 380: [381/5000 (8%)] Loss 0.327686
Epoch 390: [391/5000 (8%)] Loss 0.325313
Epoch 400: [401/5000 (8%)] Loss 0.322969
Epoch 410: [411/5000 (8%)] Loss 0.320652
Epoch 420: [421/5000 (8%)] Loss 0.318363
Epoch 430: [431/5000 (9%)] Loss 0.316100
Epoch 440: [441/5000 (9%)] Loss 0.313864
Epoch 450: [451/5000 (9%)] Loss 0.311655
Epoch 460: [461/5000 (9%)] Loss 0.309470
Epoch 470: [471/5000 (9%)] Loss 0.307311
Epoch 480: [481/5000 (10%)] Loss 0.305177
Epoch 490: [491/5000 (10%)] Loss 0.303068
Epoch 500: [501/5000 (10%)] Loss 0.300982
Epoch 510: [511/5000 (10%)] Loss 0.298921
Epoch 520: [521/5000 (10%)] Loss 0.296883
Epoch 530: [531/5000 (11%)] Loss 0.294867
Epoch 540: [541/5000 (11%)] Loss 0.292875
Epoch 550: [551/5000 (11%)] Loss 0.290905
Epoch 560: [561/5000 (11%)] Loss 0.288958
Epoch 570: [571/5000 (11%)] Loss 0.287032
Epoch 580: [581/5000 (12%)] Loss 0.285128
Epoch 590: [591/5000 (12%)] Loss 0.283244
Epoch 600: [601/5000 (12%)] Loss 0.281382
Epoch 610: [611/5000 (12%)] Loss 0.279540
Epoch 620: [621/5000 (12%)] Loss 0.277719
Epoch 630: [631/5000 (13%)] Loss 0.275918
Epoch 640: [641/5000 (13%)] Loss 0.274136
Epoch 650: [651/5000 (13%)] Loss 0.272374
Epoch 660: [661/5000 (13%)] Loss 0.270631
Epoch 670: [671/5000 (13%)] Loss 0.268907
Epoch 680: [681/5000 (14%)] Loss 0.267202
Epoch 690: [691/5000 (14%)] Loss 0.265515
Epoch 700: [701/5000 (14%)] Loss 0.263846
Epoch 710: [711/5000 (14%)] Loss 0.262195
Epoch 720: [721/5000 (14%)] Loss 0.260562
Epoch 730: [731/5000 (15%)] Loss 0.258946
Epoch 740: [741/5000 (15%)] Loss 0.257347
Epoch 750: [751/5000 (15%)] Loss 0.255765
Epoch 760: [761/5000 (15%)] Loss 0.254200
Epoch 770: [771/5000 (15%)] Loss 0.252651
Epoch 780: [781/5000 (16%)] Loss 0.251119
Epoch 790: [791/5000 (16%)] Loss 0.249602
Epoch 800: [801/5000 (16%)] Loss 0.248102
Epoch 810: [811/5000 (16%)] Loss 0.246617
Epoch 820: [821/5000 (16%)] Loss 0.245147
Epoch 830: [831/5000 (17%)] Loss 0.243692
Epoch 840: [841/5000 (17%)] Loss 0.242253
Epoch 850: [851/5000 (17%)] Loss 0.240828
Epoch 860: [861/5000 (17%)] Loss 0.239417
Epoch 870: [871/5000 (17%)] Loss 0.238021
Epoch 880: [881/5000 (18%)] Loss 0.236639
Epoch 890: [891/5000 (18%)] Loss 0.235272
Epoch 900: [901/5000 (18%)] Loss 0.233918
Epoch 910: [911/5000 (18%)] Loss 0.232577
Epoch 920: [921/5000 (18%)] Loss 0.231250
Epoch 930: [931/5000 (19%)] Loss 0.229936
Epoch 940: [941/5000 (19%)] Loss 0.228635
Epoch 950: [951/5000 (19%)] Loss 0.227347
Epoch 960: [961/5000 (19%)] Loss 0.226072
Epoch 970: [971/5000 (19%)] Loss 0.224810
Epoch 980: [981/5000 (20%)] Loss 0.223559
Epoch 990: [991/5000 (20%)] Loss 0.222322
Epoch 1000: [1001/5000 (20%)] Loss 0.221096
Epoch 1010: [1011/5000 (20%)] Loss 0.219882
Epoch 1020: [1021/5000 (20%)] Loss 0.218679
Epoch 1030: [1031/5000 (21%)] Loss 0.217489
Epoch 1040: [1041/5000 (21%)] Loss 0.216309
Epoch 1050: [1051/5000 (21%)] Loss 0.215141
Epoch 1060: [1061/5000 (21%)] Loss 0.213985
Epoch 1070: [1071/5000 (21%)] Loss 0.212839
Epoch 1080: [1081/5000 (22%)] Loss 0.211704
Epoch 1090: [1091/5000 (22%)] Loss 0.210580
Epoch 1100: [1101/5000 (22%)] Loss 0.209466
Epoch 1110: [1111/5000 (22%)] Loss 0.208363
Epoch 1120: [1121/5000 (22%)] Loss 0.207271
Epoch 1130: [1131/5000 (23%)] Loss 0.206188
Epoch 1140: [1141/5000 (23%)] Loss 0.205116
Epoch 1150: [1151/5000 (23%)] Loss 0.204053
Epoch 1160: [1161/5000 (23%)] Loss 0.203000
Epoch 1170: [1171/5000 (23%)] Loss 0.201957
Epoch 1180: [1181/5000 (24%)] Loss 0.200924
Epoch 1190: [1191/5000 (24%)] Loss 0.199900
Epoch 1200: [1201/5000 (24%)] Loss 0.198885
Epoch 1210: [1211/5000 (24%)] Loss 0.197880
Epoch 1220: [1221/5000 (24%)] Loss 0.196884
Epoch 1230: [1231/5000 (25%)] Loss 0.195896
Epoch 1240: [1241/5000 (25%)] Loss 0.194918
Epoch 1250: [1251/5000 (25%)] Loss 0.193948
Epoch 1260: [1261/5000 (25%)] Loss 0.192987
Epoch 1270: [1271/5000 (25%)] Loss 0.192035
Epoch 1280: [1281/5000 (26%)] Loss 0.191091
Epoch 1290: [1291/5000 (26%)] Loss 0.190155
Epoch 1300: [1301/5000 (26%)] Loss 0.189228
Epoch 1310: [1311/5000 (26%)] Loss 0.188309
Epoch 1320: [1321/5000 (26%)] Loss 0.187397
Epoch 1330: [1331/5000 (27%)] Loss 0.186494
Epoch 1340: [1341/5000 (27%)] Loss 0.185599
Epoch 1350: [1351/5000 (27%)] Loss 0.184711
Epoch 1360: [1361/5000 (27%)] Loss 0.183831
Epoch 1370: [1371/5000 (27%)] Loss 0.182959
Epoch 1380: [1381/5000 (28%)] Loss 0.182094
Epoch 1390: [1391/5000 (28%)] Loss 0.181237
Epoch 1400: [1401/5000 (28%)] Loss 0.180387
Epoch 1410: [1411/5000 (28%)] Loss 0.179544
Epoch 1420: [1421/5000 (28%)] Loss 0.178708
Epoch 1430: [1431/5000 (29%)] Loss 0.177880
Epoch 1440: [1441/5000 (29%)] Loss 0.177058
Epoch 1450: [1451/5000 (29%)] Loss 0.176243
Epoch 1460: [1461/5000 (29%)] Loss 0.175436
Epoch 1470: [1471/5000 (29%)] Loss 0.174634
Epoch 1480: [1481/5000 (30%)] Loss 0.173840
Epoch 1490: [1491/5000 (30%)] Loss 0.173052
Epoch 1500: [1501/5000 (30%)] Loss 0.172271
Epoch 1510: [1511/5000 (30%)] Loss 0.171496
Epoch 1520: [1521/5000 (30%)] Loss 0.170727
Epoch 1530: [1531/5000 (31%)] Loss 0.169965
Epoch 1540: [1541/5000 (31%)] Loss 0.169209
Epoch 1550: [1551/5000 (31%)] Loss 0.168459
Epoch 1560: [1561/5000 (31%)] Loss 0.167715
Epoch 1570: [1571/5000 (31%)] Loss 0.166977
Epoch 1580: [1581/5000 (32%)] Loss 0.166245
Epoch 1590: [1591/5000 (32%)] Loss 0.165519
Epoch 1600: [1601/5000 (32%)] Loss 0.164799
Epoch 1610: [1611/5000 (32%)] Loss 0.164084
Epoch 1620: [1621/5000 (32%)] Loss 0.163376
Epoch 1630: [1631/5000 (33%)] Loss 0.162673
Epoch 1640: [1641/5000 (33%)] Loss 0.161975
Epoch 1650: [1651/5000 (33%)] Loss 0.161283
Epoch 1660: [1661/5000 (33%)] Loss 0.160596
Epoch 1670: [1671/5000 (33%)] Loss 0.159915
Epoch 1680: [1681/5000 (34%)] Loss 0.159239
Epoch 1690: [1691/5000 (34%)] Loss 0.158568
Epoch 1700: [1701/5000 (34%)] Loss 0.157903
Epoch 1710: [1711/5000 (34%)] Loss 0.157243
Epoch 1720: [1721/5000 (34%)] Loss 0.156587
Epoch 1730: [1731/5000 (35%)] Loss 0.155937
Epoch 1740: [1741/5000 (35%)] Loss 0.155292
Epoch 1750: [1751/5000 (35%)] Loss 0.154652
Epoch 1760: [1761/5000 (35%)] Loss 0.154016
Epoch 1770: [1771/5000 (35%)] Loss 0.153385
Epoch 1780: [1781/5000 (36%)] Loss 0.152760
Epoch 1790: [1791/5000 (36%)] Loss 0.152139
Epoch 1800: [1801/5000 (36%)] Loss 0.151522
Epoch 1810: [1811/5000 (36%)] Loss 0.150910
Epoch 1820: [1821/5000 (36%)] Loss 0.150303
Epoch 1830: [1831/5000 (37%)] Loss 0.149700
Epoch 1840: [1841/5000 (37%)] Loss 0.149102
Epoch 1850: [1851/5000 (37%)] Loss 0.148508
Epoch 1860: [1861/5000 (37%)] Loss 0.147919
Epoch 1870: [1871/5000 (37%)] Loss 0.147334
Epoch 1880: [1881/5000 (38%)] Loss 0.146753
Epoch 1890: [1891/5000 (38%)] Loss 0.146177
Epoch 1900: [1901/5000 (38%)] Loss 0.145604
Epoch 1910: [1911/5000 (38%)] Loss 0.145036
Epoch 1920: [1921/5000 (38%)] Loss 0.144472
Epoch 1930: [1931/5000 (39%)] Loss 0.143912
Epoch 1940: [1941/5000 (39%)] Loss 0.143356
Epoch 1950: [1951/5000 (39%)] Loss 0.142805
Epoch 1960: [1961/5000 (39%)] Loss 0.142257
Epoch 1970: [1971/5000 (39%)] Loss 0.141713
Epoch 1980: [1981/5000 (40%)] Loss 0.141172
Epoch 1990: [1991/5000 (40%)] Loss 0.140636
Epoch 2000: [2001/5000 (40%)] Loss 0.140104
Epoch 2010: [2011/5000 (40%)] Loss 0.139575
Epoch 2020: [2021/5000 (40%)] Loss 0.139050
Epoch 2030: [2031/5000 (41%)] Loss 0.138529
Epoch 2040: [2041/5000 (41%)] Loss 0.138011
Epoch 2050: [2051/5000 (41%)] Loss 0.137497
Epoch 2060: [2061/5000 (41%)] Loss 0.136986
Epoch 2070: [2071/5000 (41%)] Loss 0.136479
Epoch 2080: [2081/5000 (42%)] Loss 0.135976
Epoch 2090: [2091/5000 (42%)] Loss 0.135476
Epoch 2100: [2101/5000 (42%)] Loss 0.134980
Epoch 2110: [2111/5000 (42%)] Loss 0.134486
Epoch 2120: [2121/5000 (42%)] Loss 0.133997
Epoch 2130: [2131/5000 (43%)] Loss 0.133510
Epoch 2140: [2141/5000 (43%)] Loss 0.133027
Epoch 2150: [2151/5000 (43%)] Loss 0.132547
Epoch 2160: [2161/5000 (43%)] Loss 0.132071
Epoch 2170: [2171/5000 (43%)] Loss 0.131597
Epoch 2180: [2181/5000 (44%)] Loss 0.131127
Epoch 2190: [2191/5000 (44%)] Loss 0.130660
Epoch 2200: [2201/5000 (44%)] Loss 0.130196
Epoch 2210: [2211/5000 (44%)] Loss 0.129736
Epoch 2220: [2221/5000 (44%)] Loss 0.129278
Epoch 2230: [2231/5000 (45%)] Loss 0.128823
Epoch 2240: [2241/5000 (45%)] Loss 0.128371
Epoch 2250: [2251/5000 (45%)] Loss 0.127923
Epoch 2260: [2261/5000 (45%)] Loss 0.127477
Epoch 2270: [2271/5000 (45%)] Loss 0.127034
Epoch 2280: [2281/5000 (46%)] Loss 0.126594
Epoch 2290: [2291/5000 (46%)] Loss 0.126157
Epoch 2300: [2301/5000 (46%)] Loss 0.125723
Epoch 2310: [2311/5000 (46%)] Loss 0.125291
Epoch 2320: [2321/5000 (46%)] Loss 0.124863
Epoch 2330: [2331/5000 (47%)] Loss 0.124437
Epoch 2340: [2341/5000 (47%)] Loss 0.124014
Epoch 2350: [2351/5000 (47%)] Loss 0.123593
Epoch 2360: [2361/5000 (47%)] Loss 0.123176
Epoch 2370: [2371/5000 (47%)] Loss 0.122760
Epoch 2380: [2381/5000 (48%)] Loss 0.122348
Epoch 2390: [2391/5000 (48%)] Loss 0.121938
Epoch 2400: [2401/5000 (48%)] Loss 0.121531
Epoch 2410: [2411/5000 (48%)] Loss 0.121126
Epoch 2420: [2421/5000 (48%)] Loss 0.120724
Epoch 2430: [2431/5000 (49%)] Loss 0.120325
Epoch 2440: [2441/5000 (49%)] Loss 0.119927
Epoch 2450: [2451/5000 (49%)] Loss 0.119533
Epoch 2460: [2461/5000 (49%)] Loss 0.119141
Epoch 2470: [2471/5000 (49%)] Loss 0.118751
Epoch 2480: [2481/5000 (50%)] Loss 0.118364
Epoch 2490: [2491/5000 (50%)] Loss 0.117979
Epoch 2500: [2501/5000 (50%)] Loss 0.117596
Epoch 2510: [2511/5000 (50%)] Loss 0.117216
Epoch 2520: [2521/5000 (50%)] Loss 0.116838
Epoch 2530: [2531/5000 (51%)] Loss 0.116463
Epoch 2540: [2541/5000 (51%)] Loss 0.116089
Epoch 2550: [2551/5000 (51%)] Loss 0.115718
Epoch 2560: [2561/5000 (51%)] Loss 0.115350
Epoch 2570: [2571/5000 (51%)] Loss 0.114983
Epoch 2580: [2581/5000 (52%)] Loss 0.114619
Epoch 2590: [2591/5000 (52%)] Loss 0.114257
Epoch 2600: [2601/5000 (52%)] Loss 0.113897
Epoch 2610: [2611/5000 (52%)] Loss 0.113539
Epoch 2620: [2621/5000 (52%)] Loss 0.113183
Epoch 2630: [2631/5000 (53%)] Loss 0.112830
Epoch 2640: [2641/5000 (53%)] Loss 0.112478
Epoch 2650: [2651/5000 (53%)] Loss 0.112129
Epoch 2660: [2661/5000 (53%)] Loss 0.111781
Epoch 2670: [2671/5000 (53%)] Loss 0.111436
Epoch 2680: [2681/5000 (54%)] Loss 0.111093
Epoch 2690: [2691/5000 (54%)] Loss 0.110752
Epoch 2700: [2701/5000 (54%)] Loss 0.110412
Epoch 2710: [2711/5000 (54%)] Loss 0.110075
Epoch 2720: [2721/5000 (54%)] Loss 0.109740
Epoch 2730: [2731/5000 (55%)] Loss 0.109407
Epoch 2740: [2741/5000 (55%)] Loss 0.109075
Epoch 2750: [2751/5000 (55%)] Loss 0.108746
Epoch 2760: [2761/5000 (55%)] Loss 0.108418
Epoch 2770: [2771/5000 (55%)] Loss 0.108092
Epoch 2780: [2781/5000 (56%)] Loss 0.107768
Epoch 2790: [2791/5000 (56%)] Loss 0.107446
Epoch 2800: [2801/5000 (56%)] Loss 0.107126
Epoch 2810: [2811/5000 (56%)] Loss 0.106808
Epoch 2820: [2821/5000 (56%)] Loss 0.106491
Epoch 2830: [2831/5000 (57%)] Loss 0.106176
Epoch 2840: [2841/5000 (57%)] Loss 0.105863
Epoch 2850: [2851/5000 (57%)] Loss 0.105552
Epoch 2860: [2861/5000 (57%)] Loss 0.105243
Epoch 2870: [2871/5000 (57%)] Loss 0.104935
Epoch 2880: [2881/5000 (58%)] Loss 0.104629
Epoch 2890: [2891/5000 (58%)] Loss 0.104325
Epoch 2900: [2901/5000 (58%)] Loss 0.104022
Epoch 2910: [2911/5000 (58%)] Loss 0.103721
Epoch 2920: [2921/5000 (58%)] Loss 0.103422
Epoch 2930: [2931/5000 (59%)] Loss 0.103124
Epoch 2940: [2941/5000 (59%)] Loss 0.102828
Epoch 2950: [2951/5000 (59%)] Loss 0.102534
Epoch 2960: [2961/5000 (59%)] Loss 0.102241
Epoch 2970: [2971/5000 (59%)] Loss 0.101950
Epoch 2980: [2981/5000 (60%)] Loss 0.101660
Epoch 2990: [2991/5000 (60%)] Loss 0.101372
Epoch 3000: [3001/5000 (60%)] Loss 0.101086
Epoch 3010: [3011/5000 (60%)] Loss 0.100801
Epoch 3020: [3021/5000 (60%)] Loss 0.100517
Epoch 3030: [3031/5000 (61%)] Loss 0.100235
Epoch 3040: [3041/5000 (61%)] Loss 0.099955
Epoch 3050: [3051/5000 (61%)] Loss 0.099676
Epoch 3060: [3061/5000 (61%)] Loss 0.099399
Epoch 3070: [3071/5000 (61%)] Loss 0.099123
Epoch 3080: [3081/5000 (62%)] Loss 0.098849
Epoch 3090: [3091/5000 (62%)] Loss 0.098576
Epoch 3100: [3101/5000 (62%)] Loss 0.098304
Epoch 3110: [3111/5000 (62%)] Loss 0.098034
Epoch 3120: [3121/5000 (62%)] Loss 0.097766
Epoch 3130: [3131/5000 (63%)] Loss 0.097498
Epoch 3140: [3141/5000 (63%)] Loss 0.097232
Epoch 3150: [3151/5000 (63%)] Loss 0.096968
Epoch 3160: [3161/5000 (63%)] Loss 0.096705
Epoch 3170: [3171/5000 (63%)] Loss 0.096443
Epoch 3180: [3181/5000 (64%)] Loss 0.096183
Epoch 3190: [3191/5000 (64%)] Loss 0.095924
Epoch 3200: [3201/5000 (64%)] Loss 0.095666
Epoch 3210: [3211/5000 (64%)] Loss 0.095410
Epoch 3220: [3221/5000 (64%)] Loss 0.095155
Epoch 3230: [3231/5000 (65%)] Loss 0.094901
Epoch 3240: [3241/5000 (65%)] Loss 0.094649
Epoch 3250: [3251/5000 (65%)] Loss 0.094398
Epoch 3260: [3261/5000 (65%)] Loss 0.094148
Epoch 3270: [3271/5000 (65%)] Loss 0.093900
Epoch 3280: [3281/5000 (66%)] Loss 0.093652
Epoch 3290: [3291/5000 (66%)] Loss 0.093406
Epoch 3300: [3301/5000 (66%)] Loss 0.093161
Epoch 3310: [3311/5000 (66%)] Loss 0.092918
Epoch 3320: [3321/5000 (66%)] Loss 0.092676
Epoch 3330: [3331/5000 (67%)] Loss 0.092434
Epoch 3340: [3341/5000 (67%)] Loss 0.092195
Epoch 3350: [3351/5000 (67%)] Loss 0.091956
Epoch 3360: [3361/5000 (67%)] Loss 0.091718
Epoch 3370: [3371/5000 (67%)] Loss 0.091482
Epoch 3380: [3381/5000 (68%)] Loss 0.091247
Epoch 3390: [3391/5000 (68%)] Loss 0.091013
Epoch 3400: [3401/5000 (68%)] Loss 0.090780
Epoch 3410: [3411/5000 (68%)] Loss 0.090548
Epoch 3420: [3421/5000 (68%)] Loss 0.090318
Epoch 3430: [3431/5000 (69%)] Loss 0.090088
Epoch 3440: [3441/5000 (69%)] Loss 0.089860
Epoch 3450: [3451/5000 (69%)] Loss 0.089633
Epoch 3460: [3461/5000 (69%)] Loss 0.089407
Epoch 3470: [3471/5000 (69%)] Loss 0.089182
Epoch 3480: [3481/5000 (70%)] Loss 0.088958
Epoch 3490: [3491/5000 (70%)] Loss 0.088735
Epoch 3500: [3501/5000 (70%)] Loss 0.088513
Epoch 3510: [3511/5000 (70%)] Loss 0.088293
Epoch 3520: [3521/5000 (70%)] Loss 0.088073
Epoch 3530: [3531/5000 (71%)] Loss 0.087855
Epoch 3540: [3541/5000 (71%)] Loss 0.087637
Epoch 3550: [3551/5000 (71%)] Loss 0.087421
Epoch 3560: [3561/5000 (71%)] Loss 0.087205
Epoch 3570: [3571/5000 (71%)] Loss 0.086991
Epoch 3580: [3581/5000 (72%)] Loss 0.086777
Epoch 3590: [3591/5000 (72%)] Loss 0.086565
Epoch 3600: [3601/5000 (72%)] Loss 0.086354
Epoch 3610: [3611/5000 (72%)] Loss 0.086143
Epoch 3620: [3621/5000 (72%)] Loss 0.085934
Epoch 3630: [3631/5000 (73%)] Loss 0.085726
Epoch 3640: [3641/5000 (73%)] Loss 0.085518
Epoch 3650: [3651/5000 (73%)] Loss 0.085312
Epoch 3660: [3661/5000 (73%)] Loss 0.085106
Epoch 3670: [3671/5000 (73%)] Loss 0.084902
Epoch 3680: [3681/5000 (74%)] Loss 0.084698
Epoch 3690: [3691/5000 (74%)] Loss 0.084495
Epoch 3700: [3701/5000 (74%)] Loss 0.084294
Epoch 3710: [3711/5000 (74%)] Loss 0.084093
Epoch 3720: [3721/5000 (74%)] Loss 0.083893
Epoch 3730: [3731/5000 (75%)] Loss 0.083694
Epoch 3740: [3741/5000 (75%)] Loss 0.083496
Epoch 3750: [3751/5000 (75%)] Loss 0.083299
Epoch 3760: [3761/5000 (75%)] Loss 0.083103
Epoch 3770: [3771/5000 (75%)] Loss 0.082908
Epoch 3780: [3781/5000 (76%)] Loss 0.082713
Epoch 3790: [3791/5000 (76%)] Loss 0.082520
Epoch 3800: [3801/5000 (76%)] Loss 0.082327
Epoch 3810: [3811/5000 (76%)] Loss 0.082135
Epoch 3820: [3821/5000 (76%)] Loss 0.081944
Epoch 3830: [3831/5000 (77%)] Loss 0.081754
Epoch 3840: [3841/5000 (77%)] Loss 0.081565
Epoch 3850: [3851/5000 (77%)] Loss 0.081377
Epoch 3860: [3861/5000 (77%)] Loss 0.081189
Epoch 3870: [3871/5000 (77%)] Loss 0.081003
Epoch 3880: [3881/5000 (78%)] Loss 0.080817
Epoch 3890: [3891/5000 (78%)] Loss 0.080632
Epoch 3900: [3901/5000 (78%)] Loss 0.080447
Epoch 3910: [3911/5000 (78%)] Loss 0.080264
Epoch 3920: [3921/5000 (78%)] Loss 0.080082
Epoch 3930: [3931/5000 (79%)] Loss 0.079900
Epoch 3940: [3941/5000 (79%)] Loss 0.079719
Epoch 3950: [3951/5000 (79%)] Loss 0.079539
Epoch 3960: [3961/5000 (79%)] Loss 0.079359
Epoch 3970: [3971/5000 (79%)] Loss 0.079181
Epoch 3980: [3981/5000 (80%)] Loss 0.079003
Epoch 3990: [3991/5000 (80%)] Loss 0.078826
Epoch 4000: [4001/5000 (80%)] Loss 0.078650
Epoch 4010: [4011/5000 (80%)] Loss 0.078474
Epoch 4020: [4021/5000 (80%)] Loss 0.078299
Epoch 4030: [4031/5000 (81%)] Loss 0.078125
Epoch 4040: [4041/5000 (81%)] Loss 0.077952
Epoch 4050: [4051/5000 (81%)] Loss 0.077780
Epoch 4060: [4061/5000 (81%)] Loss 0.077608
Epoch 4070: [4071/5000 (81%)] Loss 0.077437
Epoch 4080: [4081/5000 (82%)] Loss 0.077267
Epoch 4090: [4091/5000 (82%)] Loss 0.077097
Epoch 4100: [4101/5000 (82%)] Loss 0.076928
Epoch 4110: [4111/5000 (82%)] Loss 0.076760
Epoch 4120: [4121/5000 (82%)] Loss 0.076593
Epoch 4130: [4131/5000 (83%)] Loss 0.076426
Epoch 4140: [4141/5000 (83%)] Loss 0.076260
Epoch 4150: [4151/5000 (83%)] Loss 0.076095
Epoch 4160: [4161/5000 (83%)] Loss 0.075930
Epoch 4170: [4171/5000 (83%)] Loss 0.075766
Epoch 4180: [4181/5000 (84%)] Loss 0.075603
Epoch 4190: [4191/5000 (84%)] Loss 0.075440
Epoch 4200: [4201/5000 (84%)] Loss 0.075279
Epoch 4210: [4211/5000 (84%)] Loss 0.075117
Epoch 4220: [4221/5000 (84%)] Loss 0.074957
Epoch 4230: [4231/5000 (85%)] Loss 0.074797
Epoch 4240: [4241/5000 (85%)] Loss 0.074638
Epoch 4250: [4251/5000 (85%)] Loss 0.074479
Epoch 4260: [4261/5000 (85%)] Loss 0.074322
Epoch 4270: [4271/5000 (85%)] Loss 0.074164
Epoch 4280: [4281/5000 (86%)] Loss 0.074008
Epoch 4290: [4291/5000 (86%)] Loss 0.073852
Epoch 4300: [4301/5000 (86%)] Loss 0.073697
Epoch 4310: [4311/5000 (86%)] Loss 0.073542
Epoch 4320: [4321/5000 (86%)] Loss 0.073388
Epoch 4330: [4331/5000 (87%)] Loss 0.073235
Epoch 4340: [4341/5000 (87%)] Loss 0.073082
Epoch 4350: [4351/5000 (87%)] Loss 0.072930
Epoch 4360: [4361/5000 (87%)] Loss 0.072778
Epoch 4370: [4371/5000 (87%)] Loss 0.072627
Epoch 4380: [4381/5000 (88%)] Loss 0.072477
Epoch 4390: [4391/5000 (88%)] Loss 0.072327
Epoch 4400: [4401/5000 (88%)] Loss 0.072178
Epoch 4410: [4411/5000 (88%)] Loss 0.072030
Epoch 4420: [4421/5000 (88%)] Loss 0.071882
Epoch 4430: [4431/5000 (89%)] Loss 0.071734
Epoch 4440: [4441/5000 (89%)] Loss 0.071588
Epoch 4450: [4451/5000 (89%)] Loss 0.071442
Epoch 4460: [4461/5000 (89%)] Loss 0.071296
Epoch 4470: [4471/5000 (89%)] Loss 0.071151
Epoch 4480: [4481/5000 (90%)] Loss 0.071007
Epoch 4490: [4491/5000 (90%)] Loss 0.070863
Epoch 4500: [4501/5000 (90%)] Loss 0.070720
Epoch 4510: [4511/5000 (90%)] Loss 0.070577
Epoch 4520: [4521/5000 (90%)] Loss 0.070435
Epoch 4530: [4531/5000 (91%)] Loss 0.070293
Epoch 4540: [4541/5000 (91%)] Loss 0.070152
Epoch 4550: [4551/5000 (91%)] Loss 0.070012
Epoch 4560: [4561/5000 (91%)] Loss 0.069872
Epoch 4570: [4571/5000 (91%)] Loss 0.069733
Epoch 4580: [4581/5000 (92%)] Loss 0.069594
Epoch 4590: [4591/5000 (92%)] Loss 0.069455
Epoch 4600: [4601/5000 (92%)] Loss 0.069318
Epoch 4610: [4611/5000 (92%)] Loss 0.069180
Epoch 4620: [4621/5000 (92%)] Loss 0.069044
Epoch 4630: [4631/5000 (93%)] Loss 0.068908
Epoch 4640: [4641/5000 (93%)] Loss 0.068772
Epoch 4650: [4651/5000 (93%)] Loss 0.068637
Epoch 4660: [4661/5000 (93%)] Loss 0.068502
Epoch 4670: [4671/5000 (93%)] Loss 0.068368
Epoch 4680: [4681/5000 (94%)] Loss 0.068235
Epoch 4690: [4691/5000 (94%)] Loss 0.068102
Epoch 4700: [4701/5000 (94%)] Loss 0.067969
Epoch 4710: [4711/5000 (94%)] Loss 0.067837
Epoch 4720: [4721/5000 (94%)] Loss 0.067705
Epoch 4730: [4731/5000 (95%)] Loss 0.067574
Epoch 4740: [4741/5000 (95%)] Loss 0.067444
Epoch 4750: [4751/5000 (95%)] Loss 0.067314
Epoch 4760: [4761/5000 (95%)] Loss 0.067184
Epoch 4770: [4771/5000 (95%)] Loss 0.067055
Epoch 4780: [4781/5000 (96%)] Loss 0.066927
Epoch 4790: [4791/5000 (96%)] Loss 0.066798
Epoch 4800: [4801/5000 (96%)] Loss 0.066671
Epoch 4810: [4811/5000 (96%)] Loss 0.066544
Epoch 4820: [4821/5000 (96%)] Loss 0.066417
Epoch 4830: [4831/5000 (97%)] Loss 0.066291
Epoch 4840: [4841/5000 (97%)] Loss 0.066165
Epoch 4850: [4851/5000 (97%)] Loss 0.066040
Epoch 4860: [4861/5000 (97%)] Loss 0.065915
Epoch 4870: [4871/5000 (97%)] Loss 0.065791
Epoch 4880: [4881/5000 (98%)] Loss 0.065667
Epoch 4890: [4891/5000 (98%)] Loss 0.065543
Epoch 4900: [4901/5000 (98%)] Loss 0.065420
Epoch 4910: [4911/5000 (98%)] Loss 0.065298
Epoch 4920: [4921/5000 (98%)] Loss 0.065176
Epoch 4930: [4931/5000 (99%)] Loss 0.065054
Epoch 4940: [4941/5000 (99%)] Loss 0.064933
Epoch 4950: [4951/5000 (99%)] Loss 0.064812
Epoch 4960: [4961/5000 (99%)] Loss 0.064692
Epoch 4970: [4971/5000 (99%)] Loss 0.064572
Epoch 4980: [4981/5000 (100%)] Loss 0.064452
Epoch 4990: [4991/5000 (100%)] Loss 0.064333
![](https://i-blog.csdnimg.cn/blog_migrate/d98934bee71717034bd032fb42bc919b.png)