File size: 185,600 Bytes
b04de69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "X4cRE8IbIrIV"
      },
      "source": [
        "Downloading PyTorch Vision Reference Scripts for Image Classification. These scripts are official reference implementations from PyTorch Vision that provide training and quantization utilities for image classification models."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "46CgrVgjg3E-",
        "outputId": "7fb20ebe-d7fd-43fa-dc9b-ebbedf31575e"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "--2025-05-22 07:47:03--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/presets.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.109.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 3885 (3.8K) [text/plain]\n",
            "Saving to: ‘presets.py.1’\n",
            "\n",
            "presets.py.1        100%[===================>]   3.79K  --.-KB/s    in 0s      \n",
            "\n",
            "2025-05-22 07:47:03 (24.3 MB/s) - ‘presets.py.1’ saved [3885/3885]\n",
            "\n",
            "--2025-05-22 07:47:04--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/sampler.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 2395 (2.3K) [text/plain]\n",
            "Saving to: ‘sampler.py.1’\n",
            "\n",
            "sampler.py.1        100%[===================>]   2.34K  --.-KB/s    in 0s      \n",
            "\n",
            "2025-05-22 07:47:04 (12.1 MB/s) - ‘sampler.py.1’ saved [2395/2395]\n",
            "\n",
            "--2025-05-22 07:47:04--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/train.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 23324 (23K) [text/plain]\n",
            "Saving to: ‘train.py.1’\n",
            "\n",
            "train.py.1          100%[===================>]  22.78K  --.-KB/s    in 0.007s  \n",
            "\n",
            "2025-05-22 07:47:04 (3.30 MB/s) - ‘train.py.1’ saved [23324/23324]\n",
            "\n",
            "--2025-05-22 07:47:04--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/train_quantization.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.109.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 11647 (11K) [text/plain]\n",
            "Saving to: ‘train_quantization.py.1’\n",
            "\n",
            "train_quantization. 100%[===================>]  11.37K  --.-KB/s    in 0.002s  \n",
            "\n",
            "2025-05-22 07:47:04 (6.26 MB/s) - ‘train_quantization.py.1’ saved [11647/11647]\n",
            "\n",
            "--2025-05-22 07:47:04--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/transformers.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 404 Not Found\n",
            "2025-05-22 07:47:05 ERROR 404: Not Found.\n",
            "\n",
            "--2025-05-22 07:47:05--  https://raw.githubusercontent.com/pytorch/vision/main/references/classification/utils.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 15791 (15K) [text/plain]\n",
            "Saving to: ‘utils.py.1’\n",
            "\n",
            "utils.py.1          100%[===================>]  15.42K  --.-KB/s    in 0.005s  \n",
            "\n",
            "2025-05-22 07:47:05 (3.21 MB/s) - ‘utils.py.1’ saved [15791/15791]\n",
            "\n"
          ]
        }
      ],
      "source": [
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/presets.py\n",
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/sampler.py\n",
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/train.py\n",
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/train_quantization.py\n",
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/transformers.py\n",
        "! wget https://raw.githubusercontent.com/pytorch/vision/main/references/classification/utils.py"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "HFASsisvIrIb"
      },
      "source": [
        "In this block, we build a “loss” function for our sequential policy gradient algorithm. When the right data is plugged in, the gradient of this loss is equal to the policy gradient."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "EaBokYCpg3FA"
      },
      "outputs": [],
      "source": [
        "import types\n",
        "from typing import List, Callable\n",
        "\n",
        "import torch\n",
        "from torch import nn, Tensor\n",
        "from torch.nn import functional as F\n",
        "from torchvision.models.resnet import BasicBlock\n",
        "\n",
        "\n",
        "def trp_criterion(trp_blocks: nn.ModuleList, shared_head: Callable, criterion: Callable, lambdas: List[float], hidden_state: Tensor, logits: Tensor, targets: Tensor, loss_normalization=False):\n",
        "    losses, rewards = criterion(logits, targets)\n",
        "    returns = torch.ones_like(rewards, dtype=torch.float32, device=rewards.device)\n",
        "    if loss_normalization:\n",
        "        coeff = torch.mean(losses).detach()\n",
        "\n",
        "    embeds = [hidden_state]\n",
        "    predictions = []\n",
        "    for k, w in enumerate(lambdas):\n",
        "        embeds.append(trp_blocks[k](embeds[-1]))\n",
        "        predictions.append(shared_head(embeds[-1]))\n",
        "        returns = returns + w * rewards\n",
        "        replica_losses, rewards = criterion(predictions[-1], targets, rewards)\n",
        "        losses = losses + replica_losses\n",
        "    loss = torch.mean(losses * returns)\n",
        "\n",
        "    if loss_normalization:\n",
        "        with torch.no_grad():\n",
        "            coeff = torch.exp(coeff) / torch.exp(loss.detach())\n",
        "        loss = coeff * loss\n",
        "\n",
        "    return loss"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "In this block, we build a TPBlock for the Task Replica Prediction (TRP) module; This implementation provides the backbone without the shared prediction head."
      ],
      "metadata": {
        "id": "_Ig0Jm2w8DPH"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "class TPBlock(nn.Module):\n",
        "    def __init__(self, depths: int, inplanes: int, planes: int):\n",
        "        super(TPBlock, self).__init__()\n",
        "\n",
        "        blocks = [BasicBlock(inplanes=inplanes, planes=planes) for _ in range(depths)]\n",
        "        self.blocks = nn.Sequential(*blocks)\n",
        "        for name, param in self.blocks.named_parameters():\n",
        "            if 'conv' in name:\n",
        "                nn.init.zeros_(param)  # Initialize weights\n",
        "            elif 'downsample' in name:\n",
        "                nn.init.zeros_(param)   # Initialize biases\n",
        "\n",
        "    def forward(self, x):\n",
        "        return self.blocks(x)"
      ],
      "metadata": {
        "id": "wkBlmJT96jZj"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "This implementation enables ResNet retraining in SPG mode.\n",
        "\n",
        "Components:\n",
        "-------------------------------------------------------------------------------\n",
        "1. gen_criterion()\n",
        "    - Purpose: compute per-sample losses and positional masks\n",
        "\n",
        "2. gen_shared_head()\n",
        "    - Purpose: Implements a shared prediction head that processes convolutional feature maps for prediction.\n",
        "\n",
        "3. gen_forward()\n",
        "    - Purpose: Extended forward pass supporting both traditional inference and SPG retraining."
      ],
      "metadata": {
        "id": "UGxQdKZaF2NT"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "class ResNetConfig:\n",
        "    @staticmethod\n",
        "    def gen_criterion(label_smoothing=0.0, top_k=1):\n",
        "        def func(input, target, mask=None):\n",
        "            \"\"\"\n",
        "            Args:\n",
        "                input (Tensor): Input tensor of shape [B, C].\n",
        "                target (Tensor): Target labels of shape [B] or [B, C].\n",
        "\n",
        "            Returns:\n",
        "                loss (Tensor): Scalar tensor representing the loss.\n",
        "                mask (Tensor): Boolean mask tensor of shape [B].\n",
        "            \"\"\"\n",
        "            label = torch.argmax(target, dim=1) if label_smoothing > 0.0 else target\n",
        "\n",
        "            unmasked_loss = F.cross_entropy(input, label, reduction=\"none\", label_smoothing=label_smoothing)\n",
        "            if mask is None:\n",
        "                mask = torch.ones_like(unmasked_loss, dtype=torch.float32, device=target.device)\n",
        "            losses = mask * unmasked_loss\n",
        "\n",
        "            with torch.no_grad():\n",
        "                topk_values, topk_indices = torch.topk(input, top_k, dim=-1)\n",
        "                mask = mask * torch.eq(topk_indices, label[:, None]).any(dim=-1).to(input.dtype)\n",
        "\n",
        "            return losses, mask\n",
        "        return func\n",
        "\n",
        "    @staticmethod\n",
        "    def gen_shared_head(self):\n",
        "        def func(x):\n",
        "            \"\"\"\n",
        "            Args:\n",
        "                x (Tensor): Hidden State tensor of shape [B, C, H, W].\n",
        "\n",
        "            Returns:\n",
        "                logits (Tensor): Logits tensor of shape [B, C].\n",
        "            \"\"\"\n",
        "            x = self.layer4(x)\n",
        "            x = self.avgpool(x)\n",
        "            x = torch.flatten(x, 1)\n",
        "            logits = self.fc(x)\n",
        "            return logits\n",
        "        return func\n",
        "\n",
        "    @staticmethod\n",
        "    def gen_forward(lambdas, loss_normalization=True, label_smoothing=0.0, top_k=1):\n",
        "        def func(self, x: Tensor, targets=None) -> Tensor:\n",
        "            x = self.conv1(x)\n",
        "            x = self.bn1(x)\n",
        "            x = self.relu(x)\n",
        "            x = self.maxpool(x)\n",
        "\n",
        "            x = self.layer1(x)\n",
        "            x = self.layer2(x)\n",
        "            hidden_state = self.layer3(x)\n",
        "            x = self.layer4(hidden_state)\n",
        "            x = self.avgpool(x)\n",
        "            x = torch.flatten(x, 1)\n",
        "            logits = self.fc(x)\n",
        "\n",
        "            if self.training:\n",
        "                shared_head = ResNetConfig.gen_shared_head(self)\n",
        "                criterion = ResNetConfig.gen_criterion(label_smoothing=label_smoothing, top_k=top_k)\n",
        "\n",
        "                loss = trp_criterion(self.trp_blocks, shared_head, criterion, lambdas, hidden_state, logits, targets, loss_normalization=loss_normalization)\n",
        "\n",
        "                return logits, loss\n",
        "\n",
        "            return logits\n",
        "\n",
        "        return func"
      ],
      "metadata": {
        "id": "kTZWkoLr8cfE"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Applies TRP modules to the base ResNet (main backbone). The k-th TRP module corresponding to a deeper ResNet variant with an additional depth of 3 * sum(depths[:k+1])."
      ],
      "metadata": {
        "id": "cCn6vwItH1CW"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "def apply_trp(model, depths: List[int], planes: int, lambdas: List[float], **kwargs):\n",
        "    print(\"✅ Applying TRP to ResNet for Image Classification...\")\n",
        "    model.trp_blocks = torch.nn.ModuleList([TPBlock(depths=d, inplanes=planes, planes=planes) for d in depths])\n",
        "    model.forward = types.MethodType(ResNetConfig.gen_forward(lambdas), model)\n",
        "    return model"
      ],
      "metadata": {
        "id": "wXQF0oISH5Yp"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "The following is a training script for classification models, primarily based on the official TorchVision `train.py` reference implementation. We have made two modifications:\n",
        "\n",
        "Adding TRP Modules: We integrate TRP modules into the base model architecture before training begins:\n",
        "\n",
        "```python\n",
        "if args.apply_trp:\n",
        "    model = apply_trp(model, args.trp_depths,  args.trp_planes, args.trp_lambdas)\n",
        "```\n",
        "Removing TRP Modules: We remove the TRP components from the base model before saving the base model:\n",
        "```python\n",
        "if args.output_dir:\n",
        "    checkpoint = {\n",
        "        \"model\": model.state_dict() if not args.apply_trp else {k: v for k, v in model.state_dict().items() if not k.startswith(\"trp_blocks\")},\n",
        "        \"optimizer\": optimizer.state_dict(),\n",
        "        \"lr_scheduler\": lr_scheduler.state_dict(),\n",
        "        \"epoch\": epoch,\n",
        "        \"args\": args,\n",
        "    }\n",
        "    utils.save_on_master(checkpoint, os.path.join(args.output_dir, f\"model_{epoch}.pth\"))\n",
        "    utils.save_on_master(checkpoint, os.path.join(args.output_dir, \"checkpoint.pth\"))\n",
        "```"
      ],
      "metadata": {
        "id": "kDjSAv3PJr7P"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "hK4Y7Sqv4xUa"
      },
      "outputs": [],
      "source": [
        "import datetime\n",
        "import os\n",
        "import time\n",
        "import warnings\n",
        "\n",
        "import presets\n",
        "import torch\n",
        "import torch.utils.data\n",
        "import torchvision\n",
        "import utils\n",
        "from torch import nn\n",
        "from torchvision.transforms.functional import InterpolationMode\n",
        "\n",
        "\n",
        "def load_data(traindir, valdir):\n",
        "    # Data loading code\n",
        "    print(\"Loading data\")\n",
        "    interpolation = InterpolationMode(\"bilinear\")\n",
        "\n",
        "    print(\"Loading training data\")\n",
        "    st = time.time()\n",
        "    dataset = torchvision.datasets.ImageFolder(\n",
        "        traindir,\n",
        "        presets.ClassificationPresetTrain(crop_size=224, interpolation=interpolation, auto_augment_policy=None, random_erase_prob=0.0, ra_magnitude=9, augmix_severity=3),\n",
        "    )\n",
        "    print(\"Took\", time.time() - st)\n",
        "\n",
        "    print(\"Loading validation data\")\n",
        "    dataset_test = torchvision.datasets.ImageFolder(\n",
        "        valdir,\n",
        "        presets.ClassificationPresetEval(crop_size=224, resize_size=256, interpolation=interpolation)\n",
        "    )\n",
        "\n",
        "    print(\"Creating data loaders\")\n",
        "    train_sampler = torch.utils.data.RandomSampler(dataset)\n",
        "    test_sampler = torch.utils.data.SequentialSampler(dataset_test)\n",
        "\n",
        "    return dataset, dataset_test, train_sampler, test_sampler\n",
        "\n",
        "\n",
        "\n",
        "def train_one_epoch(model, optimizer, data_loader, device, epoch, args):\n",
        "    model.train()\n",
        "    metric_logger = utils.MetricLogger(delimiter=\"  \")\n",
        "    metric_logger.add_meter(\"lr\", utils.SmoothedValue(window_size=1, fmt=\"{value}\"))\n",
        "    metric_logger.add_meter(\"img/s\", utils.SmoothedValue(window_size=10, fmt=\"{value}\"))\n",
        "\n",
        "    header = f\"Epoch: [{epoch}]\"\n",
        "    for i, (image, target) in enumerate(metric_logger.log_every(data_loader, args.print_freq, header)):\n",
        "        start_time = time.time()\n",
        "        image, target = image.to(device), target.to(device)\n",
        "        with torch.amp.autocast(\"cuda\", enabled=False):\n",
        "            output, loss = model(image, target)\n",
        "\n",
        "        optimizer.zero_grad()\n",
        "        loss.backward()\n",
        "        optimizer.step()\n",
        "\n",
        "        acc1, acc5 = utils.accuracy(output, target, topk=(1, 5))\n",
        "        batch_size = image.shape[0]\n",
        "        metric_logger.update(loss=loss.item(), lr=optimizer.param_groups[0][\"lr\"])\n",
        "        metric_logger.meters[\"acc1\"].update(acc1.item(), n=batch_size)\n",
        "        metric_logger.meters[\"acc5\"].update(acc5.item(), n=batch_size)\n",
        "        metric_logger.meters[\"img/s\"].update(batch_size / (time.time() - start_time))\n",
        "\n",
        "\n",
        "def evaluate(model, criterion, data_loader, device, print_freq=100, log_suffix=\"\"):\n",
        "    model.eval()\n",
        "    metric_logger = utils.MetricLogger(delimiter=\"  \")\n",
        "    header = f\"Test: {log_suffix}\"\n",
        "\n",
        "    num_processed_samples = 0\n",
        "    with torch.inference_mode():\n",
        "        for image, target in metric_logger.log_every(data_loader, print_freq, header):\n",
        "            image = image.to(device, non_blocking=True)\n",
        "            target = target.to(device, non_blocking=True)\n",
        "            output = model(image)\n",
        "            loss = criterion(output, target)\n",
        "\n",
        "            acc1, acc5 = utils.accuracy(output, target, topk=(1, 5))\n",
        "            # FIXME need to take into account that the datasets\n",
        "            # could have been padded in distributed setup\n",
        "            batch_size = image.shape[0]\n",
        "            metric_logger.update(loss=loss.item())\n",
        "            metric_logger.meters[\"acc1\"].update(acc1.item(), n=batch_size)\n",
        "            metric_logger.meters[\"acc5\"].update(acc5.item(), n=batch_size)\n",
        "            num_processed_samples += batch_size\n",
        "    # gather the stats from all processes\n",
        "\n",
        "    num_processed_samples = utils.reduce_across_processes(num_processed_samples)\n",
        "    if (\n",
        "        hasattr(data_loader.dataset, \"__len__\")\n",
        "        and len(data_loader.dataset) != num_processed_samples\n",
        "        and torch.distributed.get_rank() == 0\n",
        "    ):\n",
        "        # See FIXME above\n",
        "        warnings.warn(\n",
        "            f\"It looks like the dataset has {len(data_loader.dataset)} samples, but {num_processed_samples} \"\n",
        "            \"samples were used for the validation, which might bias the results. \"\n",
        "            \"Try adjusting the batch size and / or the world size. \"\n",
        "            \"Setting the world size to 1 is always a safe bet.\"\n",
        "        )\n",
        "\n",
        "    metric_logger.synchronize_between_processes()\n",
        "\n",
        "    print(f\"{header} Acc@1 {metric_logger.acc1.global_avg:.3f} Acc@5 {metric_logger.acc5.global_avg:.3f}\")\n",
        "    return metric_logger.acc1.global_avg\n",
        "\n",
        "\n",
        "def main(args):\n",
        "    if args.output_dir:\n",
        "        utils.mkdir(args.output_dir)\n",
        "    print(args)\n",
        "\n",
        "    device = torch.device(args.device)\n",
        "\n",
        "    if args.use_deterministic_algorithms:\n",
        "        torch.backends.cudnn.benchmark = False\n",
        "        torch.use_deterministic_algorithms(True)\n",
        "    else:\n",
        "        torch.backends.cudnn.benchmark = True\n",
        "\n",
        "    train_dir = os.path.join(args.data_path, \"train\")\n",
        "    val_dir = os.path.join(args.data_path, \"val\")\n",
        "    dataset, dataset_test, train_sampler, test_sampler = load_data(train_dir, val_dir)\n",
        "\n",
        "    num_classes = len(dataset.classes)\n",
        "    data_loader = torch.utils.data.DataLoader(dataset, batch_size=args.batch_size, sampler=train_sampler, num_workers=16, pin_memory=True, collate_fn=None)\n",
        "    data_loader_test = torch.utils.data.DataLoader(dataset_test, batch_size=64, sampler=test_sampler, num_workers=16, pin_memory=True)\n",
        "\n",
        "    print(\"Creating model\")\n",
        "    model = torchvision.models.get_model(args.model, weights=args.weights, num_classes=num_classes)\n",
        "    if args.apply_trp:\n",
        "        model = apply_trp(model, args.trp_depths,  args.trp_planes, args.trp_lambdas)\n",
        "    model.to(device)\n",
        "\n",
        "    parameters = utils.set_weight_decay(model, args.weight_decay, norm_weight_decay=None, custom_keys_weight_decay=None)\n",
        "    optimizer = torch.optim.SGD(parameters, lr=args.lr, momentum=args.momentum, weight_decay=args.weight_decay, nesterov=False)\n",
        "\n",
        "    main_lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=args.lr_step_size, gamma=args.lr_gamma)\n",
        "    warmup_lr_scheduler = torch.optim.lr_scheduler.ConstantLR(optimizer, factor=args.lr_warmup_decay, total_iters=args.lr_warmup_epochs)\n",
        "    lr_scheduler = torch.optim.lr_scheduler.SequentialLR(optimizer, schedulers=[warmup_lr_scheduler, main_lr_scheduler], milestones=[args.lr_warmup_epochs])\n",
        "\n",
        "\n",
        "    print(\"Start training\")\n",
        "    start_time = time.time()\n",
        "    for epoch in range(args.epochs):\n",
        "        train_one_epoch(model, optimizer, data_loader, device, epoch, args)\n",
        "        lr_scheduler.step()\n",
        "        evaluate(model, nn.CrossEntropyLoss(), data_loader_test, device=device)\n",
        "        if args.output_dir:\n",
        "            checkpoint = {\n",
        "                \"model\": model.state_dict() if not args.apply_trp else {k: v for k, v in model.state_dict().items() if not k.startswith(\"trp_blocks\")},  # NOTE: remove TRP heads\n",
        "                \"optimizer\": optimizer.state_dict(),\n",
        "                \"lr_scheduler\": lr_scheduler.state_dict(),\n",
        "                \"epoch\": epoch,\n",
        "                \"args\": args,\n",
        "            }\n",
        "            utils.save_on_master(checkpoint, os.path.join(args.output_dir, f\"model_{epoch}.pth\"))\n",
        "            utils.save_on_master(checkpoint, os.path.join(args.output_dir, \"checkpoint.pth\"))\n",
        "\n",
        "    total_time = time.time() - start_time\n",
        "    total_time_str = str(datetime.timedelta(seconds=int(total_time)))\n",
        "    print(f\"Training time {total_time_str}\")\n"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Prepare the [ImageNet](http://image-net.org/) dataset manually and place it in `/path/to/imagenet`. For image classification examples, pass the argument `--data-path=/path/to/imagenet` to the training script. The extracted dataset directory should follow this structure:\n",
        "```setup\n",
        "/path/to/imagenet/:\n",
        "    train/:\n",
        "        n01440764:\n",
        "            n01440764_18.JPEG ...\n",
        "        n01443537:\n",
        "            n01443537_2.JPEG ...\n",
        "    val/:\n",
        "        n01440764:\n",
        "            ILSVRC2012_val_00000293.JPEG ...\n",
        "        n01443537:\n",
        "            ILSVRC2012_val_00000236.JPEG ...\n",
        "```\n",
        "\n",
        "Now you can apply the SPG algorithm in model retraining.\n",
        "\n",
        "**Implementation Note:**\n",
        "\n",
        "- This demonstration runs on Google Colab using a single GPU configuration\n",
        "- Performance Improvement: Enhances ResNet18 validation accuracy (ACC@1) from XX.X% to YY.Y%\n",
        "- For optimal results:\n",
        "  - Refer to our README.md for complete setup instructions\n",
        "  - Recommended hardware: 4× RTX A6000 GPUs"
      ],
      "metadata": {
        "id": "SV8s5k49KwgS"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "UDZxDNfT4xUb",
        "outputId": "bcf86aa0-eb77-4815-e0fa-05997f1e1f1b"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "namespace(data_path='/home/cs/Documents/datasets/imagenet', model='resnet18', device='cuda', batch_size=256, epochs=10, opt='sgd', lr=0.0004, momentum=0.9, weight_decay=0.0001, lr_warmup_epochs=1, lr_warmup_decay=0.0, lr_step_size=2, lr_gamma=0.5, print_freq=100, output_dir='resnet18', use_deterministic_algorithms=False, weights='ResNet18_Weights.IMAGENET1K_V1', apply_trp=True, trp_depths=[1, 1, 1], trp_planes=256, trp_lambdas=[0.4, 0.2, 0.1])\n",
            "Loading data\n",
            "Loading training data\n",
            "Took 2.6400649547576904\n",
            "Loading validation data\n",
            "Creating data loaders\n",
            "Creating model\n",
            "✅ Applying TRP to ResNet for Image Classification...\n",
            "Start training\n",
            "Epoch: [0]  [   0/5005]  eta: 5:44:15  lr: 0.0  img/s: 492.1456954856547  loss: 0.7194 (0.7194)  acc1: 69.1406 (69.1406)  acc5: 86.3281 (86.3281)  meanQV: 1.4840 (1.4840)  stdQV: 0.3240 (0.3240)  time: 4.1269  data: 3.6067  max mem: 8962\n",
            "Epoch: [0]  [ 100/5005]  eta: 0:46:06  lr: 0.0  img/s: 487.81080383655046  loss: 0.7315 (0.7366)  acc1: 68.7500 (68.9434)  acc5: 87.1094 (87.2022)  meanQV: 1.4813 (1.4826)  stdQV: 0.3240 (0.3238)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 200/5005]  eta: 0:43:26  lr: 0.0  img/s: 494.6728449606332  loss: 0.7197 (0.7298)  acc1: 68.7500 (69.0318)  acc5: 87.5000 (87.2785)  meanQV: 1.4813 (1.4832)  stdQV: 0.3251 (0.3236)  time: 0.5211  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 300/5005]  eta: 0:41:58  lr: 0.0  img/s: 487.94536242744385  loss: 0.7055 (0.7270)  acc1: 70.7031 (69.1757)  acc5: 86.7188 (87.3053)  meanQV: 1.4949 (1.4842)  stdQV: 0.3192 (0.3232)  time: 0.5198  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 400/5005]  eta: 0:40:48  lr: 0.0  img/s: 493.8419675273725  loss: 0.7652 (0.7331)  acc1: 67.9688 (68.9867)  acc5: 87.1094 (87.2409)  meanQV: 1.4758 (1.4829)  stdQV: 0.3262 (0.3237)  time: 0.5219  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 500/5005]  eta: 0:39:45  lr: 0.0  img/s: 490.99324013193245  loss: 0.7112 (0.7341)  acc1: 69.1406 (68.9067)  acc5: 87.1094 (87.2653)  meanQV: 1.4840 (1.4823)  stdQV: 0.3228 (0.3239)  time: 0.5201  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [ 600/5005]  eta: 0:38:46  lr: 0.0  img/s: 493.63241471415074  loss: 0.7323 (0.7309)  acc1: 69.5312 (69.0171)  acc5: 87.8906 (87.3297)  meanQV: 1.4867 (1.4831)  stdQV: 0.3216 (0.3236)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 700/5005]  eta: 0:37:49  lr: 0.0  img/s: 487.50804150353844  loss: 0.7489 (0.7310)  acc1: 68.7500 (69.0442)  acc5: 86.3281 (87.3167)  meanQV: 1.4813 (1.4833)  stdQV: 0.3240 (0.3235)  time: 0.5206  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 800/5005]  eta: 0:36:53  lr: 0.0  img/s: 491.46023226850616  loss: 0.7270 (0.7316)  acc1: 69.1406 (69.0567)  acc5: 87.8906 (87.3166)  meanQV: 1.4840 (1.4834)  stdQV: 0.3216 (0.3235)  time: 0.5220  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [ 900/5005]  eta: 0:35:58  lr: 0.0  img/s: 490.80023055787785  loss: 0.7573 (0.7338)  acc1: 68.3594 (68.9898)  acc5: 86.7188 (87.3010)  meanQV: 1.4785 (1.4829)  stdQV: 0.3262 (0.3237)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1000/5005]  eta: 0:35:03  lr: 0.0  img/s: 493.60609129495185  loss: 0.7472 (0.7342)  acc1: 68.3594 (69.0087)  acc5: 87.1094 (87.2924)  meanQV: 1.4785 (1.4831)  stdQV: 0.3262 (0.3237)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1100/5005]  eta: 0:34:09  lr: 0.0  img/s: 493.3883500186788  loss: 0.7273 (0.7337)  acc1: 68.3594 (69.0157)  acc5: 86.3281 (87.2832)  meanQV: 1.4785 (1.4831)  stdQV: 0.3251 (0.3236)  time: 0.5200  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [1200/5005]  eta: 0:33:15  lr: 0.0  img/s: 488.9129516588334  loss: 0.7296 (0.7333)  acc1: 67.9688 (69.0434)  acc5: 87.1094 (87.2827)  meanQV: 1.4758 (1.4833)  stdQV: 0.3251 (0.3235)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [1300/5005]  eta: 0:32:22  lr: 0.0  img/s: 496.11964440830207  loss: 0.7214 (0.7334)  acc1: 69.1406 (69.0587)  acc5: 86.7188 (87.2835)  meanQV: 1.4840 (1.4834)  stdQV: 0.3240 (0.3235)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1400/5005]  eta: 0:31:29  lr: 0.0  img/s: 489.82739879256343  loss: 0.7335 (0.7330)  acc1: 68.3594 (69.0832)  acc5: 86.7188 (87.2881)  meanQV: 1.4785 (1.4836)  stdQV: 0.3240 (0.3234)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1500/5005]  eta: 0:30:35  lr: 0.0  img/s: 488.2193641437147  loss: 0.7221 (0.7324)  acc1: 69.1406 (69.0979)  acc5: 87.8906 (87.3184)  meanQV: 1.4840 (1.4837)  stdQV: 0.3228 (0.3234)  time: 0.5221  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1600/5005]  eta: 0:29:43  lr: 0.0  img/s: 491.9973130670899  loss: 0.7626 (0.7324)  acc1: 68.3594 (69.0891)  acc5: 86.7188 (87.3175)  meanQV: 1.4785 (1.4836)  stdQV: 0.3251 (0.3234)  time: 0.5204  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1700/5005]  eta: 0:28:50  lr: 0.0  img/s: 491.90219695845224  loss: 0.7566 (0.7321)  acc1: 70.3125 (69.0922)  acc5: 87.1094 (87.3330)  meanQV: 1.4922 (1.4836)  stdQV: 0.3192 (0.3234)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [1800/5005]  eta: 0:27:57  lr: 0.0  img/s: 492.04353203565745  loss: 0.7514 (0.7323)  acc1: 67.9688 (69.0897)  acc5: 86.3281 (87.3206)  meanQV: 1.4758 (1.4836)  stdQV: 0.3262 (0.3234)  time: 0.5207  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [1900/5005]  eta: 0:27:04  lr: 0.0  img/s: 489.4212747065615  loss: 0.6998 (0.7323)  acc1: 68.7500 (69.0662)  acc5: 88.2812 (87.3253)  meanQV: 1.4813 (1.4835)  stdQV: 0.3240 (0.3235)  time: 0.5216  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [2000/5005]  eta: 0:26:11  lr: 0.0  img/s: 495.7586395402095  loss: 0.7553 (0.7335)  acc1: 67.9688 (69.0319)  acc5: 87.5000 (87.2974)  meanQV: 1.4758 (1.4832)  stdQV: 0.3273 (0.3236)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [2100/5005]  eta: 0:25:19  lr: 0.0  img/s: 489.2644978319551  loss: 0.7095 (0.7331)  acc1: 68.7500 (69.0454)  acc5: 87.5000 (87.3048)  meanQV: 1.4813 (1.4833)  stdQV: 0.3240 (0.3235)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [2200/5005]  eta: 0:24:26  lr: 0.0  img/s: 496.86875392465674  loss: 0.7402 (0.7334)  acc1: 70.3125 (69.0735)  acc5: 86.7188 (87.3154)  meanQV: 1.4922 (1.4835)  stdQV: 0.3204 (0.3234)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [2300/5005]  eta: 0:23:34  lr: 0.0  img/s: 494.81235650908434  loss: 0.7301 (0.7332)  acc1: 68.7500 (69.0787)  acc5: 87.1094 (87.3180)  meanQV: 1.4813 (1.4836)  stdQV: 0.3251 (0.3234)  time: 0.5205  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [2400/5005]  eta: 0:22:41  lr: 0.0  img/s: 492.8439314901557  loss: 0.7250 (0.7332)  acc1: 69.5312 (69.0799)  acc5: 86.7188 (87.3132)  meanQV: 1.4867 (1.4836)  stdQV: 0.3228 (0.3234)  time: 0.5205  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [2500/5005]  eta: 0:21:49  lr: 0.0  img/s: 496.70487248638824  loss: 0.7133 (0.7329)  acc1: 67.9688 (69.0827)  acc5: 86.3281 (87.3009)  meanQV: 1.4758 (1.4836)  stdQV: 0.3262 (0.3234)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [2600/5005]  eta: 0:20:56  lr: 0.0  img/s: 491.3833130219057  loss: 0.7494 (0.7331)  acc1: 70.3125 (69.0795)  acc5: 86.7188 (87.2938)  meanQV: 1.4922 (1.4836)  stdQV: 0.3204 (0.3234)  time: 0.5203  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [2700/5005]  eta: 0:20:04  lr: 0.0  img/s: 488.37014076537906  loss: 0.7300 (0.7330)  acc1: 68.7500 (69.0900)  acc5: 87.1094 (87.2955)  meanQV: 1.4813 (1.4836)  stdQV: 0.3240 (0.3234)  time: 0.5204  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [2800/5005]  eta: 0:19:12  lr: 0.0  img/s: 491.6548870066586  loss: 0.7110 (0.7331)  acc1: 69.5312 (69.0993)  acc5: 88.2812 (87.3015)  meanQV: 1.4867 (1.4837)  stdQV: 0.3228 (0.3234)  time: 0.5216  data: 0.0005  max mem: 8962\n",
            "Epoch: [0]  [2900/5005]  eta: 0:18:19  lr: 0.0  img/s: 490.05632164917586  loss: 0.7100 (0.7334)  acc1: 69.5312 (69.0961)  acc5: 87.5000 (87.3092)  meanQV: 1.4867 (1.4837)  stdQV: 0.3228 (0.3234)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [3000/5005]  eta: 0:17:27  lr: 0.0  img/s: 491.02018376984734  loss: 0.7217 (0.7338)  acc1: 69.5312 (69.0922)  acc5: 88.2812 (87.3148)  meanQV: 1.4867 (1.4836)  stdQV: 0.3228 (0.3234)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [3100/5005]  eta: 0:16:35  lr: 0.0  img/s: 488.71979426958876  loss: 0.6803 (0.7335)  acc1: 68.3594 (69.0926)  acc5: 87.1094 (87.3073)  meanQV: 1.4785 (1.4836)  stdQV: 0.3251 (0.3234)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [3200/5005]  eta: 0:15:42  lr: 0.0  img/s: 492.2176638610237  loss: 0.7217 (0.7332)  acc1: 70.7031 (69.1058)  acc5: 87.5000 (87.3127)  meanQV: 1.4949 (1.4837)  stdQV: 0.3192 (0.3233)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [3300/5005]  eta: 0:14:50  lr: 0.0  img/s: 491.9402840653201  loss: 0.7205 (0.7333)  acc1: 69.1406 (69.1047)  acc5: 87.1094 (87.3212)  meanQV: 1.4840 (1.4837)  stdQV: 0.3216 (0.3233)  time: 0.5203  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [3400/5005]  eta: 0:13:58  lr: 0.0  img/s: 487.95378866338956  loss: 0.7223 (0.7333)  acc1: 69.5312 (69.0997)  acc5: 86.7188 (87.3139)  meanQV: 1.4867 (1.4837)  stdQV: 0.3216 (0.3234)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [3500/5005]  eta: 0:13:05  lr: 0.0  img/s: 1043.7659108075188  loss: 0.7439 (0.7335)  acc1: 69.1406 (69.0932)  acc5: 86.3281 (87.3065)  meanQV: 1.4840 (1.4837)  stdQV: 0.3216 (0.3234)  time: 0.4635  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [3600/5005]  eta: 0:12:07  lr: 0.0  img/s: 1048.0888024707265  loss: 0.7388 (0.7336)  acc1: 69.1406 (69.0959)  acc5: 86.7188 (87.3047)  meanQV: 1.4840 (1.4837)  stdQV: 0.3228 (0.3234)  time: 0.2795  data: 0.0011  max mem: 8962\n",
            "Epoch: [0]  [3700/5005]  eta: 0:11:15  lr: 0.0  img/s: 491.45843271282087  loss: 0.7387 (0.7335)  acc1: 69.5312 (69.0927)  acc5: 86.7188 (87.3025)  meanQV: 1.4867 (1.4836)  stdQV: 0.3228 (0.3234)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [3800/5005]  eta: 0:10:23  lr: 0.0  img/s: 496.6446795362795  loss: 0.7232 (0.7336)  acc1: 69.9219 (69.0989)  acc5: 87.8906 (87.3037)  meanQV: 1.4895 (1.4837)  stdQV: 0.3204 (0.3234)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [3900/5005]  eta: 0:09:32  lr: 0.0  img/s: 492.508007014193  loss: 0.7213 (0.7336)  acc1: 67.9688 (69.0933)  acc5: 87.1094 (87.2962)  meanQV: 1.4758 (1.4837)  stdQV: 0.3273 (0.3234)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4000/5005]  eta: 0:08:40  lr: 0.0  img/s: 488.4174580719702  loss: 0.7132 (0.7336)  acc1: 68.7500 (69.0951)  acc5: 87.5000 (87.2945)  meanQV: 1.4813 (1.4837)  stdQV: 0.3240 (0.3234)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4100/5005]  eta: 0:07:48  lr: 0.0  img/s: 495.24666769675684  loss: 0.7654 (0.7338)  acc1: 68.3594 (69.0866)  acc5: 87.1094 (87.2870)  meanQV: 1.4785 (1.4836)  stdQV: 0.3251 (0.3234)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [4200/5005]  eta: 0:06:56  lr: 0.0  img/s: 490.48949008347176  loss: 0.7638 (0.7341)  acc1: 66.7969 (69.0754)  acc5: 86.7188 (87.2836)  meanQV: 1.4676 (1.4835)  stdQV: 0.3262 (0.3234)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4300/5005]  eta: 0:06:05  lr: 0.0  img/s: 487.7678139386137  loss: 0.7096 (0.7339)  acc1: 69.1406 (69.0847)  acc5: 87.1094 (87.2826)  meanQV: 1.4840 (1.4836)  stdQV: 0.3240 (0.3234)  time: 0.5218  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [4400/5005]  eta: 0:05:13  lr: 0.0  img/s: 493.6394498964211  loss: 0.7463 (0.7340)  acc1: 68.3594 (69.0806)  acc5: 87.8906 (87.2854)  meanQV: 1.4785 (1.4836)  stdQV: 0.3262 (0.3234)  time: 0.5201  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [4500/5005]  eta: 0:04:21  lr: 0.0  img/s: 485.9301278068194  loss: 0.7351 (0.7337)  acc1: 69.1406 (69.0835)  acc5: 87.1094 (87.2907)  meanQV: 1.4840 (1.4836)  stdQV: 0.3240 (0.3234)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4600/5005]  eta: 0:03:29  lr: 0.0  img/s: 488.56480022495765  loss: 0.7084 (0.7340)  acc1: 68.3594 (69.0736)  acc5: 86.7188 (87.2877)  meanQV: 1.4785 (1.4835)  stdQV: 0.3262 (0.3234)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4700/5005]  eta: 0:02:38  lr: 0.0  img/s: 494.1863106933297  loss: 0.7403 (0.7337)  acc1: 68.7500 (69.0823)  acc5: 87.1094 (87.2872)  meanQV: 1.4813 (1.4836)  stdQV: 0.3251 (0.3234)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [4800/5005]  eta: 0:01:46  lr: 0.0  img/s: 491.70689603851804  loss: 0.7220 (0.7338)  acc1: 71.0938 (69.0803)  acc5: 86.7188 (87.2814)  meanQV: 1.4977 (1.4836)  stdQV: 0.3167 (0.3234)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [0]  [4900/5005]  eta: 0:00:54  lr: 0.0  img/s: 493.2093111277595  loss: 0.7027 (0.7336)  acc1: 69.5312 (69.0827)  acc5: 86.3281 (87.2757)  meanQV: 1.4867 (1.4836)  stdQV: 0.3228 (0.3234)  time: 0.5207  data: 0.0004  max mem: 8962\n",
            "Epoch: [0]  [5000/5005]  eta: 0:00:02  lr: 0.0  img/s: 488.95235848734404  loss: 0.7240 (0.7339)  acc1: 69.5312 (69.0705)  acc5: 86.7188 (87.2706)  meanQV: 1.4867 (1.4835)  stdQV: 0.3216 (0.3234)  time: 0.5214  data: 0.0002  max mem: 8962\n",
            "Epoch: [0] Total time: 0:43:17\n"
          ]
        },
        {
          "name": "stderr",
          "output_type": "stream",
          "text": [
            "/home/cs/anaconda3/envs/csenv/lib/python3.9/site-packages/torch/optim/lr_scheduler.py:243: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose.\n",
            "  warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning)\n"
          ]
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Test:   [   0/6250]  eta: 2:26:50  loss: 0.8858 (0.8858)  acc1: 75.0000 (75.0000)  acc5: 100.0000 (100.0000)  time: 1.4097  data: 0.7689  max mem: 8962\n",
            "Test:   [ 100/6250]  eta: 0:02:03  loss: 0.2054 (0.6172)  acc1: 100.0000 (83.7871)  acc5: 100.0000 (95.6683)  time: 0.0066  data: 0.0006  max mem: 8962\n",
            "Test:   [ 200/6250]  eta: 0:01:22  loss: 0.6502 (0.6427)  acc1: 87.5000 (84.3284)  acc5: 87.5000 (95.0249)  time: 0.0064  data: 0.0007  max mem: 8962\n",
            "Test:   [ 300/6250]  eta: 0:01:08  loss: 1.1768 (0.8467)  acc1: 62.5000 (78.3638)  acc5: 87.5000 (93.2724)  time: 0.0075  data: 0.0010  max mem: 8962\n",
            "Test:   [ 400/6250]  eta: 0:00:59  loss: 1.1007 (0.9660)  acc1: 75.0000 (75.4676)  acc5: 87.5000 (92.2070)  time: 0.0074  data: 0.0017  max mem: 8962\n",
            "Test:   [ 500/6250]  eta: 0:00:55  loss: 1.1372 (1.0088)  acc1: 75.0000 (74.0519)  acc5: 87.5000 (91.8663)  time: 0.0080  data: 0.0021  max mem: 8962\n",
            "Test:   [ 600/6250]  eta: 0:00:51  loss: 0.5046 (0.9217)  acc1: 87.5000 (76.2479)  acc5: 100.0000 (92.6789)  time: 0.0071  data: 0.0009  max mem: 8962\n",
            "Test:   [ 700/6250]  eta: 0:00:49  loss: 0.5742 (0.9105)  acc1: 87.5000 (76.6762)  acc5: 100.0000 (92.7068)  time: 0.0052  data: 0.0006  max mem: 8962\n",
            "Test:   [ 800/6250]  eta: 0:00:47  loss: 0.8010 (0.9392)  acc1: 75.0000 (76.1392)  acc5: 87.5000 (92.3221)  time: 0.0077  data: 0.0010  max mem: 8962\n",
            "Test:   [ 900/6250]  eta: 0:00:46  loss: 0.4006 (0.8848)  acc1: 87.5000 (77.4695)  acc5: 100.0000 (92.8413)  time: 0.0066  data: 0.0006  max mem: 8962\n",
            "Test:   [1000/6250]  eta: 0:00:44  loss: 0.8992 (0.8725)  acc1: 75.0000 (77.6474)  acc5: 100.0000 (92.9570)  time: 0.0070  data: 0.0007  max mem: 8962\n",
            "Test:   [1100/6250]  eta: 0:00:43  loss: 1.0749 (0.9068)  acc1: 62.5000 (76.6803)  acc5: 100.0000 (92.8020)  time: 0.0079  data: 0.0019  max mem: 8962\n",
            "Test:   [1200/6250]  eta: 0:00:42  loss: 1.0901 (0.9146)  acc1: 75.0000 (76.3114)  acc5: 87.5000 (92.8809)  time: 0.0081  data: 0.0007  max mem: 8962\n",
            "Test:   [1300/6250]  eta: 0:00:41  loss: 0.6278 (0.9170)  acc1: 75.0000 (76.0857)  acc5: 100.0000 (93.0630)  time: 0.0062  data: 0.0006  max mem: 8962\n",
            "Test:   [1400/6250]  eta: 0:00:39  loss: 0.8946 (0.9150)  acc1: 75.0000 (76.1153)  acc5: 87.5000 (93.0496)  time: 0.0070  data: 0.0006  max mem: 8962\n",
            "Test:   [1500/6250]  eta: 0:00:38  loss: 0.7951 (0.9198)  acc1: 75.0000 (75.8328)  acc5: 100.0000 (93.0963)  time: 0.0068  data: 0.0006  max mem: 8962\n",
            "Test:   [1600/6250]  eta: 0:00:37  loss: 0.2566 (0.9163)  acc1: 87.5000 (75.6636)  acc5: 100.0000 (93.2386)  time: 0.0072  data: 0.0007  max mem: 8962\n",
            "Test:   [1700/6250]  eta: 0:00:36  loss: 1.0530 (0.9138)  acc1: 75.0000 (75.6393)  acc5: 100.0000 (93.3789)  time: 0.0087  data: 0.0016  max mem: 8962\n",
            "Test:   [1800/6250]  eta: 0:00:35  loss: 1.1882 (0.9209)  acc1: 62.5000 (75.3956)  acc5: 87.5000 (93.3509)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [1900/6250]  eta: 0:00:34  loss: 1.0323 (0.9166)  acc1: 62.5000 (75.6707)  acc5: 100.0000 (93.4508)  time: 0.0059  data: 0.0006  max mem: 8962\n",
            "Test:   [2000/6250]  eta: 0:00:33  loss: 0.4827 (0.9227)  acc1: 75.0000 (75.5622)  acc5: 100.0000 (93.4283)  time: 0.0062  data: 0.0005  max mem: 8962\n",
            "Test:   [2100/6250]  eta: 0:00:32  loss: 0.4458 (0.9042)  acc1: 87.5000 (76.1185)  acc5: 100.0000 (93.5983)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [2200/6250]  eta: 0:00:31  loss: 0.1983 (0.8953)  acc1: 87.5000 (76.3233)  acc5: 100.0000 (93.6620)  time: 0.0058  data: 0.0005  max mem: 8962\n",
            "Test:   [2300/6250]  eta: 0:00:30  loss: 0.6167 (0.8971)  acc1: 87.5000 (76.2929)  acc5: 100.0000 (93.6658)  time: 0.0067  data: 0.0010  max mem: 8962\n",
            "Test:   [2400/6250]  eta: 0:00:29  loss: 1.1606 (0.9060)  acc1: 62.5000 (76.1245)  acc5: 87.5000 (93.5652)  time: 0.0069  data: 0.0006  max mem: 8962\n",
            "Test:   [2500/6250]  eta: 0:00:29  loss: 0.9882 (0.9067)  acc1: 75.0000 (76.2095)  acc5: 100.0000 (93.5176)  time: 0.0063  data: 0.0005  max mem: 8962\n",
            "Test:   [2600/6250]  eta: 0:00:27  loss: 2.1575 (0.9289)  acc1: 50.0000 (75.7785)  acc5: 75.0000 (93.2045)  time: 0.0058  data: 0.0006  max mem: 8962\n",
            "Test:   [2700/6250]  eta: 0:00:27  loss: 0.6626 (0.9389)  acc1: 75.0000 (75.6248)  acc5: 100.0000 (93.0859)  time: 0.0069  data: 0.0006  max mem: 8962\n",
            "Test:   [2800/6250]  eta: 0:00:26  loss: 1.7137 (0.9616)  acc1: 50.0000 (75.1205)  acc5: 87.5000 (92.8106)  time: 0.0062  data: 0.0006  max mem: 8962\n",
            "Test:   [2900/6250]  eta: 0:00:25  loss: 1.7213 (0.9804)  acc1: 50.0000 (74.7630)  acc5: 87.5000 (92.5758)  time: 0.0076  data: 0.0012  max mem: 8962\n",
            "Test:   [3000/6250]  eta: 0:00:24  loss: 2.1883 (1.0015)  acc1: 50.0000 (74.4585)  acc5: 75.0000 (92.2567)  time: 0.0066  data: 0.0013  max mem: 8962\n",
            "Test:   [3100/6250]  eta: 0:00:23  loss: 1.9025 (1.0238)  acc1: 50.0000 (73.9600)  acc5: 87.5000 (91.9824)  time: 0.0069  data: 0.0007  max mem: 8962\n",
            "Test:   [3200/6250]  eta: 0:00:22  loss: 0.7818 (1.0439)  acc1: 75.0000 (73.5786)  acc5: 100.0000 (91.7252)  time: 0.0066  data: 0.0009  max mem: 8962\n",
            "Test:   [3300/6250]  eta: 0:00:21  loss: 1.3260 (1.0571)  acc1: 50.0000 (73.2316)  acc5: 87.5000 (91.5972)  time: 0.0062  data: 0.0010  max mem: 8962\n",
            "Test:   [3400/6250]  eta: 0:00:21  loss: 2.2889 (1.0708)  acc1: 50.0000 (72.9638)  acc5: 75.0000 (91.4069)  time: 0.0054  data: 0.0004  max mem: 8962\n",
            "Test:   [3500/6250]  eta: 0:00:20  loss: 1.8139 (1.0788)  acc1: 62.5000 (72.8399)  acc5: 87.5000 (91.2704)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [3600/6250]  eta: 0:00:19  loss: 0.5227 (1.0757)  acc1: 75.0000 (72.9797)  acc5: 100.0000 (91.2837)  time: 0.0061  data: 0.0004  max mem: 8962\n",
            "Test:   [3700/6250]  eta: 0:00:18  loss: 1.5864 (1.0885)  acc1: 50.0000 (72.7101)  acc5: 87.5000 (91.0970)  time: 0.0110  data: 0.0061  max mem: 8962\n",
            "Test:   [3800/6250]  eta: 0:00:18  loss: 0.7844 (1.0958)  acc1: 87.5000 (72.5993)  acc5: 87.5000 (90.9826)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [3900/6250]  eta: 0:00:17  loss: 2.1642 (1.1114)  acc1: 37.5000 (72.2699)  acc5: 75.0000 (90.7684)  time: 0.0070  data: 0.0013  max mem: 8962\n",
            "Test:   [4000/6250]  eta: 0:00:16  loss: 1.3791 (1.1249)  acc1: 37.5000 (71.9789)  acc5: 87.5000 (90.6086)  time: 0.0061  data: 0.0009  max mem: 8962\n",
            "Test:   [4100/6250]  eta: 0:00:15  loss: 1.8430 (1.1361)  acc1: 50.0000 (71.8026)  acc5: 87.5000 (90.4566)  time: 0.0058  data: 0.0007  max mem: 8962\n",
            "Test:   [4200/6250]  eta: 0:00:14  loss: 0.5273 (1.1408)  acc1: 87.5000 (71.6556)  acc5: 100.0000 (90.4428)  time: 0.0054  data: 0.0004  max mem: 8962\n",
            "Test:   [4300/6250]  eta: 0:00:14  loss: 0.5790 (1.1499)  acc1: 75.0000 (71.5124)  acc5: 87.5000 (90.3075)  time: 0.0062  data: 0.0009  max mem: 8962\n",
            "Test:   [4400/6250]  eta: 0:00:13  loss: 0.8274 (1.1557)  acc1: 75.0000 (71.3730)  acc5: 100.0000 (90.2721)  time: 0.0063  data: 0.0009  max mem: 8962\n",
            "Test:   [4500/6250]  eta: 0:00:12  loss: 1.3455 (1.1605)  acc1: 75.0000 (71.3008)  acc5: 87.5000 (90.2327)  time: 0.0059  data: 0.0007  max mem: 8962\n",
            "Test:   [4600/6250]  eta: 0:00:11  loss: 1.6417 (1.1701)  acc1: 62.5000 (71.1476)  acc5: 87.5000 (90.0619)  time: 0.0066  data: 0.0008  max mem: 8962\n",
            "Test:   [4700/6250]  eta: 0:00:11  loss: 1.4379 (1.1789)  acc1: 62.5000 (70.8971)  acc5: 87.5000 (89.9197)  time: 0.0057  data: 0.0004  max mem: 8962\n",
            "Test:   [4800/6250]  eta: 0:00:10  loss: 1.3181 (1.1859)  acc1: 62.5000 (70.7899)  acc5: 87.5000 (89.8198)  time: 0.0061  data: 0.0006  max mem: 8962\n",
            "Test:   [4900/6250]  eta: 0:00:09  loss: 0.5202 (1.1891)  acc1: 87.5000 (70.7432)  acc5: 100.0000 (89.7648)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [5000/6250]  eta: 0:00:08  loss: 2.0605 (1.1999)  acc1: 62.5000 (70.5934)  acc5: 75.0000 (89.6296)  time: 0.0062  data: 0.0012  max mem: 8962\n",
            "Test:   [5100/6250]  eta: 0:00:08  loss: 1.3460 (1.2044)  acc1: 62.5000 (70.5229)  acc5: 87.5000 (89.5976)  time: 0.0080  data: 0.0008  max mem: 8962\n",
            "Test:   [5200/6250]  eta: 0:00:07  loss: 1.1308 (1.2106)  acc1: 75.0000 (70.4264)  acc5: 87.5000 (89.5236)  time: 0.0055  data: 0.0005  max mem: 8962\n",
            "Test:   [5300/6250]  eta: 0:00:06  loss: 1.5583 (1.2231)  acc1: 62.5000 (70.1354)  acc5: 87.5000 (89.3157)  time: 0.0069  data: 0.0016  max mem: 8962\n",
            "Test:   [5400/6250]  eta: 0:00:06  loss: 0.8486 (1.2267)  acc1: 75.0000 (70.0542)  acc5: 87.5000 (89.2728)  time: 0.0064  data: 0.0012  max mem: 8962\n",
            "Test:   [5500/6250]  eta: 0:00:05  loss: 1.0672 (1.2307)  acc1: 62.5000 (69.9509)  acc5: 87.5000 (89.2179)  time: 0.0071  data: 0.0005  max mem: 8962\n",
            "Test:   [5600/6250]  eta: 0:00:04  loss: 1.0070 (1.2359)  acc1: 62.5000 (69.8648)  acc5: 87.5000 (89.1202)  time: 0.0096  data: 0.0041  max mem: 8962\n",
            "Test:   [5700/6250]  eta: 0:00:03  loss: 2.0962 (1.2487)  acc1: 37.5000 (69.5843)  acc5: 87.5000 (89.0019)  time: 0.0070  data: 0.0006  max mem: 8962\n",
            "Test:   [5800/6250]  eta: 0:00:03  loss: 0.7288 (1.2454)  acc1: 75.0000 (69.6582)  acc5: 100.0000 (89.0471)  time: 0.0061  data: 0.0005  max mem: 8962\n",
            "Test:   [5900/6250]  eta: 0:00:02  loss: 1.1190 (1.2431)  acc1: 75.0000 (69.6873)  acc5: 100.0000 (89.0781)  time: 0.0067  data: 0.0006  max mem: 8962\n",
            "Test:   [6000/6250]  eta: 0:00:01  loss: 0.6253 (1.2358)  acc1: 87.5000 (69.8425)  acc5: 87.5000 (89.1622)  time: 0.0068  data: 0.0006  max mem: 8962\n",
            "Test:   [6100/6250]  eta: 0:00:01  loss: 1.1478 (1.2438)  acc1: 62.5000 (69.6423)  acc5: 100.0000 (89.0776)  time: 0.0069  data: 0.0006  max mem: 8962\n",
            "Test:   [6200/6250]  eta: 0:00:00  loss: 0.2636 (1.2384)  acc1: 87.5000 (69.7650)  acc5: 100.0000 (89.1469)  time: 0.0071  data: 0.0024  max mem: 8962\n",
            "Test:  Total time: 0:00:44\n",
            "Test:  Acc@1 69.802 Acc@5 89.166\n",
            "Epoch: [1]  [   0/5005]  eta: 5:42:56  lr: 0.0004  img/s: 480.9318095087941  loss: 0.7240 (0.7240)  acc1: 67.1875 (67.1875)  acc5: 89.4531 (89.4531)  meanQV: 1.4703 (1.4703)  stdQV: 0.3293 (0.3293)  time: 4.1113  data: 3.5789  max mem: 8962\n",
            "Epoch: [1]  [ 100/5005]  eta: 0:45:51  lr: 0.0004  img/s: 493.27547238807784  loss: 0.7663 (0.7544)  acc1: 68.3594 (68.9047)  acc5: 85.9375 (87.0166)  meanQV: 1.4785 (1.4823)  stdQV: 0.3262 (0.3240)  time: 0.5211  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [ 200/5005]  eta: 0:43:21  lr: 0.0004  img/s: 494.15947332208856  loss: 0.7673 (0.7576)  acc1: 68.7500 (69.0512)  acc5: 86.3281 (86.9928)  meanQV: 1.4813 (1.4833)  stdQV: 0.3240 (0.3234)  time: 0.5218  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [ 300/5005]  eta: 0:41:55  lr: 0.0004  img/s: 490.8006792413158  loss: 0.7602 (0.7692)  acc1: 69.9219 (68.8824)  acc5: 88.2812 (86.9770)  meanQV: 1.4895 (1.4821)  stdQV: 0.3204 (0.3239)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [ 400/5005]  eta: 0:40:46  lr: 0.0004  img/s: 488.3024018976519  loss: 0.7641 (0.7740)  acc1: 67.9688 (68.7734)  acc5: 87.5000 (86.9837)  meanQV: 1.4758 (1.4814)  stdQV: 0.3262 (0.3243)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [ 500/5005]  eta: 0:39:44  lr: 0.0004  img/s: 491.2133664120496  loss: 0.7673 (0.7762)  acc1: 69.9219 (68.8451)  acc5: 87.5000 (87.0439)  meanQV: 1.4895 (1.4819)  stdQV: 0.3216 (0.3241)  time: 0.5217  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [ 600/5005]  eta: 0:38:45  lr: 0.0004  img/s: 489.9574830025097  loss: 0.7744 (0.7785)  acc1: 68.7500 (68.8845)  acc5: 87.5000 (87.0379)  meanQV: 1.4813 (1.4821)  stdQV: 0.3240 (0.3240)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [ 700/5005]  eta: 0:37:48  lr: 0.0004  img/s: 490.1766813359385  loss: 0.7570 (0.7804)  acc1: 69.9219 (68.9227)  acc5: 87.1094 (87.0347)  meanQV: 1.4895 (1.4824)  stdQV: 0.3216 (0.3238)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [ 800/5005]  eta: 0:36:53  lr: 0.0004  img/s: 488.54479381319  loss: 0.7706 (0.7828)  acc1: 69.1406 (68.9124)  acc5: 86.3281 (87.0435)  meanQV: 1.4840 (1.4823)  stdQV: 0.3226 (0.3239)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [ 900/5005]  eta: 0:35:58  lr: 0.0004  img/s: 486.8855385165102  loss: 0.7941 (0.7848)  acc1: 68.3594 (68.9390)  acc5: 87.1094 (87.0465)  meanQV: 1.4785 (1.4825)  stdQV: 0.3251 (0.3238)  time: 0.5219  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1000/5005]  eta: 0:35:03  lr: 0.0004  img/s: 492.5010040446165  loss: 0.7671 (0.7867)  acc1: 69.5312 (68.9233)  acc5: 87.1094 (87.0430)  meanQV: 1.4867 (1.4824)  stdQV: 0.3228 (0.3238)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1100/5005]  eta: 0:34:10  lr: 0.0004  img/s: 491.8478935923928  loss: 0.7918 (0.7885)  acc1: 68.3594 (68.8866)  acc5: 87.1094 (86.9948)  meanQV: 1.4785 (1.4821)  stdQV: 0.3251 (0.3240)  time: 0.5219  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1200/5005]  eta: 0:33:16  lr: 0.0004  img/s: 492.04127725035846  loss: 0.8054 (0.7904)  acc1: 68.3594 (68.8863)  acc5: 87.1094 (87.0059)  meanQV: 1.4785 (1.4821)  stdQV: 0.3240 (0.3240)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1300/5005]  eta: 0:32:22  lr: 0.0004  img/s: 493.6503434775133  loss: 0.8003 (0.7921)  acc1: 68.7500 (68.8953)  acc5: 86.7188 (87.0238)  meanQV: 1.4813 (1.4822)  stdQV: 0.3240 (0.3239)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [1400/5005]  eta: 0:31:29  lr: 0.0004  img/s: 493.7590786833788  loss: 0.8469 (0.7947)  acc1: 67.5781 (68.8757)  acc5: 86.3281 (87.0087)  meanQV: 1.4730 (1.4821)  stdQV: 0.3273 (0.3240)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1500/5005]  eta: 0:30:36  lr: 0.0004  img/s: 493.85105292835783  loss: 0.8278 (0.7964)  acc1: 67.9688 (68.8734)  acc5: 87.1094 (87.0126)  meanQV: 1.4758 (1.4820)  stdQV: 0.3260 (0.3240)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1600/5005]  eta: 0:29:43  lr: 0.0004  img/s: 489.0960134101013  loss: 0.8061 (0.7976)  acc1: 69.5312 (68.8713)  acc5: 86.7188 (87.0096)  meanQV: 1.4867 (1.4820)  stdQV: 0.3228 (0.3240)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1700/5005]  eta: 0:28:50  lr: 0.0004  img/s: 487.0217960638814  loss: 0.8219 (0.7990)  acc1: 69.1406 (68.8761)  acc5: 86.3281 (87.0118)  meanQV: 1.4840 (1.4821)  stdQV: 0.3204 (0.3240)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1800/5005]  eta: 0:27:57  lr: 0.0004  img/s: 487.4064667244674  loss: 0.8217 (0.8005)  acc1: 67.1875 (68.8660)  acc5: 85.9375 (86.9964)  meanQV: 1.4703 (1.4820)  stdQV: 0.3273 (0.3240)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [1900/5005]  eta: 0:27:05  lr: 0.0004  img/s: 495.115358261054  loss: 0.8361 (0.8026)  acc1: 67.9688 (68.8474)  acc5: 86.3281 (86.9830)  meanQV: 1.4746 (1.4818)  stdQV: 0.3270 (0.3240)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2000/5005]  eta: 0:26:12  lr: 0.0004  img/s: 488.846174928818  loss: 0.8257 (0.8035)  acc1: 69.1406 (68.8619)  acc5: 87.1094 (86.9956)  meanQV: 1.4840 (1.4819)  stdQV: 0.3228 (0.3240)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2100/5005]  eta: 0:25:19  lr: 0.0004  img/s: 491.2070743506753  loss: 0.8428 (0.8053)  acc1: 66.7969 (68.8420)  acc5: 87.1094 (86.9922)  meanQV: 1.4676 (1.4818)  stdQV: 0.3303 (0.3241)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2200/5005]  eta: 0:24:27  lr: 0.0004  img/s: 488.1822949084529  loss: 0.8558 (0.8064)  acc1: 68.3594 (68.8570)  acc5: 87.5000 (87.0222)  meanQV: 1.4785 (1.4819)  stdQV: 0.3251 (0.3240)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [2300/5005]  eta: 0:23:34  lr: 0.0004  img/s: 491.70599535560405  loss: 0.8227 (0.8072)  acc1: 68.3594 (68.8542)  acc5: 87.1094 (87.0248)  meanQV: 1.4785 (1.4819)  stdQV: 0.3262 (0.3240)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [2400/5005]  eta: 0:22:42  lr: 0.0004  img/s: 488.04228171446755  loss: 0.8344 (0.8086)  acc1: 69.5312 (68.8348)  acc5: 87.5000 (87.0231)  meanQV: 1.4867 (1.4817)  stdQV: 0.3228 (0.3241)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2500/5005]  eta: 0:21:49  lr: 0.0004  img/s: 493.9346543052109  loss: 0.8142 (0.8099)  acc1: 67.1875 (68.8248)  acc5: 86.3281 (87.0107)  meanQV: 1.4703 (1.4817)  stdQV: 0.3273 (0.3241)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2600/5005]  eta: 0:20:57  lr: 0.0004  img/s: 493.71140181999846  loss: 0.8310 (0.8114)  acc1: 69.5312 (68.8209)  acc5: 87.8906 (87.0080)  meanQV: 1.4855 (1.4816)  stdQV: 0.3216 (0.3241)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [2700/5005]  eta: 0:20:04  lr: 0.0004  img/s: 490.4764950910866  loss: 0.8228 (0.8124)  acc1: 68.7500 (68.8167)  acc5: 87.5000 (87.0055)  meanQV: 1.4813 (1.4816)  stdQV: 0.3238 (0.3241)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [2800/5005]  eta: 0:19:12  lr: 0.0004  img/s: 489.5152105330343  loss: 0.8128 (0.8133)  acc1: 69.1406 (68.8236)  acc5: 87.1094 (87.0178)  meanQV: 1.4840 (1.4817)  stdQV: 0.3240 (0.3241)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [2900/5005]  eta: 0:18:20  lr: 0.0004  img/s: 490.35195733551564  loss: 0.8154 (0.8143)  acc1: 67.5781 (68.8168)  acc5: 86.7188 (87.0159)  meanQV: 1.4730 (1.4816)  stdQV: 0.3273 (0.3241)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [3000/5005]  eta: 0:17:27  lr: 0.0004  img/s: 496.8430038188373  loss: 0.8169 (0.8153)  acc1: 69.1406 (68.8008)  acc5: 88.2812 (87.0080)  meanQV: 1.4840 (1.4815)  stdQV: 0.3228 (0.3242)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3100/5005]  eta: 0:16:35  lr: 0.0004  img/s: 488.5263449079129  loss: 0.8308 (0.8165)  acc1: 70.3125 (68.7841)  acc5: 88.2812 (87.0036)  meanQV: 1.4922 (1.4814)  stdQV: 0.3192 (0.3242)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3200/5005]  eta: 0:15:43  lr: 0.0004  img/s: 491.9060279391008  loss: 0.8449 (0.8176)  acc1: 68.3594 (68.7768)  acc5: 86.3281 (86.9960)  meanQV: 1.4785 (1.4813)  stdQV: 0.3262 (0.3242)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3300/5005]  eta: 0:14:50  lr: 0.0004  img/s: 493.2963213941315  loss: 0.8492 (0.8186)  acc1: 67.9688 (68.7659)  acc5: 87.1094 (86.9994)  meanQV: 1.4758 (1.4812)  stdQV: 0.3248 (0.3243)  time: 0.5203  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3400/5005]  eta: 0:13:58  lr: 0.0004  img/s: 489.8253877234111  loss: 0.8006 (0.8190)  acc1: 68.3594 (68.7695)  acc5: 86.7188 (87.0057)  meanQV: 1.4785 (1.4813)  stdQV: 0.3192 (0.3243)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3500/5005]  eta: 0:13:06  lr: 0.0004  img/s: 487.77468294972033  loss: 0.8505 (0.8198)  acc1: 68.7500 (68.7579)  acc5: 85.9375 (87.0026)  meanQV: 1.4813 (1.4812)  stdQV: 0.3248 (0.3243)  time: 0.5211  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3600/5005]  eta: 0:12:13  lr: 0.0004  img/s: 493.46703224484054  loss: 0.8441 (0.8204)  acc1: 68.3594 (68.7684)  acc5: 87.1094 (86.9979)  meanQV: 1.4785 (1.4813)  stdQV: 0.3262 (0.3243)  time: 0.5203  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3700/5005]  eta: 0:11:21  lr: 0.0004  img/s: 489.55359849141115  loss: 0.8019 (0.8213)  acc1: 69.9219 (68.7655)  acc5: 86.7188 (86.9992)  meanQV: 1.4891 (1.4812)  stdQV: 0.3214 (0.3243)  time: 0.5221  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3800/5005]  eta: 0:10:29  lr: 0.0004  img/s: 493.67462881592127  loss: 0.8116 (0.8217)  acc1: 69.1406 (68.7733)  acc5: 86.7188 (87.0059)  meanQV: 1.4840 (1.4813)  stdQV: 0.3216 (0.3243)  time: 0.5207  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [3900/5005]  eta: 0:09:37  lr: 0.0004  img/s: 491.10327860529725  loss: 0.8894 (0.8224)  acc1: 67.5781 (68.7723)  acc5: 85.9375 (87.0182)  meanQV: 1.4730 (1.4813)  stdQV: 0.3273 (0.3243)  time: 0.5204  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [4000/5005]  eta: 0:08:42  lr: 0.0004  img/s: 658.0155167215349  loss: 0.8130 (0.8233)  acc1: 68.7500 (68.7736)  acc5: 86.7188 (87.0157)  meanQV: 1.4813 (1.4813)  stdQV: 0.3228 (0.3243)  time: 0.3829  data: 0.0022  max mem: 8962\n",
            "Epoch: [1]  [4100/5005]  eta: 0:07:48  lr: 0.0004  img/s: 495.21469028956733  loss: 0.8295 (0.8240)  acc1: 69.1406 (68.7658)  acc5: 87.5000 (87.0174)  meanQV: 1.4816 (1.4812)  stdQV: 0.3235 (0.3243)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [4200/5005]  eta: 0:06:57  lr: 0.0004  img/s: 492.8694949672994  loss: 0.8703 (0.8249)  acc1: 68.3594 (68.7643)  acc5: 87.1094 (87.0155)  meanQV: 1.4773 (1.4812)  stdQV: 0.3262 (0.3243)  time: 0.5213  data: 0.0005  max mem: 8962\n",
            "Epoch: [1]  [4300/5005]  eta: 0:06:05  lr: 0.0004  img/s: 490.85205892006695  loss: 0.8436 (0.8255)  acc1: 67.5781 (68.7648)  acc5: 87.1094 (87.0136)  meanQV: 1.4730 (1.4812)  stdQV: 0.3262 (0.3243)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [4400/5005]  eta: 0:05:13  lr: 0.0004  img/s: 493.98669227672667  loss: 0.8510 (0.8258)  acc1: 68.3594 (68.7773)  acc5: 86.7188 (87.0168)  meanQV: 1.4785 (1.4813)  stdQV: 0.3251 (0.3242)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [4500/5005]  eta: 0:04:21  lr: 0.0004  img/s: 493.84991723495295  loss: 0.8170 (0.8264)  acc1: 68.3594 (68.7790)  acc5: 88.2812 (87.0156)  meanQV: 1.4785 (1.4813)  stdQV: 0.3238 (0.3242)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [4600/5005]  eta: 0:03:30  lr: 0.0004  img/s: 488.5125647070813  loss: 0.8377 (0.8271)  acc1: 68.3594 (68.7688)  acc5: 87.5000 (87.0158)  meanQV: 1.4770 (1.4812)  stdQV: 0.3262 (0.3243)  time: 0.5200  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [4700/5005]  eta: 0:02:38  lr: 0.0004  img/s: 491.9828855090406  loss: 0.8226 (0.8275)  acc1: 68.3594 (68.7709)  acc5: 87.8906 (87.0220)  meanQV: 1.4785 (1.4812)  stdQV: 0.3216 (0.3243)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [1]  [4800/5005]  eta: 0:01:46  lr: 0.0004  img/s: 493.26708795863277  loss: 0.8528 (0.8281)  acc1: 68.7500 (68.7686)  acc5: 86.3281 (87.0159)  meanQV: 1.4809 (1.4812)  stdQV: 0.3251 (0.3243)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [4900/5005]  eta: 0:00:54  lr: 0.0004  img/s: 491.2724747144307  loss: 0.8068 (0.8286)  acc1: 69.5312 (68.7636)  acc5: 87.1094 (87.0159)  meanQV: 1.4867 (1.4812)  stdQV: 0.3228 (0.3243)  time: 0.5217  data: 0.0003  max mem: 8962\n",
            "Epoch: [1]  [5000/5005]  eta: 0:00:02  lr: 0.0004  img/s: 492.8498131172718  loss: 0.8547 (0.8292)  acc1: 67.9688 (68.7634)  acc5: 86.3281 (87.0148)  meanQV: 1.4758 (1.4812)  stdQV: 0.3262 (0.3243)  time: 0.5210  data: 0.0002  max mem: 8962\n",
            "Epoch: [1] Total time: 0:43:16\n",
            "Test:   [   0/6250]  eta: 1:21:57  loss: 0.8673 (0.8673)  acc1: 62.5000 (62.5000)  acc5: 100.0000 (100.0000)  time: 0.7867  data: 0.7725  max mem: 8962\n",
            "Test:   [ 100/6250]  eta: 0:01:29  loss: 0.1868 (0.6206)  acc1: 100.0000 (83.5396)  acc5: 100.0000 (95.4208)  time: 0.0063  data: 0.0008  max mem: 8962\n",
            "Test:   [ 200/6250]  eta: 0:01:03  loss: 0.7102 (0.6552)  acc1: 75.0000 (83.7687)  acc5: 100.0000 (94.6517)  time: 0.0056  data: 0.0004  max mem: 8962\n",
            "Test:   [ 300/6250]  eta: 0:00:54  loss: 1.2776 (0.8690)  acc1: 62.5000 (78.6130)  acc5: 87.5000 (93.0233)  time: 0.0061  data: 0.0009  max mem: 8962\n",
            "Test:   [ 400/6250]  eta: 0:00:48  loss: 0.9489 (0.9890)  acc1: 75.0000 (75.8416)  acc5: 87.5000 (92.0823)  time: 0.0060  data: 0.0005  max mem: 8962\n",
            "Test:   [ 500/6250]  eta: 0:00:45  loss: 1.0595 (1.0403)  acc1: 75.0000 (74.4261)  acc5: 87.5000 (91.6168)  time: 0.0053  data: 0.0007  max mem: 8962\n",
            "Test:   [ 600/6250]  eta: 0:00:42  loss: 0.4378 (0.9454)  acc1: 87.5000 (76.4975)  acc5: 100.0000 (92.3877)  time: 0.0051  data: 0.0004  max mem: 8962\n",
            "Test:   [ 700/6250]  eta: 0:00:40  loss: 0.4026 (0.9303)  acc1: 87.5000 (76.7653)  acc5: 100.0000 (92.4394)  time: 0.0056  data: 0.0006  max mem: 8962\n",
            "Test:   [ 800/6250]  eta: 0:00:39  loss: 0.7303 (0.9549)  acc1: 75.0000 (76.2797)  acc5: 87.5000 (92.0880)  time: 0.0063  data: 0.0006  max mem: 8962\n",
            "Test:   [ 900/6250]  eta: 0:00:37  loss: 0.3813 (0.8983)  acc1: 87.5000 (77.5943)  acc5: 100.0000 (92.6471)  time: 0.0063  data: 0.0006  max mem: 8962\n",
            "Test:   [1000/6250]  eta: 0:00:36  loss: 0.8989 (0.8855)  acc1: 75.0000 (77.7473)  acc5: 100.0000 (92.7947)  time: 0.0056  data: 0.0007  max mem: 8962\n",
            "Test:   [1100/6250]  eta: 0:00:35  loss: 1.1069 (0.9229)  acc1: 75.0000 (76.8847)  acc5: 100.0000 (92.6203)  time: 0.0064  data: 0.0022  max mem: 8962\n",
            "Test:   [1200/6250]  eta: 0:00:34  loss: 1.0983 (0.9314)  acc1: 75.0000 (76.4467)  acc5: 87.5000 (92.6624)  time: 0.0055  data: 0.0005  max mem: 8962\n",
            "Test:   [1300/6250]  eta: 0:00:33  loss: 0.5355 (0.9346)  acc1: 75.0000 (76.1145)  acc5: 100.0000 (92.8132)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [1400/6250]  eta: 0:00:32  loss: 0.7667 (0.9310)  acc1: 75.0000 (76.2313)  acc5: 100.0000 (92.9069)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [1500/6250]  eta: 0:00:31  loss: 0.8760 (0.9357)  acc1: 62.5000 (75.9494)  acc5: 100.0000 (92.9880)  time: 0.0053  data: 0.0007  max mem: 8962\n",
            "Test:   [1600/6250]  eta: 0:00:30  loss: 0.0993 (0.9286)  acc1: 100.0000 (75.9135)  acc5: 100.0000 (93.1371)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [1700/6250]  eta: 0:00:29  loss: 1.1072 (0.9257)  acc1: 62.5000 (75.8157)  acc5: 100.0000 (93.2760)  time: 0.0068  data: 0.0021  max mem: 8962\n",
            "Test:   [1800/6250]  eta: 0:00:28  loss: 1.1913 (0.9373)  acc1: 62.5000 (75.5622)  acc5: 87.5000 (93.2537)  time: 0.0054  data: 0.0006  max mem: 8962\n",
            "Test:   [1900/6250]  eta: 0:00:28  loss: 1.0258 (0.9308)  acc1: 62.5000 (75.8417)  acc5: 100.0000 (93.3653)  time: 0.0050  data: 0.0006  max mem: 8962\n",
            "Test:   [2000/6250]  eta: 0:00:27  loss: 0.5154 (0.9364)  acc1: 87.5000 (75.7871)  acc5: 100.0000 (93.3221)  time: 0.0055  data: 0.0006  max mem: 8962\n",
            "Test:   [2100/6250]  eta: 0:00:27  loss: 0.3852 (0.9175)  acc1: 87.5000 (76.3267)  acc5: 100.0000 (93.4793)  time: 0.0061  data: 0.0012  max mem: 8962\n",
            "Test:   [2200/6250]  eta: 0:00:26  loss: 0.2291 (0.9102)  acc1: 87.5000 (76.4652)  acc5: 100.0000 (93.5654)  time: 0.0063  data: 0.0007  max mem: 8962\n",
            "Test:   [2300/6250]  eta: 0:00:25  loss: 0.6943 (0.9109)  acc1: 87.5000 (76.4776)  acc5: 100.0000 (93.5843)  time: 0.0062  data: 0.0005  max mem: 8962\n",
            "Test:   [2400/6250]  eta: 0:00:25  loss: 0.8836 (0.9201)  acc1: 75.0000 (76.3432)  acc5: 87.5000 (93.4975)  time: 0.0056  data: 0.0011  max mem: 8962\n",
            "Test:   [2500/6250]  eta: 0:00:24  loss: 0.7644 (0.9205)  acc1: 87.5000 (76.4794)  acc5: 100.0000 (93.4626)  time: 0.0061  data: 0.0010  max mem: 8962\n",
            "Test:   [2600/6250]  eta: 0:00:23  loss: 2.2800 (0.9451)  acc1: 37.5000 (75.9948)  acc5: 75.0000 (93.1469)  time: 0.0055  data: 0.0006  max mem: 8962\n",
            "Test:   [2700/6250]  eta: 0:00:23  loss: 0.7858 (0.9555)  acc1: 75.0000 (75.7960)  acc5: 87.5000 (93.0118)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [2800/6250]  eta: 0:00:22  loss: 1.6738 (0.9770)  acc1: 62.5000 (75.3481)  acc5: 75.0000 (92.7704)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [2900/6250]  eta: 0:00:21  loss: 1.9858 (0.9960)  acc1: 37.5000 (74.9138)  acc5: 87.5000 (92.5241)  time: 0.0071  data: 0.0006  max mem: 8962\n",
            "Test:   [3000/6250]  eta: 0:00:21  loss: 2.4274 (1.0179)  acc1: 50.0000 (74.6126)  acc5: 75.0000 (92.1984)  time: 0.0060  data: 0.0005  max mem: 8962\n",
            "Test:   [3100/6250]  eta: 0:00:20  loss: 1.8322 (1.0420)  acc1: 50.0000 (74.1172)  acc5: 75.0000 (91.9461)  time: 0.0064  data: 0.0005  max mem: 8962\n",
            "Test:   [3200/6250]  eta: 0:00:19  loss: 0.7034 (1.0615)  acc1: 75.0000 (73.6996)  acc5: 100.0000 (91.7291)  time: 0.0049  data: 0.0004  max mem: 8962\n",
            "Test:   [3300/6250]  eta: 0:00:19  loss: 1.2400 (1.0739)  acc1: 62.5000 (73.3528)  acc5: 87.5000 (91.6238)  time: 0.0050  data: 0.0006  max mem: 8962\n",
            "Test:   [3400/6250]  eta: 0:00:18  loss: 2.3805 (1.0877)  acc1: 37.5000 (73.0851)  acc5: 75.0000 (91.4327)  time: 0.0060  data: 0.0007  max mem: 8962\n",
            "Test:   [3500/6250]  eta: 0:00:17  loss: 1.7449 (1.0943)  acc1: 50.0000 (72.9899)  acc5: 87.5000 (91.2953)  time: 0.0074  data: 0.0023  max mem: 8962\n",
            "Test:   [3600/6250]  eta: 0:00:16  loss: 0.4245 (1.0910)  acc1: 87.5000 (73.1325)  acc5: 100.0000 (91.2941)  time: 0.0059  data: 0.0004  max mem: 8962\n",
            "Test:   [3700/6250]  eta: 0:00:16  loss: 1.6126 (1.1052)  acc1: 50.0000 (72.8519)  acc5: 87.5000 (91.1105)  time: 0.0121  data: 0.0065  max mem: 8962\n",
            "Test:   [3800/6250]  eta: 0:00:15  loss: 0.7444 (1.1120)  acc1: 87.5000 (72.7605)  acc5: 87.5000 (90.9761)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [3900/6250]  eta: 0:00:14  loss: 2.3107 (1.1276)  acc1: 50.0000 (72.4494)  acc5: 75.0000 (90.7652)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [4000/6250]  eta: 0:00:14  loss: 1.4615 (1.1421)  acc1: 62.5000 (72.1788)  acc5: 87.5000 (90.5992)  time: 0.0056  data: 0.0004  max mem: 8962\n",
            "Test:   [4100/6250]  eta: 0:00:13  loss: 1.7447 (1.1522)  acc1: 62.5000 (72.0129)  acc5: 87.5000 (90.4840)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [4200/6250]  eta: 0:00:12  loss: 0.4051 (1.1574)  acc1: 87.5000 (71.8609)  acc5: 100.0000 (90.4725)  time: 0.0061  data: 0.0005  max mem: 8962\n",
            "Test:   [4300/6250]  eta: 0:00:12  loss: 0.4819 (1.1662)  acc1: 75.0000 (71.7420)  acc5: 87.5000 (90.3191)  time: 0.0058  data: 0.0007  max mem: 8962\n",
            "Test:   [4400/6250]  eta: 0:00:11  loss: 0.8488 (1.1727)  acc1: 75.0000 (71.5633)  acc5: 100.0000 (90.2835)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [4500/6250]  eta: 0:00:11  loss: 1.1410 (1.1786)  acc1: 62.5000 (71.4619)  acc5: 87.5000 (90.2383)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [4600/6250]  eta: 0:00:10  loss: 1.5850 (1.1891)  acc1: 50.0000 (71.2834)  acc5: 87.5000 (90.0701)  time: 0.0064  data: 0.0010  max mem: 8962\n",
            "Test:   [4700/6250]  eta: 0:00:09  loss: 1.3859 (1.1988)  acc1: 62.5000 (70.9982)  acc5: 87.5000 (89.9463)  time: 0.0051  data: 0.0005  max mem: 8962\n",
            "Test:   [4800/6250]  eta: 0:00:09  loss: 1.2475 (1.2056)  acc1: 62.5000 (70.8811)  acc5: 87.5000 (89.8563)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [4900/6250]  eta: 0:00:08  loss: 0.4116 (1.2104)  acc1: 87.5000 (70.8121)  acc5: 100.0000 (89.7750)  time: 0.0058  data: 0.0009  max mem: 8962\n",
            "Test:   [5000/6250]  eta: 0:00:07  loss: 2.0346 (1.2224)  acc1: 62.5000 (70.6259)  acc5: 75.0000 (89.6321)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [5100/6250]  eta: 0:00:07  loss: 1.2888 (1.2271)  acc1: 62.5000 (70.5327)  acc5: 87.5000 (89.5952)  time: 0.0069  data: 0.0006  max mem: 8962\n",
            "Test:   [5200/6250]  eta: 0:00:06  loss: 1.0585 (1.2335)  acc1: 75.0000 (70.4216)  acc5: 87.5000 (89.5236)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [5300/6250]  eta: 0:00:05  loss: 1.5391 (1.2470)  acc1: 62.5000 (70.1401)  acc5: 87.5000 (89.3440)  time: 0.0058  data: 0.0006  max mem: 8962\n",
            "Test:   [5400/6250]  eta: 0:00:05  loss: 0.9108 (1.2497)  acc1: 75.0000 (70.0889)  acc5: 87.5000 (89.2936)  time: 0.0057  data: 0.0010  max mem: 8962\n",
            "Test:   [5500/6250]  eta: 0:00:04  loss: 0.9651 (1.2539)  acc1: 75.0000 (69.9668)  acc5: 87.5000 (89.2383)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [5600/6250]  eta: 0:00:04  loss: 0.8866 (1.2592)  acc1: 62.5000 (69.8915)  acc5: 87.5000 (89.1381)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [5700/6250]  eta: 0:00:03  loss: 1.9771 (1.2739)  acc1: 37.5000 (69.5799)  acc5: 75.0000 (88.9954)  time: 0.0055  data: 0.0004  max mem: 8962\n",
            "Test:   [5800/6250]  eta: 0:00:02  loss: 0.5795 (1.2705)  acc1: 75.0000 (69.6410)  acc5: 100.0000 (89.0407)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [5900/6250]  eta: 0:00:02  loss: 1.1301 (1.2675)  acc1: 75.0000 (69.6831)  acc5: 100.0000 (89.0824)  time: 0.0058  data: 0.0005  max mem: 8962\n",
            "Test:   [6000/6250]  eta: 0:00:01  loss: 0.5545 (1.2598)  acc1: 87.5000 (69.8384)  acc5: 87.5000 (89.1685)  time: 0.0059  data: 0.0004  max mem: 8962\n",
            "Test:   [6100/6250]  eta: 0:00:00  loss: 1.2558 (1.2676)  acc1: 62.5000 (69.6648)  acc5: 87.5000 (89.0797)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [6200/6250]  eta: 0:00:00  loss: 0.1734 (1.2610)  acc1: 87.5000 (69.7831)  acc5: 100.0000 (89.1610)  time: 0.0060  data: 0.0007  max mem: 8962\n",
            "Test:  Total time: 0:00:38\n",
            "Test:  Acc@1 69.816 Acc@5 89.174\n",
            "Epoch: [2]  [   0/5005]  eta: 5:24:29  lr: 0.0004  img/s: 488.37947021283276  loss: 0.7970 (0.7970)  acc1: 72.2656 (72.2656)  acc5: 87.1094 (87.1094)  meanQV: 1.5059 (1.5059)  stdQV: 0.3140 (0.3140)  time: 3.8899  data: 3.3657  max mem: 8962\n",
            "Epoch: [2]  [ 100/5005]  eta: 0:45:25  lr: 0.0004  img/s: 493.19209398441154  loss: 0.8641 (0.8689)  acc1: 67.9688 (68.4483)  acc5: 87.1094 (86.6530)  meanQV: 1.4758 (1.4788)  stdQV: 0.3251 (0.3251)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [ 200/5005]  eta: 0:43:07  lr: 0.0004  img/s: 491.1342779344896  loss: 0.8738 (0.8655)  acc1: 68.7500 (68.5595)  acc5: 87.5000 (86.8898)  meanQV: 1.4813 (1.4796)  stdQV: 0.3240 (0.3248)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [ 300/5005]  eta: 0:41:47  lr: 0.0004  img/s: 487.00059052814623  loss: 0.8533 (0.8685)  acc1: 68.3594 (68.4191)  acc5: 87.5000 (86.8005)  meanQV: 1.4785 (1.4786)  stdQV: 0.3251 (0.3252)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [ 400/5005]  eta: 0:40:40  lr: 0.0004  img/s: 488.72224116185464  loss: 0.8569 (0.8636)  acc1: 69.1406 (68.5932)  acc5: 87.1094 (86.8931)  meanQV: 1.4840 (1.4799)  stdQV: 0.3216 (0.3247)  time: 0.5220  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [ 500/5005]  eta: 0:39:39  lr: 0.0004  img/s: 485.98511188265843  loss: 0.8240 (0.8635)  acc1: 69.5312 (68.5403)  acc5: 87.8906 (86.8723)  meanQV: 1.4867 (1.4795)  stdQV: 0.3215 (0.3249)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [ 600/5005]  eta: 0:38:41  lr: 0.0004  img/s: 493.6265143933163  loss: 0.8603 (0.8641)  acc1: 68.7500 (68.5791)  acc5: 86.3281 (86.8962)  meanQV: 1.4801 (1.4798)  stdQV: 0.3251 (0.3248)  time: 0.5222  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [ 700/5005]  eta: 0:37:44  lr: 0.0004  img/s: 495.0733539463698  loss: 0.8482 (0.8641)  acc1: 68.3594 (68.5656)  acc5: 87.1094 (86.9194)  meanQV: 1.4785 (1.4797)  stdQV: 0.3260 (0.3249)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [ 800/5005]  eta: 0:36:49  lr: 0.0004  img/s: 490.3255347956828  loss: 0.8578 (0.8649)  acc1: 69.1406 (68.5959)  acc5: 86.7188 (86.9270)  meanQV: 1.4840 (1.4799)  stdQV: 0.3240 (0.3248)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [ 900/5005]  eta: 0:35:55  lr: 0.0004  img/s: 487.8480383248159  loss: 0.8300 (0.8626)  acc1: 69.1406 (68.6646)  acc5: 87.5000 (86.9767)  meanQV: 1.4840 (1.4804)  stdQV: 0.3228 (0.3246)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [1000/5005]  eta: 0:35:01  lr: 0.0004  img/s: 491.5558526149826  loss: 0.8513 (0.8634)  acc1: 69.1406 (68.6805)  acc5: 87.5000 (86.9775)  meanQV: 1.4840 (1.4805)  stdQV: 0.3226 (0.3245)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1100/5005]  eta: 0:34:07  lr: 0.0004  img/s: 490.84757118315395  loss: 0.8577 (0.8636)  acc1: 68.3594 (68.6847)  acc5: 86.7188 (86.9710)  meanQV: 1.4785 (1.4805)  stdQV: 0.3251 (0.3245)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1200/5005]  eta: 0:33:14  lr: 0.0004  img/s: 494.1517410611354  loss: 0.8542 (0.8649)  acc1: 68.7500 (68.6462)  acc5: 86.3281 (86.9607)  meanQV: 1.4813 (1.4802)  stdQV: 0.3240 (0.3246)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [1300/5005]  eta: 0:32:20  lr: 0.0004  img/s: 487.5868519700021  loss: 0.8400 (0.8649)  acc1: 69.1406 (68.6611)  acc5: 86.3281 (86.9457)  meanQV: 1.4840 (1.4803)  stdQV: 0.3240 (0.3246)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1400/5005]  eta: 0:31:27  lr: 0.0004  img/s: 493.3883500186788  loss: 0.8124 (0.8646)  acc1: 69.1406 (68.6887)  acc5: 87.8906 (86.9658)  meanQV: 1.4840 (1.4805)  stdQV: 0.3240 (0.3245)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1500/5005]  eta: 0:30:34  lr: 0.0004  img/s: 495.2411855622316  loss: 0.8914 (0.8663)  acc1: 67.5781 (68.6449)  acc5: 87.5000 (86.9530)  meanQV: 1.4719 (1.4802)  stdQV: 0.3280 (0.3246)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1600/5005]  eta: 0:29:41  lr: 0.0004  img/s: 492.28401072281827  loss: 0.8554 (0.8661)  acc1: 69.9219 (68.6358)  acc5: 87.5000 (86.9669)  meanQV: 1.4891 (1.4802)  stdQV: 0.3216 (0.3246)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1700/5005]  eta: 0:28:49  lr: 0.0004  img/s: 488.3163923205836  loss: 0.8374 (0.8661)  acc1: 69.5312 (68.6529)  acc5: 87.5000 (86.9794)  meanQV: 1.4867 (1.4803)  stdQV: 0.3228 (0.3246)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1800/5005]  eta: 0:27:56  lr: 0.0004  img/s: 493.57046837953203  loss: 0.8886 (0.8664)  acc1: 68.3594 (68.6639)  acc5: 86.7188 (86.9808)  meanQV: 1.4785 (1.4804)  stdQV: 0.3251 (0.3245)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [1900/5005]  eta: 0:27:03  lr: 0.0004  img/s: 490.1453552810568  loss: 0.8548 (0.8668)  acc1: 68.3594 (68.6598)  acc5: 87.1094 (86.9768)  meanQV: 1.4785 (1.4803)  stdQV: 0.3249 (0.3245)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [2000/5005]  eta: 0:26:11  lr: 0.0004  img/s: 488.1270344653269  loss: 0.9081 (0.8673)  acc1: 67.9688 (68.6596)  acc5: 85.9375 (86.9690)  meanQV: 1.4754 (1.4803)  stdQV: 0.3270 (0.3245)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [2100/5005]  eta: 0:25:18  lr: 0.0004  img/s: 489.5038292141757  loss: 0.8766 (0.8678)  acc1: 68.7500 (68.6416)  acc5: 87.5000 (86.9612)  meanQV: 1.4813 (1.4802)  stdQV: 0.3240 (0.3246)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [2200/5005]  eta: 0:24:26  lr: 0.0004  img/s: 493.80040608063206  loss: 0.8591 (0.8679)  acc1: 68.3594 (68.6433)  acc5: 86.7188 (86.9536)  meanQV: 1.4785 (1.4802)  stdQV: 0.3259 (0.3246)  time: 0.5222  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [2300/5005]  eta: 0:23:33  lr: 0.0004  img/s: 487.89902333117954  loss: 0.8695 (0.8681)  acc1: 67.5781 (68.6313)  acc5: 86.3281 (86.9520)  meanQV: 1.4703 (1.4801)  stdQV: 0.3262 (0.3246)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [2400/5005]  eta: 0:22:41  lr: 0.0004  img/s: 495.53373554749567  loss: 0.9173 (0.8689)  acc1: 67.5781 (68.6229)  acc5: 86.3281 (86.9381)  meanQV: 1.4730 (1.4801)  stdQV: 0.3270 (0.3247)  time: 0.5204  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [2500/5005]  eta: 0:21:48  lr: 0.0004  img/s: 492.0162505212319  loss: 0.8747 (0.8695)  acc1: 67.9688 (68.6191)  acc5: 87.1094 (86.9432)  meanQV: 1.4758 (1.4800)  stdQV: 0.3262 (0.3247)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [2600/5005]  eta: 0:20:56  lr: 0.0004  img/s: 489.42819036679475  loss: 0.8458 (0.8694)  acc1: 69.9219 (68.6381)  acc5: 86.7188 (86.9568)  meanQV: 1.4895 (1.4802)  stdQV: 0.3216 (0.3246)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [2700/5005]  eta: 0:20:04  lr: 0.0004  img/s: 491.20055774275215  loss: 0.8641 (0.8696)  acc1: 67.1875 (68.6336)  acc5: 86.7188 (86.9582)  meanQV: 1.4703 (1.4801)  stdQV: 0.3277 (0.3246)  time: 0.5221  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [2800/5005]  eta: 0:19:11  lr: 0.0004  img/s: 494.1210418244721  loss: 0.8495 (0.8697)  acc1: 69.5312 (68.6488)  acc5: 87.5000 (86.9604)  meanQV: 1.4867 (1.4802)  stdQV: 0.3228 (0.3246)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [2900/5005]  eta: 0:18:19  lr: 0.0004  img/s: 491.0172647329166  loss: 0.8790 (0.8703)  acc1: 68.3594 (68.6341)  acc5: 86.7188 (86.9494)  meanQV: 1.4785 (1.4801)  stdQV: 0.3251 (0.3246)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [3000/5005]  eta: 0:17:27  lr: 0.0004  img/s: 485.94684164959335  loss: 0.8755 (0.8706)  acc1: 68.3594 (68.6326)  acc5: 87.5000 (86.9472)  meanQV: 1.4785 (1.4801)  stdQV: 0.3192 (0.3246)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3100/5005]  eta: 0:16:34  lr: 0.0004  img/s: 494.1287731247124  loss: 0.9319 (0.8717)  acc1: 66.4062 (68.6098)  acc5: 84.7656 (86.9271)  meanQV: 1.4645 (1.4800)  stdQV: 0.3303 (0.3247)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3200/5005]  eta: 0:15:42  lr: 0.0004  img/s: 489.1026970888204  loss: 0.8573 (0.8715)  acc1: 67.1875 (68.6226)  acc5: 87.1094 (86.9358)  meanQV: 1.4699 (1.4801)  stdQV: 0.3291 (0.3246)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3300/5005]  eta: 0:14:50  lr: 0.0004  img/s: 493.99282848070345  loss: 0.9075 (0.8719)  acc1: 68.3594 (68.6160)  acc5: 85.9375 (86.9377)  meanQV: 1.4770 (1.4800)  stdQV: 0.3257 (0.3247)  time: 0.5221  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3400/5005]  eta: 0:13:58  lr: 0.0004  img/s: 491.0915987137075  loss: 0.8952 (0.8724)  acc1: 67.1875 (68.6177)  acc5: 87.5000 (86.9409)  meanQV: 1.4688 (1.4800)  stdQV: 0.3283 (0.3247)  time: 0.5217  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [3500/5005]  eta: 0:13:05  lr: 0.0004  img/s: 491.85172372724526  loss: 0.8616 (0.8726)  acc1: 67.9688 (68.6169)  acc5: 87.5000 (86.9428)  meanQV: 1.4758 (1.4800)  stdQV: 0.3262 (0.3247)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3600/5005]  eta: 0:12:13  lr: 0.0004  img/s: 493.1658175040636  loss: 0.8484 (0.8728)  acc1: 68.7500 (68.6238)  acc5: 88.2812 (86.9481)  meanQV: 1.4813 (1.4801)  stdQV: 0.3237 (0.3246)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3700/5005]  eta: 0:11:21  lr: 0.0004  img/s: 488.61460107584765  loss: 0.8767 (0.8732)  acc1: 67.9688 (68.6150)  acc5: 86.7188 (86.9436)  meanQV: 1.4758 (1.4800)  stdQV: 0.3240 (0.3247)  time: 0.5216  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [3800/5005]  eta: 0:10:29  lr: 0.0004  img/s: 494.11217386622536  loss: 0.8734 (0.8735)  acc1: 66.7969 (68.6138)  acc5: 86.3281 (86.9486)  meanQV: 1.4676 (1.4800)  stdQV: 0.3251 (0.3247)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [3900/5005]  eta: 0:09:36  lr: 0.0004  img/s: 490.99728148911294  loss: 0.8477 (0.8733)  acc1: 69.1406 (68.6243)  acc5: 87.1094 (86.9573)  meanQV: 1.4840 (1.4801)  stdQV: 0.3240 (0.3246)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4000/5005]  eta: 0:08:44  lr: 0.0004  img/s: 491.4019783456549  loss: 0.8635 (0.8735)  acc1: 68.7500 (68.6289)  acc5: 87.5000 (86.9596)  meanQV: 1.4813 (1.4801)  stdQV: 0.3240 (0.3246)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4100/5005]  eta: 0:07:52  lr: 0.0004  img/s: 494.1733465144578  loss: 0.8801 (0.8738)  acc1: 68.3594 (68.6256)  acc5: 85.9375 (86.9581)  meanQV: 1.4773 (1.4801)  stdQV: 0.3228 (0.3246)  time: 0.5216  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [4200/5005]  eta: 0:07:00  lr: 0.0004  img/s: 489.6234710977453  loss: 0.8273 (0.8740)  acc1: 70.3125 (68.6327)  acc5: 87.8906 (86.9577)  meanQV: 1.4922 (1.4801)  stdQV: 0.3190 (0.3246)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4300/5005]  eta: 0:06:08  lr: 0.0004  img/s: 494.2581946216013  loss: 0.8741 (0.8740)  acc1: 68.7500 (68.6423)  acc5: 87.5000 (86.9612)  meanQV: 1.4813 (1.4802)  stdQV: 0.3251 (0.3246)  time: 0.5204  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4400/5005]  eta: 0:05:15  lr: 0.0004  img/s: 745.4293803117672  loss: 0.8636 (0.8744)  acc1: 68.7500 (68.6341)  acc5: 87.1094 (86.9601)  meanQV: 1.4813 (1.4801)  stdQV: 0.3240 (0.3246)  time: 0.4351  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4500/5005]  eta: 0:04:21  lr: 0.0004  img/s: 486.88907097457  loss: 0.8677 (0.8746)  acc1: 67.9688 (68.6392)  acc5: 86.3281 (86.9591)  meanQV: 1.4758 (1.4802)  stdQV: 0.3262 (0.3246)  time: 0.3115  data: 0.0013  max mem: 8962\n",
            "Epoch: [2]  [4600/5005]  eta: 0:03:29  lr: 0.0004  img/s: 489.810640387527  loss: 0.8474 (0.8748)  acc1: 68.7500 (68.6407)  acc5: 86.7188 (86.9571)  meanQV: 1.4813 (1.4802)  stdQV: 0.3240 (0.3246)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4700/5005]  eta: 0:02:38  lr: 0.0004  img/s: 494.03101273102885  loss: 0.8843 (0.8749)  acc1: 67.1875 (68.6427)  acc5: 85.9375 (86.9571)  meanQV: 1.4691 (1.4802)  stdQV: 0.3270 (0.3246)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [4800/5005]  eta: 0:01:46  lr: 0.0004  img/s: 491.7528352428831  loss: 0.9494 (0.8752)  acc1: 68.3594 (68.6450)  acc5: 85.9375 (86.9551)  meanQV: 1.4785 (1.4802)  stdQV: 0.3251 (0.3246)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [2]  [4900/5005]  eta: 0:00:54  lr: 0.0004  img/s: 489.231282062264  loss: 0.8820 (0.8755)  acc1: 67.1875 (68.6437)  acc5: 85.9375 (86.9490)  meanQV: 1.4691 (1.4802)  stdQV: 0.3290 (0.3246)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [2]  [5000/5005]  eta: 0:00:02  lr: 0.0004  img/s: 489.3046302811125  loss: 0.8896 (0.8759)  acc1: 68.3594 (68.6439)  acc5: 86.7188 (86.9525)  meanQV: 1.4785 (1.4802)  stdQV: 0.3248 (0.3246)  time: 0.5207  data: 0.0002  max mem: 8962\n",
            "Epoch: [2] Total time: 0:43:15\n",
            "Test:   [   0/6250]  eta: 1:13:07  loss: 0.9734 (0.9734)  acc1: 62.5000 (62.5000)  acc5: 100.0000 (100.0000)  time: 0.7020  data: 0.6951  max mem: 8962\n",
            "Test:   [ 100/6250]  eta: 0:01:26  loss: 0.1843 (0.6218)  acc1: 87.5000 (83.2921)  acc5: 100.0000 (95.2970)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [ 200/6250]  eta: 0:01:02  loss: 0.7251 (0.6534)  acc1: 87.5000 (84.0174)  acc5: 87.5000 (94.8383)  time: 0.0060  data: 0.0005  max mem: 8962\n",
            "Test:   [ 300/6250]  eta: 0:00:53  loss: 1.2929 (0.8644)  acc1: 62.5000 (78.9037)  acc5: 87.5000 (93.1894)  time: 0.0062  data: 0.0005  max mem: 8962\n",
            "Test:   [ 400/6250]  eta: 0:00:48  loss: 0.8992 (0.9909)  acc1: 75.0000 (76.0910)  acc5: 87.5000 (92.3005)  time: 0.0060  data: 0.0004  max mem: 8962\n",
            "Test:   [ 500/6250]  eta: 0:00:45  loss: 1.1745 (1.0423)  acc1: 75.0000 (74.8503)  acc5: 87.5000 (91.9661)  time: 0.0065  data: 0.0010  max mem: 8962\n",
            "Test:   [ 600/6250]  eta: 0:00:42  loss: 0.4571 (0.9501)  acc1: 87.5000 (76.8095)  acc5: 100.0000 (92.5957)  time: 0.0061  data: 0.0005  max mem: 8962\n",
            "Test:   [ 700/6250]  eta: 0:00:40  loss: 0.4039 (0.9331)  acc1: 87.5000 (77.1220)  acc5: 100.0000 (92.5820)  time: 0.0057  data: 0.0006  max mem: 8962\n",
            "Test:   [ 800/6250]  eta: 0:00:39  loss: 0.7346 (0.9629)  acc1: 75.0000 (76.5605)  acc5: 87.5000 (92.1660)  time: 0.0058  data: 0.0006  max mem: 8962\n",
            "Test:   [ 900/6250]  eta: 0:00:37  loss: 0.3460 (0.9073)  acc1: 87.5000 (77.8857)  acc5: 100.0000 (92.6609)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [1000/6250]  eta: 0:00:36  loss: 0.8425 (0.8922)  acc1: 75.0000 (78.1094)  acc5: 100.0000 (92.8322)  time: 0.0057  data: 0.0008  max mem: 8962\n",
            "Test:   [1100/6250]  eta: 0:00:35  loss: 0.9796 (0.9278)  acc1: 75.0000 (77.2252)  acc5: 100.0000 (92.6544)  time: 0.0073  data: 0.0016  max mem: 8962\n",
            "Test:   [1200/6250]  eta: 0:00:34  loss: 1.1206 (0.9326)  acc1: 75.0000 (76.8110)  acc5: 87.5000 (92.7560)  time: 0.0060  data: 0.0011  max mem: 8962\n",
            "Test:   [1300/6250]  eta: 0:00:33  loss: 0.4536 (0.9371)  acc1: 87.5000 (76.5661)  acc5: 100.0000 (92.8997)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [1400/6250]  eta: 0:00:32  loss: 0.7222 (0.9336)  acc1: 75.0000 (76.6149)  acc5: 87.5000 (92.9425)  time: 0.0059  data: 0.0006  max mem: 8962\n",
            "Test:   [1500/6250]  eta: 0:00:31  loss: 0.9426 (0.9376)  acc1: 62.5000 (76.3658)  acc5: 100.0000 (93.0213)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [1600/6250]  eta: 0:00:30  loss: 0.1496 (0.9321)  acc1: 100.0000 (76.2336)  acc5: 100.0000 (93.1839)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [1700/6250]  eta: 0:00:29  loss: 1.0775 (0.9295)  acc1: 75.0000 (76.0802)  acc5: 100.0000 (93.3128)  time: 0.0051  data: 0.0006  max mem: 8962\n",
            "Test:   [1800/6250]  eta: 0:00:29  loss: 1.1900 (0.9398)  acc1: 62.5000 (75.8537)  acc5: 87.5000 (93.2954)  time: 0.0047  data: 0.0004  max mem: 8962\n",
            "Test:   [1900/6250]  eta: 0:00:28  loss: 0.9377 (0.9324)  acc1: 75.0000 (76.1376)  acc5: 100.0000 (93.4179)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [2000/6250]  eta: 0:00:27  loss: 0.4859 (0.9373)  acc1: 87.5000 (76.0557)  acc5: 100.0000 (93.4158)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [2100/6250]  eta: 0:00:27  loss: 0.3588 (0.9185)  acc1: 87.5000 (76.5826)  acc5: 100.0000 (93.5745)  time: 0.0059  data: 0.0004  max mem: 8962\n",
            "Test:   [2200/6250]  eta: 0:00:26  loss: 0.1941 (0.9123)  acc1: 87.5000 (76.7208)  acc5: 100.0000 (93.6336)  time: 0.0066  data: 0.0011  max mem: 8962\n",
            "Test:   [2300/6250]  eta: 0:00:25  loss: 0.6498 (0.9137)  acc1: 87.5000 (76.6949)  acc5: 100.0000 (93.5952)  time: 0.0052  data: 0.0008  max mem: 8962\n",
            "Test:   [2400/6250]  eta: 0:00:25  loss: 0.9289 (0.9226)  acc1: 75.0000 (76.5723)  acc5: 87.5000 (93.5079)  time: 0.0067  data: 0.0004  max mem: 8962\n",
            "Test:   [2500/6250]  eta: 0:00:24  loss: 0.9120 (0.9237)  acc1: 87.5000 (76.6593)  acc5: 100.0000 (93.4726)  time: 0.0054  data: 0.0004  max mem: 8962\n",
            "Test:   [2600/6250]  eta: 0:00:23  loss: 2.2991 (0.9477)  acc1: 50.0000 (76.1774)  acc5: 62.5000 (93.1565)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [2700/6250]  eta: 0:00:23  loss: 0.7023 (0.9584)  acc1: 75.0000 (76.0089)  acc5: 100.0000 (93.0442)  time: 0.0061  data: 0.0007  max mem: 8962\n",
            "Test:   [2800/6250]  eta: 0:00:22  loss: 1.6450 (0.9808)  acc1: 62.5000 (75.5400)  acc5: 87.5000 (92.7749)  time: 0.0056  data: 0.0007  max mem: 8962\n",
            "Test:   [2900/6250]  eta: 0:00:21  loss: 1.8880 (1.0003)  acc1: 50.0000 (75.1034)  acc5: 87.5000 (92.5414)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [3000/6250]  eta: 0:00:21  loss: 2.2391 (1.0214)  acc1: 50.0000 (74.7959)  acc5: 75.0000 (92.2193)  time: 0.0051  data: 0.0004  max mem: 8962\n",
            "Test:   [3100/6250]  eta: 0:00:20  loss: 1.8099 (1.0473)  acc1: 50.0000 (74.2785)  acc5: 75.0000 (91.9502)  time: 0.0058  data: 0.0006  max mem: 8962\n",
            "Test:   [3200/6250]  eta: 0:00:19  loss: 0.7831 (1.0671)  acc1: 62.5000 (73.8558)  acc5: 100.0000 (91.7565)  time: 0.0058  data: 0.0009  max mem: 8962\n",
            "Test:   [3300/6250]  eta: 0:00:18  loss: 1.2720 (1.0789)  acc1: 62.5000 (73.5497)  acc5: 87.5000 (91.6540)  time: 0.0060  data: 0.0010  max mem: 8962\n",
            "Test:   [3400/6250]  eta: 0:00:18  loss: 2.3960 (1.0930)  acc1: 37.5000 (73.2946)  acc5: 75.0000 (91.4363)  time: 0.0070  data: 0.0010  max mem: 8962\n",
            "Test:   [3500/6250]  eta: 0:00:17  loss: 1.8152 (1.0998)  acc1: 50.0000 (73.1612)  acc5: 75.0000 (91.3203)  time: 0.0075  data: 0.0021  max mem: 8962\n",
            "Test:   [3600/6250]  eta: 0:00:17  loss: 0.4449 (1.0965)  acc1: 87.5000 (73.3026)  acc5: 100.0000 (91.3219)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [3700/6250]  eta: 0:00:16  loss: 1.6940 (1.1099)  acc1: 62.5000 (73.0276)  acc5: 87.5000 (91.1477)  time: 0.0131  data: 0.0075  max mem: 8962\n",
            "Test:   [3800/6250]  eta: 0:00:15  loss: 0.7985 (1.1155)  acc1: 87.5000 (72.9644)  acc5: 87.5000 (91.0484)  time: 0.0054  data: 0.0006  max mem: 8962\n",
            "Test:   [3900/6250]  eta: 0:00:15  loss: 2.2583 (1.1305)  acc1: 50.0000 (72.6833)  acc5: 75.0000 (90.8293)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [4000/6250]  eta: 0:00:14  loss: 1.4313 (1.1455)  acc1: 62.5000 (72.4256)  acc5: 87.5000 (90.6492)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [4100/6250]  eta: 0:00:13  loss: 1.7358 (1.1560)  acc1: 62.5000 (72.2507)  acc5: 87.5000 (90.5389)  time: 0.0056  data: 0.0004  max mem: 8962\n",
            "Test:   [4200/6250]  eta: 0:00:13  loss: 0.4747 (1.1604)  acc1: 87.5000 (72.1168)  acc5: 100.0000 (90.5380)  time: 0.0064  data: 0.0013  max mem: 8962\n",
            "Test:   [4300/6250]  eta: 0:00:12  loss: 0.5343 (1.1704)  acc1: 75.0000 (71.9513)  acc5: 87.5000 (90.3743)  time: 0.0054  data: 0.0004  max mem: 8962\n",
            "Test:   [4400/6250]  eta: 0:00:11  loss: 0.8444 (1.1773)  acc1: 75.0000 (71.7422)  acc5: 100.0000 (90.3175)  time: 0.0050  data: 0.0003  max mem: 8962\n",
            "Test:   [4500/6250]  eta: 0:00:11  loss: 1.2144 (1.1832)  acc1: 62.5000 (71.6119)  acc5: 87.5000 (90.2744)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [4600/6250]  eta: 0:00:10  loss: 1.7535 (1.1929)  acc1: 50.0000 (71.4600)  acc5: 87.5000 (90.1190)  time: 0.0061  data: 0.0005  max mem: 8962\n",
            "Test:   [4700/6250]  eta: 0:00:09  loss: 1.4817 (1.2036)  acc1: 62.5000 (71.1498)  acc5: 87.5000 (89.9702)  time: 0.0050  data: 0.0006  max mem: 8962\n",
            "Test:   [4800/6250]  eta: 0:00:09  loss: 1.3074 (1.2111)  acc1: 62.5000 (71.0034)  acc5: 87.5000 (89.8563)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [4900/6250]  eta: 0:00:08  loss: 0.4546 (1.2157)  acc1: 75.0000 (70.9090)  acc5: 100.0000 (89.7852)  time: 0.0053  data: 0.0006  max mem: 8962\n",
            "Test:   [5000/6250]  eta: 0:00:07  loss: 2.0130 (1.2274)  acc1: 62.5000 (70.7359)  acc5: 75.0000 (89.6296)  time: 0.0059  data: 0.0004  max mem: 8962\n",
            "Test:   [5100/6250]  eta: 0:00:07  loss: 1.3178 (1.2327)  acc1: 62.5000 (70.6136)  acc5: 87.5000 (89.5903)  time: 0.0061  data: 0.0005  max mem: 8962\n",
            "Test:   [5200/6250]  eta: 0:00:06  loss: 1.0106 (1.2388)  acc1: 75.0000 (70.5177)  acc5: 87.5000 (89.5236)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [5300/6250]  eta: 0:00:05  loss: 1.5488 (1.2526)  acc1: 62.5000 (70.2297)  acc5: 87.5000 (89.3298)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [5400/6250]  eta: 0:00:05  loss: 0.8032 (1.2557)  acc1: 75.0000 (70.1768)  acc5: 87.5000 (89.2728)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [5500/6250]  eta: 0:00:04  loss: 0.8721 (1.2595)  acc1: 75.0000 (70.0827)  acc5: 87.5000 (89.2201)  time: 0.0061  data: 0.0006  max mem: 8962\n",
            "Test:   [5600/6250]  eta: 0:00:04  loss: 1.0362 (1.2646)  acc1: 62.5000 (70.0009)  acc5: 87.5000 (89.1269)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [5700/6250]  eta: 0:00:03  loss: 2.2192 (1.2800)  acc1: 37.5000 (69.7049)  acc5: 75.0000 (88.9756)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [5800/6250]  eta: 0:00:02  loss: 0.5529 (1.2755)  acc1: 75.0000 (69.7897)  acc5: 100.0000 (89.0321)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [5900/6250]  eta: 0:00:02  loss: 1.1504 (1.2730)  acc1: 75.0000 (69.8187)  acc5: 87.5000 (89.0612)  time: 0.0059  data: 0.0006  max mem: 8962\n",
            "Test:   [6000/6250]  eta: 0:00:01  loss: 0.5121 (1.2652)  acc1: 87.5000 (69.9779)  acc5: 87.5000 (89.1518)  time: 0.0060  data: 0.0005  max mem: 8962\n",
            "Test:   [6100/6250]  eta: 0:00:00  loss: 1.3071 (1.2734)  acc1: 62.5000 (69.7959)  acc5: 87.5000 (89.0407)  time: 0.0048  data: 0.0004  max mem: 8962\n",
            "Test:   [6200/6250]  eta: 0:00:00  loss: 0.2227 (1.2671)  acc1: 100.0000 (69.9161)  acc5: 100.0000 (89.1207)  time: 0.0062  data: 0.0005  max mem: 8962\n",
            "Test:  Total time: 0:00:38\n",
            "Test:  Acc@1 69.952 Acc@5 89.136\n",
            "Epoch: [3]  [   0/5005]  eta: 5:49:16  lr: 0.0002  img/s: 494.13332106139956  loss: 0.8680 (0.8680)  acc1: 68.3594 (68.3594)  acc5: 87.8906 (87.8906)  meanQV: 1.4785 (1.4785)  stdQV: 0.3262 (0.3262)  time: 4.1871  data: 3.6690  max mem: 8962\n",
            "Epoch: [3]  [ 100/5005]  eta: 0:45:34  lr: 0.0002  img/s: 493.44095322259034  loss: 0.8700 (0.8771)  acc1: 69.5312 (68.9124)  acc5: 87.1094 (87.1906)  meanQV: 1.4867 (1.4820)  stdQV: 0.3216 (0.3238)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [ 200/5005]  eta: 0:43:11  lr: 0.0002  img/s: 491.6118921765009  loss: 0.8557 (0.8772)  acc1: 69.1406 (69.1056)  acc5: 87.1094 (87.0666)  meanQV: 1.4840 (1.4834)  stdQV: 0.3228 (0.3233)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [ 300/5005]  eta: 0:41:50  lr: 0.0002  img/s: 488.24378408069873  loss: 0.8735 (0.8765)  acc1: 68.3594 (69.1173)  acc5: 87.1094 (87.2859)  meanQV: 1.4773 (1.4834)  stdQV: 0.3259 (0.3233)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [ 400/5005]  eta: 0:40:42  lr: 0.0002  img/s: 491.1491050840666  loss: 0.8561 (0.8749)  acc1: 69.1406 (69.1338)  acc5: 87.1094 (87.3091)  meanQV: 1.4816 (1.4835)  stdQV: 0.3235 (0.3232)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [ 500/5005]  eta: 0:39:40  lr: 0.0002  img/s: 494.98206480200105  loss: 0.8668 (0.8747)  acc1: 68.3594 (69.2046)  acc5: 87.5000 (87.3082)  meanQV: 1.4785 (1.4840)  stdQV: 0.3228 (0.3230)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [ 600/5005]  eta: 0:38:42  lr: 0.0002  img/s: 492.9600064641953  loss: 0.8776 (0.8775)  acc1: 69.1406 (69.1595)  acc5: 87.5000 (87.2979)  meanQV: 1.4840 (1.4837)  stdQV: 0.3226 (0.3231)  time: 0.5206  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [ 700/5005]  eta: 0:37:46  lr: 0.0002  img/s: 488.8984818192125  loss: 0.8980 (0.8788)  acc1: 69.1406 (69.1512)  acc5: 86.3281 (87.2465)  meanQV: 1.4836 (1.4837)  stdQV: 0.3228 (0.3231)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [ 800/5005]  eta: 0:36:50  lr: 0.0002  img/s: 489.088661574488  loss: 0.8472 (0.8815)  acc1: 68.7500 (69.0777)  acc5: 86.7188 (87.1776)  meanQV: 1.4801 (1.4831)  stdQV: 0.3248 (0.3233)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [ 900/5005]  eta: 0:35:56  lr: 0.0002  img/s: 491.4127733969181  loss: 0.8806 (0.8807)  acc1: 68.3594 (69.0921)  acc5: 86.7188 (87.1657)  meanQV: 1.4762 (1.4832)  stdQV: 0.3262 (0.3233)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [1000/5005]  eta: 0:35:01  lr: 0.0002  img/s: 491.22662521193246  loss: 0.9323 (0.8815)  acc1: 67.9688 (69.0762)  acc5: 86.7188 (87.1488)  meanQV: 1.4758 (1.4831)  stdQV: 0.3273 (0.3233)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [1100/5005]  eta: 0:34:08  lr: 0.0002  img/s: 490.98717822090043  loss: 0.8727 (0.8828)  acc1: 69.1406 (69.0541)  acc5: 87.5000 (87.1292)  meanQV: 1.4828 (1.4830)  stdQV: 0.3237 (0.3234)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [1200/5005]  eta: 0:33:14  lr: 0.0002  img/s: 489.31912417248043  loss: 0.8732 (0.8839)  acc1: 68.7500 (69.0385)  acc5: 86.3281 (87.0990)  meanQV: 1.4801 (1.4829)  stdQV: 0.3248 (0.3234)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [1300/5005]  eta: 0:32:21  lr: 0.0002  img/s: 488.60570732215643  loss: 0.8841 (0.8833)  acc1: 69.1406 (69.0139)  acc5: 87.1094 (87.1034)  meanQV: 1.4840 (1.4827)  stdQV: 0.3228 (0.3235)  time: 0.5211  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [1400/5005]  eta: 0:31:27  lr: 0.0002  img/s: 489.7130175490766  loss: 0.8099 (0.8833)  acc1: 69.9219 (69.0252)  acc5: 87.1094 (87.0971)  meanQV: 1.4895 (1.4828)  stdQV: 0.3188 (0.3235)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [1500/5005]  eta: 0:30:35  lr: 0.0002  img/s: 490.8552003847328  loss: 0.8780 (0.8834)  acc1: 69.1406 (69.0147)  acc5: 86.7188 (87.0748)  meanQV: 1.4840 (1.4827)  stdQV: 0.3228 (0.3235)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [1600/5005]  eta: 0:29:42  lr: 0.0002  img/s: 492.7211280428486  loss: 0.9144 (0.8839)  acc1: 69.1406 (69.0086)  acc5: 86.7188 (87.0847)  meanQV: 1.4828 (1.4827)  stdQV: 0.3237 (0.3235)  time: 0.5212  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [1700/5005]  eta: 0:28:49  lr: 0.0002  img/s: 494.0639741221239  loss: 0.8737 (0.8834)  acc1: 69.5312 (69.0187)  acc5: 86.3281 (87.0809)  meanQV: 1.4867 (1.4827)  stdQV: 0.3228 (0.3235)  time: 0.5216  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [1800/5005]  eta: 0:27:56  lr: 0.0002  img/s: 494.14514608859565  loss: 0.9103 (0.8836)  acc1: 67.5781 (69.0094)  acc5: 87.1094 (87.0679)  meanQV: 1.4730 (1.4827)  stdQV: 0.3283 (0.3235)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [1900/5005]  eta: 0:27:04  lr: 0.0002  img/s: 488.1301411462633  loss: 0.8608 (0.8841)  acc1: 69.1406 (68.9943)  acc5: 86.7188 (87.0798)  meanQV: 1.4840 (1.4826)  stdQV: 0.3228 (0.3236)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [2000/5005]  eta: 0:26:11  lr: 0.0002  img/s: 493.9826015587656  loss: 0.9005 (0.8840)  acc1: 69.1406 (69.0001)  acc5: 87.1094 (87.0899)  meanQV: 1.4840 (1.4826)  stdQV: 0.3216 (0.3236)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [2100/5005]  eta: 0:25:18  lr: 0.0002  img/s: 491.0731815518808  loss: 0.8610 (0.8835)  acc1: 70.7031 (69.0287)  acc5: 87.8906 (87.0908)  meanQV: 1.4949 (1.4828)  stdQV: 0.3180 (0.3235)  time: 0.5210  data: 0.0005  max mem: 8962\n",
            "Epoch: [3]  [2200/5005]  eta: 0:24:26  lr: 0.0002  img/s: 486.65824433670525  loss: 0.8879 (0.8840)  acc1: 67.1875 (69.0139)  acc5: 87.1094 (87.0943)  meanQV: 1.4703 (1.4827)  stdQV: 0.3262 (0.3235)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [2300/5005]  eta: 0:23:33  lr: 0.0002  img/s: 489.28055002159914  loss: 0.8677 (0.8844)  acc1: 69.1406 (69.0091)  acc5: 88.6719 (87.0997)  meanQV: 1.4840 (1.4826)  stdQV: 0.3192 (0.3235)  time: 0.5220  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [2400/5005]  eta: 0:22:41  lr: 0.0002  img/s: 489.7322262906224  loss: 0.8478 (0.8846)  acc1: 69.5312 (68.9997)  acc5: 88.2812 (87.0944)  meanQV: 1.4867 (1.4826)  stdQV: 0.3226 (0.3236)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [2500/5005]  eta: 0:21:49  lr: 0.0002  img/s: 494.49583330838766  loss: 0.9224 (0.8849)  acc1: 68.7500 (68.9983)  acc5: 86.3281 (87.0841)  meanQV: 1.4813 (1.4826)  stdQV: 0.3240 (0.3236)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [2600/5005]  eta: 0:20:56  lr: 0.0002  img/s: 491.60829085668  loss: 0.8767 (0.8851)  acc1: 69.9219 (69.0107)  acc5: 87.8906 (87.0868)  meanQV: 1.4883 (1.4826)  stdQV: 0.3214 (0.3235)  time: 0.5205  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [2700/5005]  eta: 0:20:04  lr: 0.0002  img/s: 494.5233905012099  loss: 0.8684 (0.8851)  acc1: 69.5312 (69.0087)  acc5: 87.5000 (87.0942)  meanQV: 1.4855 (1.4826)  stdQV: 0.3216 (0.3235)  time: 0.5203  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [2800/5005]  eta: 0:19:11  lr: 0.0002  img/s: 491.0152438815262  loss: 0.9061 (0.8855)  acc1: 69.1406 (68.9994)  acc5: 86.7188 (87.0876)  meanQV: 1.4840 (1.4826)  stdQV: 0.3228 (0.3236)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [2900/5005]  eta: 0:18:19  lr: 0.0002  img/s: 490.7789190394875  loss: 0.8594 (0.8853)  acc1: 69.1406 (68.9987)  acc5: 87.5000 (87.0913)  meanQV: 1.4820 (1.4826)  stdQV: 0.3215 (0.3236)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [3000/5005]  eta: 0:17:27  lr: 0.0002  img/s: 490.72441483952787  loss: 0.8432 (0.8854)  acc1: 69.5312 (68.9989)  acc5: 87.8906 (87.0884)  meanQV: 1.4867 (1.4826)  stdQV: 0.3202 (0.3236)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3100/5005]  eta: 0:16:34  lr: 0.0002  img/s: 491.1839299405131  loss: 0.8755 (0.8852)  acc1: 70.3125 (69.0101)  acc5: 87.5000 (87.0990)  meanQV: 1.4898 (1.4826)  stdQV: 0.3192 (0.3235)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3200/5005]  eta: 0:15:42  lr: 0.0002  img/s: 491.87718437506726  loss: 0.8693 (0.8855)  acc1: 69.5312 (69.0059)  acc5: 86.3281 (87.0879)  meanQV: 1.4863 (1.4826)  stdQV: 0.3216 (0.3235)  time: 0.5207  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3300/5005]  eta: 0:14:50  lr: 0.0002  img/s: 489.23663194863695  loss: 0.8853 (0.8859)  acc1: 69.9219 (69.0043)  acc5: 85.9375 (87.0807)  meanQV: 1.4871 (1.4826)  stdQV: 0.3202 (0.3235)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3400/5005]  eta: 0:13:58  lr: 0.0002  img/s: 487.7279331806508  loss: 0.8678 (0.8862)  acc1: 68.3594 (68.9936)  acc5: 86.3281 (87.0718)  meanQV: 1.4785 (1.4825)  stdQV: 0.3262 (0.3236)  time: 0.5219  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3500/5005]  eta: 0:13:05  lr: 0.0002  img/s: 492.66031437817423  loss: 0.8921 (0.8862)  acc1: 68.3594 (68.9935)  acc5: 86.3281 (87.0740)  meanQV: 1.4781 (1.4825)  stdQV: 0.3260 (0.3236)  time: 0.5205  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [3600/5005]  eta: 0:12:13  lr: 0.0002  img/s: 491.45280918624405  loss: 0.8688 (0.8865)  acc1: 69.5312 (68.9917)  acc5: 87.1094 (87.0669)  meanQV: 1.4855 (1.4825)  stdQV: 0.3226 (0.3236)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [3700/5005]  eta: 0:11:21  lr: 0.0002  img/s: 491.6204455225456  loss: 0.8652 (0.8867)  acc1: 68.3594 (68.9841)  acc5: 86.3281 (87.0616)  meanQV: 1.4773 (1.4824)  stdQV: 0.3262 (0.3236)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [3800/5005]  eta: 0:10:29  lr: 0.0002  img/s: 487.71309034173106  loss: 0.8378 (0.8872)  acc1: 69.1406 (68.9696)  acc5: 86.7188 (87.0521)  meanQV: 1.4840 (1.4823)  stdQV: 0.3228 (0.3236)  time: 0.5206  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [3900/5005]  eta: 0:09:36  lr: 0.0002  img/s: 493.498784340653  loss: 0.9257 (0.8877)  acc1: 68.3594 (68.9631)  acc5: 87.1094 (87.0480)  meanQV: 1.4785 (1.4823)  stdQV: 0.3240 (0.3237)  time: 0.5218  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4000/5005]  eta: 0:08:44  lr: 0.0002  img/s: 494.29778520681486  loss: 0.8728 (0.8877)  acc1: 68.3594 (68.9672)  acc5: 87.5000 (87.0530)  meanQV: 1.4785 (1.4823)  stdQV: 0.3240 (0.3236)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4100/5005]  eta: 0:07:52  lr: 0.0002  img/s: 491.56395393020676  loss: 0.9223 (0.8879)  acc1: 68.7500 (68.9693)  acc5: 86.7188 (87.0528)  meanQV: 1.4789 (1.4823)  stdQV: 0.3249 (0.3236)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4200/5005]  eta: 0:07:00  lr: 0.0002  img/s: 489.26494371188943  loss: 0.8813 (0.8883)  acc1: 67.5781 (68.9555)  acc5: 86.3281 (87.0487)  meanQV: 1.4730 (1.4822)  stdQV: 0.3273 (0.3237)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4300/5005]  eta: 0:06:07  lr: 0.0002  img/s: 493.6955115781962  loss: 0.8671 (0.8883)  acc1: 70.7031 (68.9589)  acc5: 86.3281 (87.0572)  meanQV: 1.4949 (1.4823)  stdQV: 0.3192 (0.3237)  time: 0.5204  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4400/5005]  eta: 0:05:15  lr: 0.0002  img/s: 493.47927899772964  loss: 0.9207 (0.8885)  acc1: 68.3594 (68.9580)  acc5: 85.9375 (87.0487)  meanQV: 1.4785 (1.4823)  stdQV: 0.3262 (0.3237)  time: 0.5198  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4500/5005]  eta: 0:04:23  lr: 0.0002  img/s: 492.8457412066241  loss: 0.8825 (0.8885)  acc1: 69.5312 (68.9623)  acc5: 87.1094 (87.0524)  meanQV: 1.4867 (1.4823)  stdQV: 0.3228 (0.3237)  time: 0.5207  data: 0.0004  max mem: 8962\n",
            "Epoch: [3]  [4600/5005]  eta: 0:03:31  lr: 0.0002  img/s: 491.5558526149826  loss: 0.8631 (0.8888)  acc1: 68.7500 (68.9587)  acc5: 86.7188 (87.0511)  meanQV: 1.4813 (1.4823)  stdQV: 0.3240 (0.3237)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4700/5005]  eta: 0:02:39  lr: 0.0002  img/s: 491.1044017010751  loss: 0.9060 (0.8890)  acc1: 67.9688 (68.9607)  acc5: 86.7188 (87.0516)  meanQV: 1.4754 (1.4823)  stdQV: 0.3262 (0.3237)  time: 0.5205  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4800/5005]  eta: 0:01:46  lr: 0.0002  img/s: 488.3679195209023  loss: 0.8826 (0.8891)  acc1: 70.3125 (68.9605)  acc5: 87.5000 (87.0509)  meanQV: 1.4922 (1.4823)  stdQV: 0.3204 (0.3237)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [3]  [4900/5005]  eta: 0:00:54  lr: 0.0002  img/s: 657.254661723217  loss: 0.8709 (0.8890)  acc1: 69.1406 (68.9624)  acc5: 87.1094 (87.0525)  meanQV: 1.4840 (1.4823)  stdQV: 0.3208 (0.3237)  time: 0.3795  data: 0.0027  max mem: 8962\n",
            "Epoch: [3]  [5000/5005]  eta: 0:00:02  lr: 0.0002  img/s: 489.617889485732  loss: 0.8860 (0.8894)  acc1: 67.5781 (68.9478)  acc5: 86.3281 (87.0502)  meanQV: 1.4730 (1.4822)  stdQV: 0.3259 (0.3237)  time: 0.5212  data: 0.0002  max mem: 8962\n",
            "Epoch: [3] Total time: 0:43:15\n",
            "Test:   [   0/6250]  eta: 1:13:37  loss: 0.8178 (0.8178)  acc1: 62.5000 (62.5000)  acc5: 100.0000 (100.0000)  time: 0.7068  data: 0.7000  max mem: 8962\n",
            "Test:   [ 100/6250]  eta: 0:01:28  loss: 0.1440 (0.6006)  acc1: 87.5000 (83.4158)  acc5: 100.0000 (95.4208)  time: 0.0070  data: 0.0009  max mem: 8962\n",
            "Test:   [ 200/6250]  eta: 0:01:06  loss: 0.6774 (0.6502)  acc1: 87.5000 (84.2040)  acc5: 100.0000 (94.8383)  time: 0.0073  data: 0.0006  max mem: 8962\n",
            "Test:   [ 300/6250]  eta: 0:00:56  loss: 1.2668 (0.8598)  acc1: 62.5000 (79.2774)  acc5: 87.5000 (93.1478)  time: 0.0066  data: 0.0007  max mem: 8962\n",
            "Test:   [ 400/6250]  eta: 0:00:51  loss: 0.8958 (0.9858)  acc1: 75.0000 (76.1845)  acc5: 100.0000 (92.2693)  time: 0.0062  data: 0.0008  max mem: 8962\n",
            "Test:   [ 500/6250]  eta: 0:00:48  loss: 1.1632 (1.0374)  acc1: 75.0000 (74.9002)  acc5: 87.5000 (91.9411)  time: 0.0061  data: 0.0007  max mem: 8962\n",
            "Test:   [ 600/6250]  eta: 0:00:45  loss: 0.3993 (0.9455)  acc1: 87.5000 (76.9343)  acc5: 100.0000 (92.6165)  time: 0.0064  data: 0.0006  max mem: 8962\n",
            "Test:   [ 700/6250]  eta: 0:00:43  loss: 0.4326 (0.9321)  acc1: 87.5000 (77.1576)  acc5: 100.0000 (92.6712)  time: 0.0067  data: 0.0006  max mem: 8962\n",
            "Test:   [ 800/6250]  eta: 0:00:42  loss: 0.8489 (0.9613)  acc1: 75.0000 (76.5918)  acc5: 87.5000 (92.2441)  time: 0.0066  data: 0.0008  max mem: 8962\n",
            "Test:   [ 900/6250]  eta: 0:00:41  loss: 0.3832 (0.9033)  acc1: 87.5000 (77.9550)  acc5: 100.0000 (92.7303)  time: 0.0068  data: 0.0005  max mem: 8962\n",
            "Test:   [1000/6250]  eta: 0:00:39  loss: 0.9345 (0.8886)  acc1: 75.0000 (78.1094)  acc5: 100.0000 (92.9196)  time: 0.0061  data: 0.0009  max mem: 8962\n",
            "Test:   [1100/6250]  eta: 0:00:38  loss: 1.0317 (0.9263)  acc1: 75.0000 (77.0777)  acc5: 100.0000 (92.7679)  time: 0.0071  data: 0.0008  max mem: 8962\n",
            "Test:   [1200/6250]  eta: 0:00:37  loss: 1.0881 (0.9341)  acc1: 75.0000 (76.5820)  acc5: 87.5000 (92.8393)  time: 0.0069  data: 0.0007  max mem: 8962\n",
            "Test:   [1300/6250]  eta: 0:00:36  loss: 0.4206 (0.9358)  acc1: 75.0000 (76.3259)  acc5: 100.0000 (93.0150)  time: 0.0074  data: 0.0009  max mem: 8962\n",
            "Test:   [1400/6250]  eta: 0:00:35  loss: 0.8187 (0.9322)  acc1: 75.0000 (76.4632)  acc5: 87.5000 (93.0496)  time: 0.0061  data: 0.0009  max mem: 8962\n",
            "Test:   [1500/6250]  eta: 0:00:34  loss: 0.8115 (0.9372)  acc1: 75.0000 (76.2408)  acc5: 100.0000 (93.1379)  time: 0.0061  data: 0.0006  max mem: 8962\n",
            "Test:   [1600/6250]  eta: 0:00:33  loss: 0.1571 (0.9323)  acc1: 100.0000 (76.1165)  acc5: 100.0000 (93.2933)  time: 0.0064  data: 0.0006  max mem: 8962\n",
            "Test:   [1700/6250]  eta: 0:00:32  loss: 0.9674 (0.9303)  acc1: 75.0000 (76.0068)  acc5: 100.0000 (93.3936)  time: 0.0071  data: 0.0007  max mem: 8962\n",
            "Test:   [1800/6250]  eta: 0:00:32  loss: 1.2235 (0.9404)  acc1: 62.5000 (75.7843)  acc5: 87.5000 (93.3717)  time: 0.0083  data: 0.0008  max mem: 8962\n",
            "Test:   [1900/6250]  eta: 0:00:31  loss: 1.0283 (0.9336)  acc1: 62.5000 (76.0652)  acc5: 100.0000 (93.4903)  time: 0.0054  data: 0.0006  max mem: 8962\n",
            "Test:   [2000/6250]  eta: 0:00:30  loss: 0.4590 (0.9386)  acc1: 87.5000 (76.0057)  acc5: 100.0000 (93.4533)  time: 0.0056  data: 0.0009  max mem: 8962\n",
            "Test:   [2100/6250]  eta: 0:00:29  loss: 0.3773 (0.9199)  acc1: 87.5000 (76.5469)  acc5: 100.0000 (93.6042)  time: 0.0062  data: 0.0007  max mem: 8962\n",
            "Test:   [2200/6250]  eta: 0:00:28  loss: 0.2202 (0.9123)  acc1: 87.5000 (76.7208)  acc5: 100.0000 (93.6733)  time: 0.0054  data: 0.0006  max mem: 8962\n",
            "Test:   [2300/6250]  eta: 0:00:27  loss: 0.6553 (0.9135)  acc1: 87.5000 (76.7058)  acc5: 100.0000 (93.6821)  time: 0.0067  data: 0.0020  max mem: 8962\n",
            "Test:   [2400/6250]  eta: 0:00:27  loss: 0.8205 (0.9230)  acc1: 75.0000 (76.5775)  acc5: 87.5000 (93.5964)  time: 0.0078  data: 0.0017  max mem: 8962\n",
            "Test:   [2500/6250]  eta: 0:00:26  loss: 0.7730 (0.9230)  acc1: 87.5000 (76.6693)  acc5: 100.0000 (93.5726)  time: 0.0055  data: 0.0006  max mem: 8962\n",
            "Test:   [2600/6250]  eta: 0:00:25  loss: 2.1682 (0.9463)  acc1: 50.0000 (76.2351)  acc5: 75.0000 (93.2526)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [2700/6250]  eta: 0:00:24  loss: 0.8635 (0.9574)  acc1: 75.0000 (76.0459)  acc5: 87.5000 (93.1137)  time: 0.0055  data: 0.0005  max mem: 8962\n",
            "Test:   [2800/6250]  eta: 0:00:23  loss: 1.4083 (0.9782)  acc1: 62.5000 (75.6025)  acc5: 87.5000 (92.8865)  time: 0.0055  data: 0.0004  max mem: 8962\n",
            "Test:   [2900/6250]  eta: 0:00:22  loss: 1.8681 (0.9967)  acc1: 37.5000 (75.2025)  acc5: 87.5000 (92.6706)  time: 0.0063  data: 0.0009  max mem: 8962\n",
            "Test:   [3000/6250]  eta: 0:00:22  loss: 2.3759 (1.0186)  acc1: 50.0000 (74.8542)  acc5: 75.0000 (92.3484)  time: 0.0055  data: 0.0006  max mem: 8962\n",
            "Test:   [3100/6250]  eta: 0:00:21  loss: 1.6813 (1.0453)  acc1: 50.0000 (74.2986)  acc5: 75.0000 (92.0872)  time: 0.0058  data: 0.0007  max mem: 8962\n",
            "Test:   [3200/6250]  eta: 0:00:20  loss: 0.7106 (1.0641)  acc1: 62.5000 (73.9261)  acc5: 100.0000 (91.8658)  time: 0.0050  data: 0.0004  max mem: 8962\n",
            "Test:   [3300/6250]  eta: 0:00:19  loss: 1.2310 (1.0768)  acc1: 62.5000 (73.5800)  acc5: 87.5000 (91.7487)  time: 0.0060  data: 0.0005  max mem: 8962\n",
            "Test:   [3400/6250]  eta: 0:00:19  loss: 2.4905 (1.0913)  acc1: 50.0000 (73.3203)  acc5: 75.0000 (91.5466)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [3500/6250]  eta: 0:00:18  loss: 1.7458 (1.0984)  acc1: 50.0000 (73.2112)  acc5: 87.5000 (91.4310)  time: 0.0060  data: 0.0007  max mem: 8962\n",
            "Test:   [3600/6250]  eta: 0:00:17  loss: 0.4052 (1.0948)  acc1: 87.5000 (73.3477)  acc5: 100.0000 (91.4295)  time: 0.0060  data: 0.0008  max mem: 8962\n",
            "Test:   [3700/6250]  eta: 0:00:16  loss: 1.7100 (1.1095)  acc1: 62.5000 (73.0444)  acc5: 87.5000 (91.2456)  time: 0.0104  data: 0.0052  max mem: 8962\n",
            "Test:   [3800/6250]  eta: 0:00:16  loss: 0.7023 (1.1154)  acc1: 87.5000 (72.9742)  acc5: 87.5000 (91.1471)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [3900/6250]  eta: 0:00:15  loss: 2.4000 (1.1317)  acc1: 37.5000 (72.6609)  acc5: 75.0000 (90.9382)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [4000/6250]  eta: 0:00:14  loss: 1.5344 (1.1465)  acc1: 62.5000 (72.3882)  acc5: 87.5000 (90.7523)  time: 0.0056  data: 0.0006  max mem: 8962\n",
            "Test:   [4100/6250]  eta: 0:00:14  loss: 1.4738 (1.1567)  acc1: 62.5000 (72.2171)  acc5: 87.5000 (90.6364)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [4200/6250]  eta: 0:00:13  loss: 0.3974 (1.1608)  acc1: 87.5000 (72.0930)  acc5: 100.0000 (90.6362)  time: 0.0068  data: 0.0005  max mem: 8962\n",
            "Test:   [4300/6250]  eta: 0:00:12  loss: 0.4784 (1.1701)  acc1: 75.0000 (71.9542)  acc5: 100.0000 (90.4935)  time: 0.0052  data: 0.0006  max mem: 8962\n",
            "Test:   [4400/6250]  eta: 0:00:12  loss: 0.9728 (1.1769)  acc1: 75.0000 (71.7763)  acc5: 100.0000 (90.4368)  time: 0.0052  data: 0.0005  max mem: 8962\n",
            "Test:   [4500/6250]  eta: 0:00:11  loss: 1.1849 (1.1823)  acc1: 75.0000 (71.6785)  acc5: 87.5000 (90.3855)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [4600/6250]  eta: 0:00:10  loss: 1.6483 (1.1923)  acc1: 50.0000 (71.5116)  acc5: 87.5000 (90.2413)  time: 0.0056  data: 0.0007  max mem: 8962\n",
            "Test:   [4700/6250]  eta: 0:00:10  loss: 1.3664 (1.2023)  acc1: 62.5000 (71.2189)  acc5: 87.5000 (90.1032)  time: 0.0055  data: 0.0007  max mem: 8962\n",
            "Test:   [4800/6250]  eta: 0:00:09  loss: 1.3209 (1.2095)  acc1: 62.5000 (71.0841)  acc5: 87.5000 (89.9969)  time: 0.0051  data: 0.0008  max mem: 8962\n",
            "Test:   [4900/6250]  eta: 0:00:08  loss: 0.4727 (1.2146)  acc1: 87.5000 (71.0161)  acc5: 100.0000 (89.9077)  time: 0.0049  data: 0.0004  max mem: 8962\n",
            "Test:   [5000/6250]  eta: 0:00:08  loss: 2.0785 (1.2263)  acc1: 62.5000 (70.8483)  acc5: 75.0000 (89.7520)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [5100/6250]  eta: 0:00:07  loss: 1.2702 (1.2315)  acc1: 62.5000 (70.7410)  acc5: 87.5000 (89.7153)  time: 0.0059  data: 0.0007  max mem: 8962\n",
            "Test:   [5200/6250]  eta: 0:00:06  loss: 1.0106 (1.2380)  acc1: 75.0000 (70.6138)  acc5: 87.5000 (89.6510)  time: 0.0047  data: 0.0004  max mem: 8962\n",
            "Test:   [5300/6250]  eta: 0:00:06  loss: 1.4912 (1.2517)  acc1: 50.0000 (70.3122)  acc5: 87.5000 (89.4619)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [5400/6250]  eta: 0:00:05  loss: 0.9010 (1.2548)  acc1: 75.0000 (70.2671)  acc5: 100.0000 (89.4071)  time: 0.0057  data: 0.0006  max mem: 8962\n",
            "Test:   [5500/6250]  eta: 0:00:04  loss: 0.9291 (1.2585)  acc1: 75.0000 (70.1622)  acc5: 87.5000 (89.3656)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [5600/6250]  eta: 0:00:04  loss: 0.9468 (1.2638)  acc1: 62.5000 (70.0857)  acc5: 87.5000 (89.2586)  time: 0.0060  data: 0.0016  max mem: 8962\n",
            "Test:   [5700/6250]  eta: 0:00:03  loss: 2.1460 (1.2784)  acc1: 37.5000 (69.7926)  acc5: 75.0000 (89.1203)  time: 0.0050  data: 0.0006  max mem: 8962\n",
            "Test:   [5800/6250]  eta: 0:00:02  loss: 0.6562 (1.2747)  acc1: 75.0000 (69.8522)  acc5: 100.0000 (89.1657)  time: 0.0053  data: 0.0008  max mem: 8962\n",
            "Test:   [5900/6250]  eta: 0:00:02  loss: 1.0713 (1.2722)  acc1: 75.0000 (69.8759)  acc5: 100.0000 (89.2095)  time: 0.0053  data: 0.0007  max mem: 8962\n",
            "Test:   [6000/6250]  eta: 0:00:01  loss: 0.5802 (1.2647)  acc1: 87.5000 (70.0342)  acc5: 87.5000 (89.2955)  time: 0.0057  data: 0.0006  max mem: 8962\n",
            "Test:   [6100/6250]  eta: 0:00:00  loss: 1.2877 (1.2731)  acc1: 62.5000 (69.8328)  acc5: 87.5000 (89.2046)  time: 0.0052  data: 0.0008  max mem: 8962\n",
            "Test:   [6200/6250]  eta: 0:00:00  loss: 0.2487 (1.2671)  acc1: 87.5000 (69.9544)  acc5: 100.0000 (89.2739)  time: 0.0061  data: 0.0008  max mem: 8962\n",
            "Test:  Total time: 0:00:39\n",
            "Test:  Acc@1 69.994 Acc@5 89.292\n",
            "Epoch: [4]  [   0/5005]  eta: 6:27:39  lr: 0.0002  img/s: 465.53450010860746  loss: 0.8434 (0.8434)  acc1: 71.0938 (71.0938)  acc5: 87.5000 (87.5000)  meanQV: 1.4977 (1.4977)  stdQV: 0.3180 (0.3180)  time: 4.6472  data: 4.0972  max mem: 8962\n",
            "Epoch: [4]  [ 100/5005]  eta: 0:45:55  lr: 0.0002  img/s: 490.74347871791  loss: 0.9550 (0.8984)  acc1: 67.1875 (69.1097)  acc5: 86.7188 (87.1519)  meanQV: 1.4691 (1.4833)  stdQV: 0.3260 (0.3231)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [ 200/5005]  eta: 0:43:22  lr: 0.0002  img/s: 493.9701025625455  loss: 0.8835 (0.9029)  acc1: 68.7500 (68.8783)  acc5: 87.5000 (87.0375)  meanQV: 1.4809 (1.4816)  stdQV: 0.3240 (0.3238)  time: 0.5217  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 300/5005]  eta: 0:41:56  lr: 0.0002  img/s: 491.63170037870236  loss: 0.9149 (0.9015)  acc1: 67.9688 (68.7227)  acc5: 87.8906 (87.0367)  meanQV: 1.4758 (1.4805)  stdQV: 0.3260 (0.3243)  time: 0.5222  data: 0.0005  max mem: 8962\n",
            "Epoch: [4]  [ 400/5005]  eta: 0:40:46  lr: 0.0002  img/s: 489.97201559708594  loss: 0.8910 (0.8983)  acc1: 68.7500 (68.8055)  acc5: 86.3281 (87.0305)  meanQV: 1.4797 (1.4812)  stdQV: 0.3246 (0.3240)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 500/5005]  eta: 0:39:44  lr: 0.0002  img/s: 494.2242973791529  loss: 0.8698 (0.8962)  acc1: 69.9219 (68.8599)  acc5: 86.7188 (87.0556)  meanQV: 1.4895 (1.4815)  stdQV: 0.3214 (0.3239)  time: 0.5205  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 600/5005]  eta: 0:38:45  lr: 0.0002  img/s: 491.0853097714258  loss: 0.8708 (0.8966)  acc1: 70.3125 (68.8962)  acc5: 87.1094 (87.0457)  meanQV: 1.4922 (1.4818)  stdQV: 0.3188 (0.3238)  time: 0.5203  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 700/5005]  eta: 0:37:48  lr: 0.0002  img/s: 493.5375728016555  loss: 0.9078 (0.8985)  acc1: 68.7500 (68.8353)  acc5: 87.1094 (87.0018)  meanQV: 1.4813 (1.4814)  stdQV: 0.3248 (0.3240)  time: 0.5213  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 800/5005]  eta: 0:36:52  lr: 0.0002  img/s: 490.2532232540004  loss: 0.9188 (0.8979)  acc1: 67.9688 (68.8904)  acc5: 86.3281 (86.9953)  meanQV: 1.4746 (1.4818)  stdQV: 0.3270 (0.3238)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [ 900/5005]  eta: 0:35:57  lr: 0.0002  img/s: 493.18552460181996  loss: 0.9238 (0.8994)  acc1: 67.9688 (68.8575)  acc5: 86.3281 (86.9680)  meanQV: 1.4758 (1.4815)  stdQV: 0.3262 (0.3239)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1000/5005]  eta: 0:35:03  lr: 0.0002  img/s: 490.8677666455156  loss: 0.8737 (0.8983)  acc1: 69.9219 (68.8835)  acc5: 87.1094 (86.9892)  meanQV: 1.4895 (1.4817)  stdQV: 0.3192 (0.3238)  time: 0.5206  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1100/5005]  eta: 0:34:09  lr: 0.0002  img/s: 494.22497982810273  loss: 0.8912 (0.8984)  acc1: 69.1406 (68.9065)  acc5: 86.7188 (87.0005)  meanQV: 1.4840 (1.4819)  stdQV: 0.3204 (0.3237)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1200/5005]  eta: 0:33:16  lr: 0.0002  img/s: 491.8136503316876  loss: 0.9000 (0.8996)  acc1: 68.7500 (68.8476)  acc5: 87.5000 (86.9653)  meanQV: 1.4801 (1.4814)  stdQV: 0.3248 (0.3239)  time: 0.5211  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [1300/5005]  eta: 0:32:22  lr: 0.0002  img/s: 494.33123736827326  loss: 0.8564 (0.8992)  acc1: 70.3125 (68.8515)  acc5: 87.5000 (86.9686)  meanQV: 1.4918 (1.4815)  stdQV: 0.3192 (0.3239)  time: 0.5202  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [1400/5005]  eta: 0:31:29  lr: 0.0002  img/s: 493.6809842522038  loss: 0.8581 (0.8993)  acc1: 69.5312 (68.8392)  acc5: 87.5000 (86.9747)  meanQV: 1.4867 (1.4814)  stdQV: 0.3216 (0.3239)  time: 0.5203  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1500/5005]  eta: 0:30:36  lr: 0.0002  img/s: 492.017828708216  loss: 0.8798 (0.8990)  acc1: 68.7500 (68.8564)  acc5: 86.7188 (86.9821)  meanQV: 1.4801 (1.4815)  stdQV: 0.3216 (0.3239)  time: 0.5223  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1600/5005]  eta: 0:29:43  lr: 0.0002  img/s: 494.6657802925495  loss: 0.8522 (0.8990)  acc1: 69.9219 (68.8637)  acc5: 87.1094 (86.9842)  meanQV: 1.4887 (1.4816)  stdQV: 0.3213 (0.3239)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [1700/5005]  eta: 0:28:50  lr: 0.0002  img/s: 499.96709108899364  loss: 0.8898 (0.8983)  acc1: 69.5312 (68.8800)  acc5: 86.7188 (86.9978)  meanQV: 1.4867 (1.4817)  stdQV: 0.3215 (0.3238)  time: 0.5219  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [1800/5005]  eta: 0:27:57  lr: 0.0002  img/s: 491.00491534530653  loss: 0.9142 (0.8985)  acc1: 68.3594 (68.8823)  acc5: 86.7188 (86.9988)  meanQV: 1.4781 (1.4817)  stdQV: 0.3251 (0.3238)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [1900/5005]  eta: 0:27:05  lr: 0.0002  img/s: 489.01270554630025  loss: 0.8833 (0.8986)  acc1: 68.7500 (68.8708)  acc5: 87.1094 (86.9945)  meanQV: 1.4801 (1.4816)  stdQV: 0.3248 (0.3238)  time: 0.5220  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2000/5005]  eta: 0:26:12  lr: 0.0002  img/s: 485.6457289761854  loss: 0.8689 (0.8982)  acc1: 69.1406 (68.8986)  acc5: 87.5000 (87.0073)  meanQV: 1.4824 (1.4818)  stdQV: 0.3235 (0.3238)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [2100/5005]  eta: 0:25:19  lr: 0.0002  img/s: 490.798211492559  loss: 0.8893 (0.8982)  acc1: 68.7500 (68.8917)  acc5: 87.5000 (87.0095)  meanQV: 1.4813 (1.4817)  stdQV: 0.3251 (0.3238)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2200/5005]  eta: 0:24:27  lr: 0.0002  img/s: 493.2516794802064  loss: 0.8902 (0.8984)  acc1: 68.3594 (68.8870)  acc5: 87.1094 (87.0112)  meanQV: 1.4785 (1.4817)  stdQV: 0.3248 (0.3238)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2300/5005]  eta: 0:23:34  lr: 0.0002  img/s: 487.6654664365519  loss: 0.8884 (0.8983)  acc1: 68.7500 (68.8970)  acc5: 86.3281 (87.0163)  meanQV: 1.4813 (1.4818)  stdQV: 0.3240 (0.3238)  time: 0.5224  data: 0.0002  max mem: 8962\n",
            "Epoch: [4]  [2400/5005]  eta: 0:22:42  lr: 0.0002  img/s: 487.97818203963027  loss: 0.9129 (0.8987)  acc1: 68.3594 (68.9003)  acc5: 87.5000 (87.0210)  meanQV: 1.4785 (1.4818)  stdQV: 0.3251 (0.3238)  time: 0.5218  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2500/5005]  eta: 0:21:49  lr: 0.0002  img/s: 493.4107957036287  loss: 0.8948 (0.8988)  acc1: 68.7500 (68.9018)  acc5: 86.3281 (87.0080)  meanQV: 1.4809 (1.4818)  stdQV: 0.3240 (0.3238)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2600/5005]  eta: 0:20:57  lr: 0.0002  img/s: 491.60288897587867  loss: 0.8879 (0.8991)  acc1: 68.7500 (68.9072)  acc5: 86.3281 (87.0161)  meanQV: 1.4813 (1.4818)  stdQV: 0.3226 (0.3237)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [2700/5005]  eta: 0:20:04  lr: 0.0002  img/s: 491.1488804236057  loss: 0.8520 (0.8993)  acc1: 69.9219 (68.9277)  acc5: 87.8906 (87.0213)  meanQV: 1.4895 (1.4820)  stdQV: 0.3204 (0.3237)  time: 0.5217  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [2800/5005]  eta: 0:19:12  lr: 0.0002  img/s: 493.3804151641137  loss: 0.8855 (0.8992)  acc1: 69.1406 (68.9271)  acc5: 87.1094 (87.0320)  meanQV: 1.4828 (1.4820)  stdQV: 0.3228 (0.3237)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [2900/5005]  eta: 0:18:20  lr: 0.0002  img/s: 494.2067818344083  loss: 0.9216 (0.8993)  acc1: 68.7500 (68.9377)  acc5: 86.3281 (87.0301)  meanQV: 1.4813 (1.4821)  stdQV: 0.3251 (0.3237)  time: 0.5215  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [3000/5005]  eta: 0:17:27  lr: 0.0002  img/s: 491.1448365704542  loss: 0.9209 (0.8991)  acc1: 68.3594 (68.9410)  acc5: 86.7188 (87.0258)  meanQV: 1.4785 (1.4821)  stdQV: 0.3249 (0.3237)  time: 0.5223  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3100/5005]  eta: 0:16:35  lr: 0.0002  img/s: 492.0568356895722  loss: 0.8835 (0.8994)  acc1: 68.7500 (68.9353)  acc5: 87.1094 (87.0167)  meanQV: 1.4813 (1.4820)  stdQV: 0.3226 (0.3237)  time: 0.5203  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3200/5005]  eta: 0:15:43  lr: 0.0002  img/s: 491.44133759107467  loss: 0.8832 (0.8996)  acc1: 69.9219 (68.9327)  acc5: 87.1094 (87.0172)  meanQV: 1.4883 (1.4820)  stdQV: 0.3214 (0.3237)  time: 0.5212  data: 0.0005  max mem: 8962\n",
            "Epoch: [4]  [3300/5005]  eta: 0:14:50  lr: 0.0002  img/s: 487.73613035951706  loss: 0.8594 (0.8997)  acc1: 69.1406 (68.9283)  acc5: 87.8906 (87.0199)  meanQV: 1.4840 (1.4820)  stdQV: 0.3228 (0.3237)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3400/5005]  eta: 0:13:58  lr: 0.0002  img/s: 491.204377802288  loss: 0.9090 (0.8999)  acc1: 68.7500 (68.9294)  acc5: 86.3281 (87.0150)  meanQV: 1.4789 (1.4820)  stdQV: 0.3246 (0.3237)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3500/5005]  eta: 0:13:06  lr: 0.0002  img/s: 495.01811999100084  loss: 0.9384 (0.9003)  acc1: 68.3594 (68.9144)  acc5: 86.3281 (87.0097)  meanQV: 1.4785 (1.4819)  stdQV: 0.3262 (0.3237)  time: 0.5219  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [3600/5005]  eta: 0:12:13  lr: 0.0002  img/s: 488.85240665181243  loss: 0.8764 (0.9000)  acc1: 69.9219 (68.9205)  acc5: 87.8906 (87.0174)  meanQV: 1.4895 (1.4819)  stdQV: 0.3204 (0.3237)  time: 0.5217  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3700/5005]  eta: 0:11:21  lr: 0.0002  img/s: 488.62905411616515  loss: 0.8644 (0.8999)  acc1: 69.9219 (68.9198)  acc5: 86.7188 (87.0206)  meanQV: 1.4895 (1.4819)  stdQV: 0.3204 (0.3237)  time: 0.5218  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [3800/5005]  eta: 0:10:29  lr: 0.0002  img/s: 488.65351505542134  loss: 0.8901 (0.8997)  acc1: 68.7500 (68.9341)  acc5: 87.5000 (87.0288)  meanQV: 1.4789 (1.4820)  stdQV: 0.3248 (0.3237)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [3900/5005]  eta: 0:09:37  lr: 0.0002  img/s: 493.65601740808734  loss: 0.8595 (0.8997)  acc1: 68.3594 (68.9418)  acc5: 87.1094 (87.0309)  meanQV: 1.4785 (1.4821)  stdQV: 0.3262 (0.3237)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [4000/5005]  eta: 0:08:44  lr: 0.0002  img/s: 492.87718715199964  loss: 0.8968 (0.8997)  acc1: 69.9219 (68.9440)  acc5: 87.5000 (87.0334)  meanQV: 1.4895 (1.4821)  stdQV: 0.3204 (0.3237)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [4100/5005]  eta: 0:07:52  lr: 0.0002  img/s: 488.15255480193474  loss: 0.8810 (0.8995)  acc1: 68.3594 (68.9461)  acc5: 87.5000 (87.0394)  meanQV: 1.4785 (1.4821)  stdQV: 0.3251 (0.3237)  time: 0.5210  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [4200/5005]  eta: 0:07:00  lr: 0.0002  img/s: 490.5603024844127  loss: 0.9360 (0.8999)  acc1: 68.7500 (68.9386)  acc5: 85.9375 (87.0355)  meanQV: 1.4813 (1.4820)  stdQV: 0.3240 (0.3237)  time: 0.5213  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [4300/5005]  eta: 0:06:08  lr: 0.0002  img/s: 493.6328685908266  loss: 0.8927 (0.9000)  acc1: 67.9688 (68.9293)  acc5: 87.1094 (87.0393)  meanQV: 1.4758 (1.4820)  stdQV: 0.3273 (0.3237)  time: 0.5209  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [4400/5005]  eta: 0:05:15  lr: 0.0002  img/s: 500.0339136176978  loss: 0.8938 (0.9000)  acc1: 67.9688 (68.9281)  acc5: 87.5000 (87.0415)  meanQV: 1.4746 (1.4820)  stdQV: 0.3237 (0.3237)  time: 0.5203  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [4500/5005]  eta: 0:04:23  lr: 0.0002  img/s: 491.36240054840806  loss: 0.8792 (0.9000)  acc1: 69.5312 (68.9270)  acc5: 87.1094 (87.0380)  meanQV: 1.4832 (1.4820)  stdQV: 0.3213 (0.3237)  time: 0.5218  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [4600/5005]  eta: 0:03:31  lr: 0.0002  img/s: 494.30324647494075  loss: 0.9115 (0.9000)  acc1: 69.1406 (68.9302)  acc5: 86.7188 (87.0371)  meanQV: 1.4828 (1.4820)  stdQV: 0.3238 (0.3237)  time: 0.5208  data: 0.0003  max mem: 8962\n",
            "Epoch: [4]  [4700/5005]  eta: 0:02:39  lr: 0.0002  img/s: 494.0173748211402  loss: 0.8860 (0.9000)  acc1: 69.9219 (68.9322)  acc5: 87.1094 (87.0404)  meanQV: 1.4895 (1.4820)  stdQV: 0.3202 (0.3237)  time: 0.5212  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [4800/5005]  eta: 0:01:47  lr: 0.0002  img/s: 493.9932830203957  loss: 0.9224 (0.9002)  acc1: 68.7500 (68.9312)  acc5: 87.1094 (87.0430)  meanQV: 1.4801 (1.4820)  stdQV: 0.3248 (0.3237)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [4900/5005]  eta: 0:00:54  lr: 0.0002  img/s: 494.8479308631688  loss: 0.8930 (0.9002)  acc1: 67.9688 (68.9332)  acc5: 86.7188 (87.0443)  meanQV: 1.4758 (1.4820)  stdQV: 0.3262 (0.3237)  time: 0.5202  data: 0.0004  max mem: 8962\n",
            "Epoch: [4]  [5000/5005]  eta: 0:00:02  lr: 0.0002  img/s: 492.44182560982995  loss: 0.8594 (0.8999)  acc1: 70.3125 (68.9486)  acc5: 87.5000 (87.0523)  meanQV: 1.4922 (1.4821)  stdQV: 0.3192 (0.3236)  time: 0.5203  data: 0.0002  max mem: 8962\n",
            "Epoch: [4] Total time: 0:43:33\n",
            "Test:   [   0/6250]  eta: 1:16:02  loss: 0.7909 (0.7909)  acc1: 75.0000 (75.0000)  acc5: 100.0000 (100.0000)  time: 0.7299  data: 0.7206  max mem: 8962\n",
            "Test:   [ 100/6250]  eta: 0:01:29  loss: 0.1878 (0.6247)  acc1: 87.5000 (83.4158)  acc5: 100.0000 (95.2970)  time: 0.0065  data: 0.0006  max mem: 8962\n",
            "Test:   [ 200/6250]  eta: 0:01:04  loss: 0.6666 (0.6644)  acc1: 87.5000 (84.3284)  acc5: 100.0000 (94.5274)  time: 0.0077  data: 0.0020  max mem: 8962\n",
            "Test:   [ 300/6250]  eta: 0:00:54  loss: 1.2709 (0.8699)  acc1: 62.5000 (78.9037)  acc5: 87.5000 (93.0648)  time: 0.0064  data: 0.0008  max mem: 8962\n",
            "Test:   [ 400/6250]  eta: 0:00:49  loss: 0.8989 (0.9948)  acc1: 75.0000 (76.1222)  acc5: 100.0000 (92.1135)  time: 0.0065  data: 0.0005  max mem: 8962\n",
            "Test:   [ 500/6250]  eta: 0:00:45  loss: 1.1087 (1.0409)  acc1: 75.0000 (74.9251)  acc5: 87.5000 (91.7914)  time: 0.0068  data: 0.0025  max mem: 8962\n",
            "Test:   [ 600/6250]  eta: 0:00:43  loss: 0.4547 (0.9505)  acc1: 87.5000 (76.8927)  acc5: 100.0000 (92.4293)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [ 700/6250]  eta: 0:00:40  loss: 0.3772 (0.9356)  acc1: 87.5000 (77.1755)  acc5: 100.0000 (92.4215)  time: 0.0055  data: 0.0004  max mem: 8962\n",
            "Test:   [ 800/6250]  eta: 0:00:40  loss: 0.8068 (0.9664)  acc1: 75.0000 (76.5762)  acc5: 87.5000 (92.0568)  time: 0.0060  data: 0.0004  max mem: 8962\n",
            "Test:   [ 900/6250]  eta: 0:00:38  loss: 0.3764 (0.9114)  acc1: 87.5000 (77.8996)  acc5: 100.0000 (92.5361)  time: 0.0062  data: 0.0004  max mem: 8962\n",
            "Test:   [1000/6250]  eta: 0:00:37  loss: 0.9310 (0.8980)  acc1: 75.0000 (78.1094)  acc5: 100.0000 (92.7572)  time: 0.0063  data: 0.0006  max mem: 8962\n",
            "Test:   [1100/6250]  eta: 0:00:37  loss: 1.1327 (0.9363)  acc1: 75.0000 (77.1571)  acc5: 100.0000 (92.5636)  time: 0.0073  data: 0.0006  max mem: 8962\n",
            "Test:   [1200/6250]  eta: 0:00:36  loss: 1.0381 (0.9410)  acc1: 75.0000 (76.7902)  acc5: 87.5000 (92.6728)  time: 0.0076  data: 0.0006  max mem: 8962\n",
            "Test:   [1300/6250]  eta: 0:00:35  loss: 0.4042 (0.9409)  acc1: 87.5000 (76.5853)  acc5: 100.0000 (92.8997)  time: 0.0066  data: 0.0007  max mem: 8962\n",
            "Test:   [1400/6250]  eta: 0:00:34  loss: 0.7884 (0.9356)  acc1: 75.0000 (76.6774)  acc5: 87.5000 (92.9961)  time: 0.0063  data: 0.0005  max mem: 8962\n",
            "Test:   [1500/6250]  eta: 0:00:33  loss: 0.9547 (0.9392)  acc1: 75.0000 (76.4074)  acc5: 100.0000 (93.1046)  time: 0.0058  data: 0.0005  max mem: 8962\n",
            "Test:   [1600/6250]  eta: 0:00:32  loss: 0.1298 (0.9348)  acc1: 87.5000 (76.2492)  acc5: 100.0000 (93.2464)  time: 0.0063  data: 0.0006  max mem: 8962\n",
            "Test:   [1700/6250]  eta: 0:00:32  loss: 1.0550 (0.9324)  acc1: 75.0000 (76.1023)  acc5: 100.0000 (93.3715)  time: 0.0092  data: 0.0041  max mem: 8962\n",
            "Test:   [1800/6250]  eta: 0:00:31  loss: 1.2747 (0.9422)  acc1: 62.5000 (75.8537)  acc5: 87.5000 (93.3648)  time: 0.0064  data: 0.0004  max mem: 8962\n",
            "Test:   [1900/6250]  eta: 0:00:30  loss: 0.9273 (0.9352)  acc1: 75.0000 (76.1244)  acc5: 100.0000 (93.4705)  time: 0.0065  data: 0.0005  max mem: 8962\n",
            "Test:   [2000/6250]  eta: 0:00:30  loss: 0.4722 (0.9411)  acc1: 87.5000 (76.0120)  acc5: 100.0000 (93.4658)  time: 0.0064  data: 0.0006  max mem: 8962\n",
            "Test:   [2100/6250]  eta: 0:00:29  loss: 0.3972 (0.9220)  acc1: 87.5000 (76.5469)  acc5: 100.0000 (93.6161)  time: 0.0064  data: 0.0005  max mem: 8962\n",
            "Test:   [2200/6250]  eta: 0:00:28  loss: 0.1838 (0.9145)  acc1: 87.5000 (76.6924)  acc5: 100.0000 (93.6733)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [2300/6250]  eta: 0:00:27  loss: 0.7064 (0.9173)  acc1: 87.5000 (76.6515)  acc5: 100.0000 (93.6441)  time: 0.0061  data: 0.0019  max mem: 8962\n",
            "Test:   [2400/6250]  eta: 0:00:26  loss: 0.9312 (0.9272)  acc1: 75.0000 (76.5618)  acc5: 87.5000 (93.5392)  time: 0.0057  data: 0.0006  max mem: 8962\n",
            "Test:   [2500/6250]  eta: 0:00:26  loss: 0.9157 (0.9291)  acc1: 75.0000 (76.6144)  acc5: 100.0000 (93.4976)  time: 0.0060  data: 0.0006  max mem: 8962\n",
            "Test:   [2600/6250]  eta: 0:00:25  loss: 2.2484 (0.9531)  acc1: 50.0000 (76.1246)  acc5: 62.5000 (93.1949)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [2700/6250]  eta: 0:00:24  loss: 0.8119 (0.9641)  acc1: 75.0000 (75.9210)  acc5: 87.5000 (93.0766)  time: 0.0057  data: 0.0004  max mem: 8962\n",
            "Test:   [2800/6250]  eta: 0:00:23  loss: 1.5186 (0.9860)  acc1: 62.5000 (75.4418)  acc5: 75.0000 (92.8240)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [2900/6250]  eta: 0:00:23  loss: 1.7899 (1.0040)  acc1: 37.5000 (75.0603)  acc5: 87.5000 (92.6060)  time: 0.0078  data: 0.0007  max mem: 8962\n",
            "Test:   [3000/6250]  eta: 0:00:22  loss: 2.3188 (1.0252)  acc1: 50.0000 (74.7418)  acc5: 75.0000 (92.2817)  time: 0.0062  data: 0.0006  max mem: 8962\n",
            "Test:   [3100/6250]  eta: 0:00:21  loss: 1.8096 (1.0517)  acc1: 50.0000 (74.2341)  acc5: 75.0000 (92.0106)  time: 0.0056  data: 0.0004  max mem: 8962\n",
            "Test:   [3200/6250]  eta: 0:00:20  loss: 0.6736 (1.0715)  acc1: 75.0000 (73.8402)  acc5: 100.0000 (91.8072)  time: 0.0057  data: 0.0004  max mem: 8962\n",
            "Test:   [3300/6250]  eta: 0:00:19  loss: 1.2702 (1.0843)  acc1: 62.5000 (73.4853)  acc5: 87.5000 (91.6919)  time: 0.0060  data: 0.0009  max mem: 8962\n",
            "Test:   [3400/6250]  eta: 0:00:19  loss: 2.4354 (1.0978)  acc1: 37.5000 (73.2468)  acc5: 75.0000 (91.5062)  time: 0.0059  data: 0.0005  max mem: 8962\n",
            "Test:   [3500/6250]  eta: 0:00:18  loss: 1.7555 (1.1037)  acc1: 50.0000 (73.1720)  acc5: 75.0000 (91.3846)  time: 0.0058  data: 0.0006  max mem: 8962\n",
            "Test:   [3600/6250]  eta: 0:00:17  loss: 0.5104 (1.0999)  acc1: 87.5000 (73.3164)  acc5: 100.0000 (91.3948)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [3700/6250]  eta: 0:00:17  loss: 1.7609 (1.1145)  acc1: 62.5000 (73.0276)  acc5: 87.5000 (91.2017)  time: 0.0116  data: 0.0071  max mem: 8962\n",
            "Test:   [3800/6250]  eta: 0:00:16  loss: 0.6589 (1.1207)  acc1: 87.5000 (72.9446)  acc5: 87.5000 (91.1076)  time: 0.0069  data: 0.0008  max mem: 8962\n",
            "Test:   [3900/6250]  eta: 0:00:15  loss: 2.3705 (1.1368)  acc1: 50.0000 (72.6224)  acc5: 75.0000 (90.8837)  time: 0.0063  data: 0.0010  max mem: 8962\n",
            "Test:   [4000/6250]  eta: 0:00:14  loss: 1.3760 (1.1507)  acc1: 62.5000 (72.3663)  acc5: 87.5000 (90.7179)  time: 0.0052  data: 0.0004  max mem: 8962\n",
            "Test:   [4100/6250]  eta: 0:00:14  loss: 1.3587 (1.1609)  acc1: 62.5000 (72.1836)  acc5: 87.5000 (90.6059)  time: 0.0056  data: 0.0005  max mem: 8962\n",
            "Test:   [4200/6250]  eta: 0:00:13  loss: 0.4211 (1.1651)  acc1: 87.5000 (72.0543)  acc5: 100.0000 (90.5975)  time: 0.0050  data: 0.0004  max mem: 8962\n",
            "Test:   [4300/6250]  eta: 0:00:12  loss: 0.4845 (1.1744)  acc1: 75.0000 (71.9339)  acc5: 87.5000 (90.4354)  time: 0.0056  data: 0.0006  max mem: 8962\n",
            "Test:   [4400/6250]  eta: 0:00:12  loss: 0.9234 (1.1813)  acc1: 75.0000 (71.7422)  acc5: 100.0000 (90.3885)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [4500/6250]  eta: 0:00:11  loss: 1.2129 (1.1870)  acc1: 62.5000 (71.6230)  acc5: 87.5000 (90.3299)  time: 0.0060  data: 0.0008  max mem: 8962\n",
            "Test:   [4600/6250]  eta: 0:00:10  loss: 1.6169 (1.1973)  acc1: 50.0000 (71.4519)  acc5: 87.5000 (90.1652)  time: 0.0059  data: 0.0006  max mem: 8962\n",
            "Test:   [4700/6250]  eta: 0:00:10  loss: 1.4572 (1.2073)  acc1: 62.5000 (71.1471)  acc5: 87.5000 (90.0181)  time: 0.0054  data: 0.0005  max mem: 8962\n",
            "Test:   [4800/6250]  eta: 0:00:09  loss: 1.1656 (1.2140)  acc1: 62.5000 (71.0347)  acc5: 87.5000 (89.9188)  time: 0.0057  data: 0.0005  max mem: 8962\n",
            "Test:   [4900/6250]  eta: 0:00:08  loss: 0.4505 (1.2183)  acc1: 87.5000 (70.9779)  acc5: 100.0000 (89.8312)  time: 0.0050  data: 0.0005  max mem: 8962\n",
            "Test:   [5000/6250]  eta: 0:00:08  loss: 2.1536 (1.2300)  acc1: 62.5000 (70.8008)  acc5: 75.0000 (89.6821)  time: 0.0061  data: 0.0004  max mem: 8962\n",
            "Test:   [5100/6250]  eta: 0:00:07  loss: 1.3107 (1.2352)  acc1: 62.5000 (70.6920)  acc5: 100.0000 (89.6442)  time: 0.0064  data: 0.0008  max mem: 8962\n",
            "Test:   [5200/6250]  eta: 0:00:06  loss: 1.0626 (1.2412)  acc1: 75.0000 (70.5850)  acc5: 87.5000 (89.5741)  time: 0.0053  data: 0.0005  max mem: 8962\n",
            "Test:   [5300/6250]  eta: 0:00:06  loss: 1.4655 (1.2552)  acc1: 62.5000 (70.2650)  acc5: 87.5000 (89.3864)  time: 0.0063  data: 0.0005  max mem: 8962\n",
            "Test:   [5400/6250]  eta: 0:00:05  loss: 0.8139 (1.2579)  acc1: 75.0000 (70.2162)  acc5: 87.5000 (89.3469)  time: 0.0053  data: 0.0004  max mem: 8962\n",
            "Test:   [5500/6250]  eta: 0:00:04  loss: 0.9340 (1.2610)  acc1: 75.0000 (70.1213)  acc5: 87.5000 (89.3065)  time: 0.0055  data: 0.0004  max mem: 8962\n",
            "Test:   [5600/6250]  eta: 0:00:04  loss: 1.0789 (1.2661)  acc1: 62.5000 (70.0433)  acc5: 87.5000 (89.2140)  time: 0.0064  data: 0.0013  max mem: 8962\n",
            "Test:   [5700/6250]  eta: 0:00:03  loss: 2.0526 (1.2814)  acc1: 37.5000 (69.7422)  acc5: 75.0000 (89.0567)  time: 0.0050  data: 0.0004  max mem: 8962\n",
            "Test:   [5800/6250]  eta: 0:00:02  loss: 0.5955 (1.2775)  acc1: 75.0000 (69.8220)  acc5: 100.0000 (89.0989)  time: 0.0068  data: 0.0007  max mem: 8962\n",
            "Test:   [5900/6250]  eta: 0:00:02  loss: 1.1023 (1.2751)  acc1: 62.5000 (69.8483)  acc5: 100.0000 (89.1353)  time: 0.0056  data: 0.0006  max mem: 8962\n",
            "Test:   [6000/6250]  eta: 0:00:01  loss: 0.5431 (1.2677)  acc1: 87.5000 (69.9988)  acc5: 87.5000 (89.2289)  time: 0.0058  data: 0.0004  max mem: 8962\n",
            "Test:   [6100/6250]  eta: 0:00:00  loss: 1.3317 (1.2758)  acc1: 62.5000 (69.8164)  acc5: 87.5000 (89.1370)  time: 0.0054  data: 0.0004  max mem: 8962\n",
            "Test:   [6200/6250]  eta: 0:00:00  loss: 0.2130 (1.2696)  acc1: 87.5000 (69.9444)  acc5: 100.0000 (89.2114)  time: 0.0065  data: 0.0005  max mem: 8962\n",
            "Test:  Total time: 0:00:40\n",
            "Test:  Acc@1 69.982 Acc@5 89.216\n",
            "Epoch: [5]  [   0/5005]  eta: 6:26:06  lr: 0.0001  img/s: 472.08087977640673  loss: 0.9772 (0.9772)  acc1: 70.3125 (70.3125)  acc5: 87.8906 (87.8906)  meanQV: 1.4922 (1.4922)  stdQV: 0.3204 (0.3204)  time: 4.6287  data: 4.0864  max mem: 8962\n",
            "Epoch: [5]  [ 100/5005]  eta: 0:45:55  lr: 0.0001  img/s: 493.412156113808  loss: 0.8671 (0.8977)  acc1: 69.1406 (69.1445)  acc5: 87.1094 (87.3028)  meanQV: 1.4840 (1.4833)  stdQV: 0.3228 (0.3230)  time: 0.5215  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [ 200/5005]  eta: 0:42:34  lr: 0.0001  img/s: 633.4831033504211  loss: 0.8743 (0.9023)  acc1: 69.5312 (69.1465)  acc5: 87.1094 (87.1774)  meanQV: 1.4867 (1.4834)  stdQV: 0.3216 (0.3230)  time: 0.4189  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [ 300/5005]  eta: 0:37:51  lr: 0.0001  img/s: 491.4145726182402  loss: 0.8887 (0.9009)  acc1: 69.5312 (69.1938)  acc5: 87.8906 (87.1872)  meanQV: 1.4867 (1.4838)  stdQV: 0.3204 (0.3229)  time: 0.3729  data: 0.0032  max mem: 8962\n",
            "Epoch: [5]  [ 400/5005]  eta: 0:37:47  lr: 0.0001  img/s: 488.7140108034497  loss: 0.9087 (0.9030)  acc1: 68.3594 (69.0539)  acc5: 87.5000 (87.1396)  meanQV: 1.4781 (1.4828)  stdQV: 0.3251 (0.3233)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [ 500/5005]  eta: 0:37:23  lr: 0.0001  img/s: 489.01871879991273  loss: 0.8969 (0.9043)  acc1: 67.5781 (68.9605)  acc5: 87.1094 (87.0493)  meanQV: 1.4730 (1.4821)  stdQV: 0.3249 (0.3237)  time: 0.5216  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [ 600/5005]  eta: 0:36:50  lr: 0.0001  img/s: 494.24204166440353  loss: 0.9185 (0.9048)  acc1: 68.3594 (68.9502)  acc5: 87.1094 (87.0873)  meanQV: 1.4785 (1.4821)  stdQV: 0.3262 (0.3237)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [ 700/5005]  eta: 0:36:12  lr: 0.0001  img/s: 490.8462248780818  loss: 0.9053 (0.9051)  acc1: 68.3594 (68.9840)  acc5: 85.9375 (87.0927)  meanQV: 1.4781 (1.4823)  stdQV: 0.3240 (0.3236)  time: 0.5222  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [ 800/5005]  eta: 0:35:30  lr: 0.0001  img/s: 493.49674301159627  loss: 0.8652 (0.9059)  acc1: 70.3125 (68.9992)  acc5: 87.5000 (87.0879)  meanQV: 1.4918 (1.4824)  stdQV: 0.3202 (0.3235)  time: 0.5209  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [ 900/5005]  eta: 0:34:46  lr: 0.0001  img/s: 492.24203409939537  loss: 0.8904 (0.9059)  acc1: 69.1406 (68.9659)  acc5: 87.5000 (87.0920)  meanQV: 1.4840 (1.4822)  stdQV: 0.3224 (0.3236)  time: 0.5210  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [1000/5005]  eta: 0:34:00  lr: 0.0001  img/s: 493.5423367172554  loss: 0.9307 (0.9063)  acc1: 69.1406 (68.9541)  acc5: 85.9375 (87.0731)  meanQV: 1.4840 (1.4821)  stdQV: 0.3228 (0.3236)  time: 0.5217  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [1100/5005]  eta: 0:33:14  lr: 0.0001  img/s: 489.2419819520163  loss: 0.8769 (0.9064)  acc1: 69.9219 (68.9540)  acc5: 87.1094 (87.0718)  meanQV: 1.4891 (1.4821)  stdQV: 0.3212 (0.3236)  time: 0.5218  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [1200/5005]  eta: 0:32:26  lr: 0.0001  img/s: 499.6392909558434  loss: 0.8655 (0.9056)  acc1: 67.9688 (68.9608)  acc5: 86.7188 (87.0716)  meanQV: 1.4746 (1.4821)  stdQV: 0.3257 (0.3236)  time: 0.5207  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [1300/5005]  eta: 0:31:37  lr: 0.0001  img/s: 493.8163030755964  loss: 0.9314 (0.9051)  acc1: 67.5781 (68.9860)  acc5: 86.7188 (87.0968)  meanQV: 1.4727 (1.4823)  stdQV: 0.3280 (0.3235)  time: 0.5206  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [1400/5005]  eta: 0:30:49  lr: 0.0001  img/s: 494.9975815812936  loss: 0.8642 (0.9041)  acc1: 69.5312 (69.0129)  acc5: 87.8906 (87.0929)  meanQV: 1.4844 (1.4825)  stdQV: 0.3216 (0.3234)  time: 0.5214  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [1500/5005]  eta: 0:29:59  lr: 0.0001  img/s: 488.4738953923197  loss: 0.9535 (0.9047)  acc1: 67.9688 (68.9798)  acc5: 86.3281 (87.0698)  meanQV: 1.4758 (1.4823)  stdQV: 0.3262 (0.3235)  time: 0.5208  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [1600/5005]  eta: 0:29:09  lr: 0.0001  img/s: 489.3487835801782  loss: 0.8809 (0.9042)  acc1: 69.1406 (69.0108)  acc5: 87.1094 (87.0811)  meanQV: 1.4828 (1.4825)  stdQV: 0.3237 (0.3235)  time: 0.5214  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [1700/5005]  eta: 0:28:19  lr: 0.0001  img/s: 489.42685183665805  loss: 0.8938 (0.9043)  acc1: 68.3594 (68.9845)  acc5: 85.9375 (87.0756)  meanQV: 1.4785 (1.4823)  stdQV: 0.3262 (0.3235)  time: 0.5206  data: 0.0003  max mem: 8962\n",
            "Epoch: [5]  [1800/5005]  eta: 0:27:29  lr: 0.0001  img/s: 489.34900659686224  loss: 0.8771 (0.9038)  acc1: 69.9219 (69.0081)  acc5: 89.0625 (87.1057)  meanQV: 1.4867 (1.4825)  stdQV: 0.3192 (0.3235)  time: 0.5219  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [1900/5005]  eta: 0:26:39  lr: 0.0001  img/s: 488.80233479720977  loss: 0.9229 (0.9041)  acc1: 67.9688 (69.0192)  acc5: 86.7188 (87.1049)  meanQV: 1.4746 (1.4825)  stdQV: 0.3236 (0.3234)  time: 0.5216  data: 0.0004  max mem: 8962\n",
            "Epoch: [5]  [2000/5005]  eta: 0:25:48  lr: 0.0001  img/s: 492.5014558430955  loss: 0.9266 (0.9045)  acc1: 67.9688 (69.0048)  acc5: 86.7188 (87.0990)  meanQV: 1.4758 (1.4824)  stdQV: 0.3262 (0.3235)  time: 0.5205  data: 0.0004  max mem: 8962\n"
          ]
        },
        {
          "ename": "KeyboardInterrupt",
          "evalue": "",
          "output_type": "error",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
            "Cell \u001b[0;32mIn[8], line 27\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mtypes\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m SimpleNamespace\n\u001b[1;32m      3\u001b[0m args \u001b[38;5;241m=\u001b[39m SimpleNamespace(\n\u001b[1;32m      4\u001b[0m     data_path\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/home/cs/Documents/datasets/imagenet\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m      5\u001b[0m     model\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mresnet18\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m     24\u001b[0m     trp_lambdas\u001b[38;5;241m=\u001b[39m[\u001b[38;5;241m0.4\u001b[39m, \u001b[38;5;241m0.2\u001b[39m, \u001b[38;5;241m0.1\u001b[39m],\n\u001b[1;32m     25\u001b[0m )\n\u001b[0;32m---> 27\u001b[0m \u001b[43mmain\u001b[49m\u001b[43m(\u001b[49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n",
            "Cell \u001b[0;32mIn[7], line 151\u001b[0m, in \u001b[0;36mmain\u001b[0;34m(args)\u001b[0m\n\u001b[1;32m    149\u001b[0m start_time \u001b[38;5;241m=\u001b[39m time\u001b[38;5;241m.\u001b[39mtime()\n\u001b[1;32m    150\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m epoch \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(args\u001b[38;5;241m.\u001b[39mepochs):\n\u001b[0;32m--> 151\u001b[0m     \u001b[43mtrain_one_epoch\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moptimizer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdata_loader\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdevice\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mepoch\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    152\u001b[0m     lr_scheduler\u001b[38;5;241m.\u001b[39mstep()\n\u001b[1;32m    153\u001b[0m     evaluate(model, nn\u001b[38;5;241m.\u001b[39mCrossEntropyLoss(), data_loader_test, device\u001b[38;5;241m=\u001b[39mdevice)\n",
            "Cell \u001b[0;32mIn[7], line 61\u001b[0m, in \u001b[0;36mtrain_one_epoch\u001b[0;34m(model, optimizer, data_loader, device, epoch, args)\u001b[0m\n\u001b[1;32m     59\u001b[0m acc1, acc5 \u001b[38;5;241m=\u001b[39m utils\u001b[38;5;241m.\u001b[39maccuracy(output, target, topk\u001b[38;5;241m=\u001b[39m(\u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m5\u001b[39m))\n\u001b[1;32m     60\u001b[0m batch_size \u001b[38;5;241m=\u001b[39m image\u001b[38;5;241m.\u001b[39mshape[\u001b[38;5;241m0\u001b[39m]\n\u001b[0;32m---> 61\u001b[0m metric_logger\u001b[38;5;241m.\u001b[39mupdate(loss\u001b[38;5;241m=\u001b[39m\u001b[43mloss\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitem\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m, lr\u001b[38;5;241m=\u001b[39moptimizer\u001b[38;5;241m.\u001b[39mparam_groups[\u001b[38;5;241m0\u001b[39m][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlr\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m     62\u001b[0m metric_logger\u001b[38;5;241m.\u001b[39mmeters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124macc1\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m.\u001b[39mupdate(acc1\u001b[38;5;241m.\u001b[39mitem(), n\u001b[38;5;241m=\u001b[39mbatch_size)\n\u001b[1;32m     63\u001b[0m metric_logger\u001b[38;5;241m.\u001b[39mmeters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124macc5\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m.\u001b[39mupdate(acc5\u001b[38;5;241m.\u001b[39mitem(), n\u001b[38;5;241m=\u001b[39mbatch_size)\n",
            "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
          ]
        }
      ],
      "source": [
        "from types import SimpleNamespace\n",
        "\n",
        "args = SimpleNamespace(\n",
        "    data_path=\"/home/cs/Documents/datasets/imagenet\",  # Replace with your /path/to/imagenet\n",
        "    model=\"resnet18\",\n",
        "    device=\"cuda\",\n",
        "    batch_size=256,\n",
        "    epochs=10,\n",
        "    lr=0.0004,\n",
        "    momentum=0.9,\n",
        "    weight_decay=1e-4,\n",
        "    lr_warmup_epochs=1,\n",
        "    lr_warmup_decay=0.0,\n",
        "    lr_step_size=2,\n",
        "    lr_gamma=0.5,\n",
        "    print_freq=100,\n",
        "    output_dir=\"resnet18\",\n",
        "    use_deterministic_algorithms=False,\n",
        "    weights=\"ResNet18_Weights.IMAGENET1K_V1\",\n",
        "    apply_trp=True,\n",
        "    trp_depths=[1, 1, 1],\n",
        "    trp_planes=256,\n",
        "    trp_lambdas=[0.4, 0.2, 0.1],\n",
        ")\n",
        "\n",
        "main(args)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "a3KD3WXU3l-O"
      },
      "source": [
        "# Fine-tuning a language model"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JAscNNUD3l-P"
      },
      "source": [
        "In this notebook, we'll see how to fine-tune one of the [🤗 Transformers](https://github.com/huggingface/transformers) model on a language modeling tasks. We will cover two types of language modeling tasks which are:\n",
        "\n",
        "- Causal language modeling: the model has to predict the next token in the sentence (so the labels are the same as the inputs shifted to the right). To make sure the model does not cheat, it gets an attention mask that will prevent it to access the tokens after token i when trying to predict the token i+1 in the sentence.\n",
        "\n",
        "![Widget inference representing the causal language modeling task](https://github.com/huggingface/notebooks/blob/main/examples/images/causal_language_modeling.png?raw=1)\n",
        "\n",
        "- Masked language modeling: the model has to predict some tokens that are masked in the input. It still has access to the whole sentence, so it can use the tokens before and after the tokens masked to predict their value.\n",
        "\n",
        "![Widget inference representing the masked language modeling task](https://github.com/huggingface/notebooks/blob/main/examples/images/masked_language_modeling.png?raw=1)\n",
        "\n",
        "We will see how to easily load and preprocess the dataset for each one of those tasks, and how to use the `Trainer` API to fine-tune a model on it.\n",
        "\n",
        "A script version of this notebook you can directly run on a distributed environment or on TPU is available in our [examples folder](https://github.com/huggingface/transformers/tree/master/examples)."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1r_n9OWV3l-Q"
      },
      "source": [
        "## Preparing the dataset"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "kswRMhPc3l-Q"
      },
      "source": [
        "For each of those tasks, we will use the [Wikitext 2]() dataset as an example. You can load it very easily with the 🤗 Datasets library."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "n2ZRs1cL3l-R"
      },
      "outputs": [],
      "source": [
        "from datasets import load_dataset\n",
        "datasets = load_dataset('wikitext', 'wikitext-2-raw-v1')"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "f1-9jepM3l-W"
      },
      "source": [
        "You can replace the dataset above with any dataset hosted on [the hub](https://huggingface.co/datasets) or use your own files. Just uncomment the following cell and replace the paths with values that will lead to your files:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "uxSaGa_l3l-W"
      },
      "outputs": [],
      "source": [
        "# datasets = load_dataset(\"text\", data_files={\"train\": path_to_train.txt, \"validation\": path_to_validation.txt}"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "jY1SwIrY3l-a"
      },
      "source": [
        "You can also load datasets from a csv or a JSON file, see the [full documentation](https://huggingface.co/docs/datasets/loading_datasets.html#from-local-files) for more information."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "u3EtYfeHIrIz"
      },
      "source": [
        "To access an actual element, you need to select a split first, then give an index:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "X6HrpprwIrIz"
      },
      "outputs": [],
      "source": [
        "datasets[\"train\"][10]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "WHUmphG3IrI3"
      },
      "source": [
        "To get a sense of what the data looks like, the following function will show some examples picked randomly in the dataset."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "ur5sNUcZ3l-g"
      },
      "outputs": [],
      "source": [
        "from datasets import ClassLabel\n",
        "import random\n",
        "import pandas as pd\n",
        "from IPython.display import display, HTML\n",
        "\n",
        "def show_random_elements(dataset, num_examples=10):\n",
        "    assert num_examples <= len(dataset), \"Can't pick more elements than there are in the dataset.\"\n",
        "    picks = []\n",
        "    for _ in range(num_examples):\n",
        "        pick = random.randint(0, len(dataset)-1)\n",
        "        while pick in picks:\n",
        "            pick = random.randint(0, len(dataset)-1)\n",
        "        picks.append(pick)\n",
        "\n",
        "    df = pd.DataFrame(dataset[picks])\n",
        "    for column, typ in dataset.features.items():\n",
        "        if isinstance(typ, ClassLabel):\n",
        "            df[column] = df[column].transform(lambda i: typ.names[i])\n",
        "    display(HTML(df.to_html()))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "1Uk8NROQ3l-k"
      },
      "outputs": [],
      "source": [
        "show_random_elements(datasets[\"train\"])"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CKerdF353l-o"
      },
      "source": [
        "As we can see, some of the texts are a full paragraph of a Wikipedia article while others are just titles or empty lines."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JEA1ju653l-p"
      },
      "source": [
        "## Causal Language modeling"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "v5GTGKZS3l-q"
      },
      "source": [
        "For causal language modeling (CLM) we are going to take all the texts in our dataset and concatenate them after they are tokenized. Then we will split them in examples of a certain sequence length. This way the model will receive chunks of contiguous text that may look like:\n",
        "```\n",
        "part of text 1\n",
        "```\n",
        "or\n",
        "```\n",
        "end of text 1 [BOS_TOKEN] beginning of text 2\n",
        "```\n",
        "depending on whether they span over several of the original texts in the dataset or not. The labels will be the same as the inputs, shifted to the left.\n",
        "\n",
        "We will use the [`distilgpt2`](https://huggingface.co/distilgpt2) model for this example. You can pick any of the checkpoints listed [here](https://huggingface.co/models?filter=causal-lm) instead:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-WGBCO343l-q"
      },
      "outputs": [],
      "source": [
        "model_checkpoint = \"distilgpt2\""
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "5io6fY_d3l-u"
      },
      "source": [
        "To tokenize all our texts with the same vocabulary that was used when training the model, we have to download a pretrained tokenizer. This is all done by the `AutoTokenizer` class:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "iAYlS40Z3l-v"
      },
      "outputs": [],
      "source": [
        "from transformers import AutoTokenizer\n",
        "\n",
        "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "rpOiBrJ13l-y"
      },
      "source": [
        "We can now call the tokenizer on all our texts. This is very simple, using the [`map`](https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.map) method from the Datasets library. First we define a function that call the tokenizer on our texts:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "lS2m25YM3l-z"
      },
      "outputs": [],
      "source": [
        "def tokenize_function(examples):\n",
        "    return tokenizer(examples[\"text\"])"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "M9xVAa3s3l-2"
      },
      "source": [
        "Then we apply it to all the splits in our `datasets` object, using `batched=True` and 4 processes to speed up the preprocessing. We won't need the `text` column afterward, so we discard it."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "NVAO0H8u3l-3"
      },
      "outputs": [],
      "source": [
        "tokenized_datasets = datasets.map(tokenize_function, batched=True, num_proc=4, remove_columns=[\"text\"])"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8qik3J_C3l-7"
      },
      "source": [
        "If we now look at an element of our datasets, we will see the text have been replaced by the `input_ids` the model will need:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "nYv_mcKk3l-7"
      },
      "outputs": [],
      "source": [
        "tokenized_datasets[\"train\"][1]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "obvgcXda3l--"
      },
      "source": [
        "Now for the harder part: we need to concatenate all our texts together then split the result in small chunks of a certain `block_size`. To do this, we will use the `map` method again, with the option `batched=True`. This option actually lets us change the number of examples in the datasets by returning a different number of examples than we got. This way, we can create our new samples from a batch of examples.\n",
        "\n",
        "First, we grab the maximum length our model was pretrained with. This might be a big too big to fit in your GPU RAM, so here we take a bit less at just 128."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "DVHs5aCA3l-_"
      },
      "outputs": [],
      "source": [
        "# block_size = tokenizer.model_max_length\n",
        "block_size = 128"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "RpNfGiMw3l_A"
      },
      "source": [
        "Then we write the preprocessing function that will group our texts:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "iaAJy5Hu3l_B"
      },
      "outputs": [],
      "source": [
        "def group_texts(examples):\n",
        "    # Concatenate all texts.\n",
        "    concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}\n",
        "    total_length = len(concatenated_examples[list(examples.keys())[0]])\n",
        "    # We drop the small remainder, we could add padding if the model supported it instead of this drop, you can\n",
        "        # customize this part to your needs.\n",
        "    total_length = (total_length // block_size) * block_size\n",
        "    # Split by chunks of max_len.\n",
        "    result = {\n",
        "        k: [t[i : i + block_size] for i in range(0, total_length, block_size)]\n",
        "        for k, t in concatenated_examples.items()\n",
        "    }\n",
        "    result[\"labels\"] = result[\"input_ids\"].copy()\n",
        "    return result"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "LGJWXtNv3l_C"
      },
      "source": [
        "First note that we duplicate the inputs for our labels. This is because the model of the 🤗 Transformers library apply the shifting to the right, so we don't need to do it manually.\n",
        "\n",
        "Also note that by default, the `map` method will send a batch of 1,000 examples to be treated by the preprocessing function. So here, we will drop the remainder to make the concatenated tokenized texts a multiple of `block_size` every 1,000 examples. You can adjust this behavior by passing a higher batch size (which will also be processed slower). You can also speed-up the preprocessing by using multiprocessing:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "gXUSfBrq3l_C"
      },
      "outputs": [],
      "source": [
        "lm_datasets = tokenized_datasets.map(\n",
        "    group_texts,\n",
        "    batched=True,\n",
        "    batch_size=1000,\n",
        "    num_proc=4,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6n84V8Gc3l_G"
      },
      "source": [
        "And we can check our datasets have changed: now the samples contain chunks of `block_size` contiguous tokens, potentially spanning over several of our original texts."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "hTeGCLl_3l_G"
      },
      "outputs": [],
      "source": [
        "tokenizer.decode(lm_datasets[\"train\"][1][\"input_ids\"])"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iEmeQ7Xm3l_H"
      },
      "source": [
        "Now that the data has been cleaned, we're ready to instantiate our `Trainer`. We will a model:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "sPqQA3TT3l_I"
      },
      "outputs": [],
      "source": [
        "from transformers import AutoModelForCausalLM\n",
        "model = AutoModelForCausalLM.from_pretrained(model_checkpoint)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "VyPQTOF_3l_J"
      },
      "source": [
        "And some `TrainingArguments`:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "jElf8LJ33l_K"
      },
      "outputs": [],
      "source": [
        "from transformers import Trainer, TrainingArguments"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "YbSwEhQ63l_L"
      },
      "outputs": [],
      "source": [
        "model_name = model_checkpoint.split(\"/\")[-1]\n",
        "training_args = TrainingArguments(\n",
        "    f\"{model_name}-finetuned-wikitext2\",\n",
        "    eval_strategy = \"epoch\",\n",
        "    learning_rate=2e-5,\n",
        "    weight_decay=0.01,\n",
        "    push_to_hub=True,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "dsx-8ebng3FI"
      },
      "source": [
        "The last argument to setup everything so we can push the model to the [Hub](https://huggingface.co/models) regularly during training. Remove it if you didn't follow the installation steps at the top of the notebook. If you want to save your model locally in a name that is different than the name of the repository it will be pushed, or if you want to push your model under an organization and not your name space, use the `hub_model_id` argument to set the repo name (it needs to be the full name, including your namespace: for instance `\"sgugger/gpt-finetuned-wikitext2\"` or `\"huggingface/gpt-finetuned-wikitext2\"`)."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "sZRbT9ui3l_N"
      },
      "source": [
        "We pass along all of those to the `Trainer` class:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "OEuqwIra3l_N"
      },
      "outputs": [],
      "source": [
        "trainer = Trainer(\n",
        "    model=model,\n",
        "    args=training_args,\n",
        "    train_dataset=lm_datasets[\"train\"],\n",
        "    eval_dataset=lm_datasets[\"validation\"],\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6Vvz34Td3l_O"
      },
      "source": [
        "And we can train our model:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "NyZvu_MF3l_P"
      },
      "outputs": [],
      "source": [
        "trainer.train()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3APq-vUc3l_R"
      },
      "source": [
        "Once the training is completed, we can evaluate our model and get its perplexity on the validation set like this:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "diKZnB1I3l_R"
      },
      "outputs": [],
      "source": [
        "import math\n",
        "eval_results = trainer.evaluate()\n",
        "print(f\"Perplexity: {math.exp(eval_results['eval_loss']):.2f}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wY82caEX3l_i"
      },
      "source": [
        "You can now upload the result of the training to the Hub, just execute this instruction:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "KjTnsZXwg3FI"
      },
      "outputs": [],
      "source": [
        "trainer.push_to_hub()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "lKIc9Jr8g3FI"
      },
      "source": [
        "You can now share this model with all your friends, family, favorite pets: they can all load it with the identifier `\"your-username/the-name-you-picked\"` so for instance:\n",
        "\n",
        "```python\n",
        "from transformers import AutoModelForCausalLM\n",
        "\n",
        "model = AutoModelForCausalLM.from_pretrained(\"sgugger/my-awesome-model\")\n",
        "```"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "q-EIELH43l_T"
      },
      "source": [
        "## Masked language modeling"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "LWk97-Ny3l_T"
      },
      "source": [
        "For masked language modeling (MLM) we are going to use the same preprocessing as before for our dataset with one additional step: we will randomly mask some tokens (by replacing them by `[MASK]`) and the labels will be adjusted to only include the masked tokens (we don't have to predict the non-masked tokens).\n",
        "\n",
        "We will use the [`distilroberta-base`](https://huggingface.co/distilroberta-base) model for this example. You can pick any of the checkpoints listed [here](https://huggingface.co/models?filter=masked-lm) instead:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "QRTpmyCc3l_T"
      },
      "outputs": [],
      "source": [
        "model_checkpoint = \"distilroberta-base\""
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "12F1ulgT3l_V"
      },
      "source": [
        "We can apply the same tokenization function as before, we just need to update our tokenizer to use the checkpoint we just picked:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "h8RCYcvr3l_V"
      },
      "outputs": [],
      "source": [
        "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_fast=True)\n",
        "tokenized_datasets = datasets.map(tokenize_function, batched=True, num_proc=4, remove_columns=[\"text\"])"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "MTuy8UUs3l_X"
      },
      "source": [
        "And like before, we group texts together and chunk them in samples of length `block_size`. You can skip that step if your dataset is composed of individual sentences."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "LVYPMwEs3l_X"
      },
      "outputs": [],
      "source": [
        "lm_datasets = tokenized_datasets.map(\n",
        "    group_texts,\n",
        "    batched=True,\n",
        "    batch_size=1000,\n",
        "    num_proc=4,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "nFJ49iHJ3l_Z"
      },
      "source": [
        "The rest is very similar to what we had, with two exceptions. First we use a model suitable for masked LM:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "PM10A9Za3l_Z"
      },
      "outputs": [],
      "source": [
        "from transformers import AutoModelForMaskedLM\n",
        "model = AutoModelForMaskedLM.from_pretrained(model_checkpoint)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "emlofW7Yg3FJ"
      },
      "source": [
        "We redefine our `TrainingArguments`:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Hgd9wpjHg3FJ"
      },
      "outputs": [],
      "source": [
        "model_name = model_checkpoint.split(\"/\")[-1]\n",
        "training_args = TrainingArguments(\n",
        "    f\"{model_name}-finetuned-wikitext2\",\n",
        "    eval_strategy = \"epoch\",\n",
        "    learning_rate=2e-5,\n",
        "    weight_decay=0.01,\n",
        "    push_to_hub=True,\n",
        ")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3tP4SZ3rg3FJ"
      },
      "source": [
        "Like before, the last argument to setup everything so we can push the model to the [Hub](https://huggingface.co/models) regularly during training. Remove it if you didn't follow the installation steps at the top of the notebook. If you want to save your model locally in a name that is different than the name of the repository it will be pushed, or if you want to push your model under an organization and not your name space, use the `hub_model_id` argument to set the repo name (it needs to be the full name, including your namespace: for instance `\"sgugger/bert-finetuned-wikitext2\"` or `\"huggingface/bert-finetuned-wikitext2\"`)."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "z6uuUnvz3l_b"
      },
      "source": [
        "Finally, we use a special `data_collator`. The `data_collator` is a function that is responsible of taking the samples and batching them in tensors. In the previous example, we had nothing special to do, so we just used the default for this argument. Here we want to do the random-masking. We could do it as a pre-processing step (like the tokenization) but then the tokens would always be masked the same way at each epoch. By doing this step inside the `data_collator`, we ensure this random masking is done in a new way each time we go over the data.\n",
        "\n",
        "To do this masking for us, the library provides a `DataCollatorForLanguageModeling`. We can adjust the probability of the masking:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "nRZ-5v_P3l_b"
      },
      "outputs": [],
      "source": [
        "from transformers import DataCollatorForLanguageModeling\n",
        "data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm_probability=0.15)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bqHnWcYC3l_d"
      },
      "source": [
        "Then we just have to pass everything to `Trainer` and begin training:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "V-Y3gNqV3l_d"
      },
      "outputs": [],
      "source": [
        "trainer = Trainer(\n",
        "    model=model,\n",
        "    args=training_args,\n",
        "    train_dataset=lm_datasets[\"train\"],\n",
        "    eval_dataset=lm_datasets[\"validation\"],\n",
        "    data_collator=data_collator,\n",
        ")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Y9TFqDG_3l_e"
      },
      "outputs": [],
      "source": [
        "trainer.train()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "KDBi0reX3l_g"
      },
      "source": [
        "Like before, we can evaluate our model on the validation set. The perplexity is much lower than for the CLM objective because for the MLM objective, we only have to make predictions for the masked tokens (which represent 15% of the total here) while having access to the rest of the tokens. It's thus an easier task for the model."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "4hSaANqj3l_g"
      },
      "outputs": [],
      "source": [
        "eval_results = trainer.evaluate()\n",
        "print(f\"Perplexity: {math.exp(eval_results['eval_loss']):.2f}\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "TDmITtEYg3FK"
      },
      "source": [
        "You can now upload the result of the training to the Hub, just execute this instruction:"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-3CFIYUrg3FK"
      },
      "outputs": [],
      "source": [
        "trainer.push_to_hub()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Da10yeZNg3FK"
      },
      "source": [
        "You can now share this model with all your friends, family, favorite pets: they can all load it with the identifier `\"your-username/the-name-you-picked\"` so for instance:\n",
        "\n",
        "```python\n",
        "from transformers import AutoModelForMaskedLM\n",
        "\n",
        "model = AutoModelForMaskedLM.from_pretrained(\"sgugger/my-awesome-model\")\n",
        "```"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "RqqSgjeSg3FK"
      },
      "outputs": [],
      "source": []
    }
  ],
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3 (ipykernel)",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.9.21"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}