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
|
{
"cells": [
{
"cell_type": "markdown",
"id": "8a4a74dc-5958-4c8c-abdb-784135994d35",
"metadata": {},
"source": [
"<a href=\"https://www.nvidia.com/dli\"><img src=\"images/DLI_Header.png\" alt=\"Header\" style=\"width: 400px;\"/></a>"
]
},
{
"cell_type": "markdown",
"id": "571b7f4d-d7d6-4a80-8288-b6eb5d76901c",
"metadata": {},
"source": [
"## Assessment: Computer Vision for Industrial Inspection ##\n",
"In this notebook, you will utilize what you've learned in this course to complete an assessment. The assessment has been divided into a couple of steps to guide your development. You will be graded based on the performance of your deep learning model. Note that this coding portion does not give partial credit - it shows up as either 0 or 60 points. \n",
"<table border=\"1\" class=\"dataframe\" align='left'> <thead> <tr style=\"text-align: right;\"> <th>Step</th> <th></th> <th>Points</th> </tr> </thead> <tbody> <tr> <td>0. The Problem</td> <td></td> <td></td> </tr> <tr> <td>1. Data Curation</td> <td></td> <td></td> </tr> <tr> <td>2. Prepare TAO Experiment</td> <td></td> <td></td> </tr> <tr> <td>3. Model Training</td> <td></td> <td></td> </tr> <tr> <td>4. Model Evaluation</td> <td></td> <td>60</td> </tr></tbody></table>"
]
},
{
"cell_type": "markdown",
"id": "559c1a85-e36c-4396-93fb-524048c66684",
"metadata": {},
"source": [
"<p><img src='images/ml_workflow.png' width=720></p>"
]
},
{
"cell_type": "markdown",
"id": "43e4be02-6163-4282-ad82-892dee6d17a0",
"metadata": {},
"source": [
"### Step 0: The Problem ###\n",
"In this course, we made a binary classifier for the true/false defective units in our printed circuit board assembly dataset. For the asssesment we are asking you to create a model over the same dataset, but with a different purpose. Before we dealt with `capacitors` only, but the reference circuit boards have other components as well. In particular, we are interested in classifying the following four components based on their images: \n",
"\n",
"<p><img src='images/assessment_samples.png' width=720></p>\n",
"\n",
"The component types are marked by the first letter(s) of component identification numbers. \n",
"* **C** - Capacitor\n",
"* **Q** - Transistor\n",
"* **R** - Resistor\n",
"* **U** - Integrated Circuit\n",
"\n",
"Your task is to train and evaluate a classifier that accurately labels the four component types. We recommend using `VGG19` as the architecture in the spirit of experimenting with different backbones. \n",
"\n",
"**Instructions**: <br> \n",
"0.1 Execute the below cell to import dependencies <br>\n",
"0.2 Execute the cell below to unzip and load data"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6854c3b3-4640-4b5d-99dd-df66f1bb6226",
"metadata": {},
"outputs": [],
"source": [
"# 0.1\n",
"# DO NOT CHANGE THIS CELL\n",
"# import dependencies\n",
"import os\n",
"import warnings\n",
"import pandas as pd\n",
"import json\n",
"import matplotlib.image as mpimg\n",
"import matplotlib.pyplot as plt\n",
"import math\n",
"import shutil\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a3c9a2e4-9e8a-4031-b955-14a5c2f16f71",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"unzip: cannot find or open data/viz_BYD_new.zip, data/viz_BYD_new.zip.zip or data/viz_BYD_new.zip.ZIP.\n",
"rm: cannot remove 'data/viz_BYD_new.zip': No such file or directory\n"
]
}
],
"source": [
"# 0.2\n",
"# DO NOT CHANGE THIS CELL\n",
"# unzip\n",
"!unzip -qq data/viz_BYD_new.zip -d data\n",
"\n",
"# remove zip file\n",
"!rm data/viz_BYD_new.zip"
]
},
{
"cell_type": "markdown",
"id": "ac27c9b9-b8f9-4331-b6dd-f3a1c7da2058",
"metadata": {},
"source": [
"### Step 1: Data Curation ###\n",
"The first step is to curate the data. \n",
"\n",
"**Instructions**: <br>\n",
"1.1 Execute the below cell to load the data into a `DataFrame` and preview. <br>\n",
"1.2 Modify the `<FIXME>` only and execute the cell below to filter and keep only normal images as potential defective images may include missing parts. <br>\n",
"1.3 Modify the `<FIXME>` only and execute the cell below to filter and keep only relevant images, i.e. `C`, `Q`, `R`, or `U`. <br>\n",
"1.4 Execute the cell below to check the sample size. "
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "47f1a7e0-ed48-4378-8ddb-56d9ef8a1357",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>true_defect</th>\n",
" <th>defect_img_path</th>\n",
" <th>date</th>\n",
" <th>board</th>\n",
" <th>comp_id</th>\n",
" <th>img_shape</th>\n",
" <th>defect_image_name</th>\n",
" <th>comp_type</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>notdefect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423318026324/...</td>\n",
" <td>908</td>\n",
" <td>423318026324</td>\n",
" <td>C1090</td>\n",
" <td>(54, 27, 3)</td>\n",
" <td>D0_C1090.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>notdefect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423318026269/...</td>\n",
" <td>908</td>\n",
" <td>423318026269</td>\n",
" <td>C1090</td>\n",
" <td>(54, 27, 3)</td>\n",
" <td>D1_C1090.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>notdefect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423318026261/...</td>\n",
" <td>908</td>\n",
" <td>423318026261</td>\n",
" <td>L503</td>\n",
" <td>(347, 418, 3)</td>\n",
" <td>D1_L503.jpg</td>\n",
" <td>L</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>notdefect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423318026523/...</td>\n",
" <td>908</td>\n",
" <td>423318026523</td>\n",
" <td>L503</td>\n",
" <td>(347, 418, 3)</td>\n",
" <td>D1_L503.jpg</td>\n",
" <td>L</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>notdefect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423318026523/...</td>\n",
" <td>908</td>\n",
" <td>423318026523</td>\n",
" <td>C1090</td>\n",
" <td>(54, 27, 3)</td>\n",
" <td>D1_C1090.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" true_defect defect_img_path date \\\n",
"0 notdefect /dli/task/data/AOI_DL_data_0908/0423318026324/... 908 \n",
"1 notdefect /dli/task/data/AOI_DL_data_0908/0423318026269/... 908 \n",
"2 notdefect /dli/task/data/AOI_DL_data_0908/0423318026261/... 908 \n",
"3 notdefect /dli/task/data/AOI_DL_data_0908/0423318026523/... 908 \n",
"4 notdefect /dli/task/data/AOI_DL_data_0908/0423318026523/... 908 \n",
"\n",
" board comp_id img_shape defect_image_name comp_type \n",
"0 423318026324 C1090 (54, 27, 3) D0_C1090.jpg C \n",
"1 423318026269 C1090 (54, 27, 3) D1_C1090.jpg C \n",
"2 423318026261 L503 (347, 418, 3) D1_L503.jpg L \n",
"3 423318026523 L503 (347, 418, 3) D1_L503.jpg L \n",
"4 423318026523 C1090 (54, 27, 3) D1_C1090.jpg C "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 1.1\n",
"# DO NOT CHANGE THIS CELL\n",
"# load from pcba_df.csv\n",
"pcba_df=pd.read_csv('pcba_df.csv')\n",
"pcba_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "1831b93c-deb5-40c6-a55b-4feb22c568fa",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>true_defect</th>\n",
" <th>defect_img_path</th>\n",
" <th>date</th>\n",
" <th>board</th>\n",
" <th>comp_id</th>\n",
" <th>img_shape</th>\n",
" <th>defect_image_name</th>\n",
" <th>comp_type</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>77</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618041671/...</td>\n",
" <td>908</td>\n",
" <td>423618041671</td>\n",
" <td>R511</td>\n",
" <td>(132, 52, 3)</td>\n",
" <td>D1_R511.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>89</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618042253/...</td>\n",
" <td>908</td>\n",
" <td>423618042253</td>\n",
" <td>R1318</td>\n",
" <td>(88, 35, 3)</td>\n",
" <td>D1_R1318.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>122</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618039275/...</td>\n",
" <td>908</td>\n",
" <td>423618039275</td>\n",
" <td>C517</td>\n",
" <td>(387, 171, 3)</td>\n",
" <td>D1_C517.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>225</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618040901/...</td>\n",
" <td>908</td>\n",
" <td>423618040901</td>\n",
" <td>R176</td>\n",
" <td>(36, 87, 3)</td>\n",
" <td>D0_R176.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>227</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618039308/...</td>\n",
" <td>908</td>\n",
" <td>423618039308</td>\n",
" <td>C107</td>\n",
" <td>(84, 32, 3)</td>\n",
" <td>D1_C107.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" true_defect defect_img_path date \\\n",
"77 defect /dli/task/data/AOI_DL_data_0908/0423618041671/... 908 \n",
"89 defect /dli/task/data/AOI_DL_data_0908/0423618042253/... 908 \n",
"122 defect /dli/task/data/AOI_DL_data_0908/0423618039275/... 908 \n",
"225 defect /dli/task/data/AOI_DL_data_0908/0423618040901/... 908 \n",
"227 defect /dli/task/data/AOI_DL_data_0908/0423618039308/... 908 \n",
"\n",
" board comp_id img_shape defect_image_name comp_type \n",
"77 423618041671 R511 (132, 52, 3) D1_R511.jpg R \n",
"89 423618042253 R1318 (88, 35, 3) D1_R1318.jpg R \n",
"122 423618039275 C517 (387, 171, 3) D1_C517.jpg C \n",
"225 423618040901 R176 (36, 87, 3) D0_R176.jpg R \n",
"227 423618039308 C107 (84, 32, 3) D1_C107.jpg C "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 1.2\n",
"verified_df=pcba_df[pcba_df['true_defect']==\"defect\"]\n",
"verified_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "ecb4e9ed-2d53-4d79-b67e-9e6da8fe2106",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>true_defect</th>\n",
" <th>defect_img_path</th>\n",
" <th>date</th>\n",
" <th>board</th>\n",
" <th>comp_id</th>\n",
" <th>img_shape</th>\n",
" <th>defect_image_name</th>\n",
" <th>comp_type</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>77</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618041671/...</td>\n",
" <td>908</td>\n",
" <td>423618041671</td>\n",
" <td>R511</td>\n",
" <td>(132, 52, 3)</td>\n",
" <td>D1_R511.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>89</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618042253/...</td>\n",
" <td>908</td>\n",
" <td>423618042253</td>\n",
" <td>R1318</td>\n",
" <td>(88, 35, 3)</td>\n",
" <td>D1_R1318.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>122</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618039275/...</td>\n",
" <td>908</td>\n",
" <td>423618039275</td>\n",
" <td>C517</td>\n",
" <td>(387, 171, 3)</td>\n",
" <td>D1_C517.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" <tr>\n",
" <th>225</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618040901/...</td>\n",
" <td>908</td>\n",
" <td>423618040901</td>\n",
" <td>R176</td>\n",
" <td>(36, 87, 3)</td>\n",
" <td>D0_R176.jpg</td>\n",
" <td>R</td>\n",
" </tr>\n",
" <tr>\n",
" <th>227</th>\n",
" <td>defect</td>\n",
" <td>/dli/task/data/AOI_DL_data_0908/0423618039308/...</td>\n",
" <td>908</td>\n",
" <td>423618039308</td>\n",
" <td>C107</td>\n",
" <td>(84, 32, 3)</td>\n",
" <td>D1_C107.jpg</td>\n",
" <td>C</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" true_defect defect_img_path date \\\n",
"77 defect /dli/task/data/AOI_DL_data_0908/0423618041671/... 908 \n",
"89 defect /dli/task/data/AOI_DL_data_0908/0423618042253/... 908 \n",
"122 defect /dli/task/data/AOI_DL_data_0908/0423618039275/... 908 \n",
"225 defect /dli/task/data/AOI_DL_data_0908/0423618040901/... 908 \n",
"227 defect /dli/task/data/AOI_DL_data_0908/0423618039308/... 908 \n",
"\n",
" board comp_id img_shape defect_image_name comp_type \n",
"77 423618041671 R511 (132, 52, 3) D1_R511.jpg R \n",
"89 423618042253 R1318 (88, 35, 3) D1_R1318.jpg R \n",
"122 423618039275 C517 (387, 171, 3) D1_C517.jpg C \n",
"225 423618040901 R176 (36, 87, 3) D0_R176.jpg R \n",
"227 423618039308 C107 (84, 32, 3) D1_C107.jpg C "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 1.3\n",
"cqru_df=verified_df[verified_df['comp_type'].isin([\"C\", \"Q\", \"R\", \"U\"])]\n",
"cqru_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "fa67e90e-876c-4280-81d6-13452b6bae82",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"comp_type\n",
"C 99\n",
"R 12\n",
"U 8\n",
"dtype: int64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 1.4\n",
"# DO NOT CHANGE THIS CELL\n",
"# check sample size\n",
"cqru_df.groupby('comp_type').size()"
]
},
{
"cell_type": "markdown",
"id": "c569654d-7fe0-4af4-b8ea-d2326bb684a2",
"metadata": {},
"source": [
"### Step 2: Prepare TAO Experiment ###\n",
"Next we will prepare for the TAO experiment. \n",
"\n",
"**Instructions**: <br>\n",
"2.1 Execute the below cell to set environment variables. <br>\n",
"2.2 Execute the cell below to map up local directories to the TAO docker. <br>\n",
"2.3 Execute the cell below to use the `ngc registry mode list` command that lists all available `classification` models. <br>\n",
"2.4 Modify the `<FIXME>` only and execute the cell below to download the `VGG19` pre-trained weights. <br>\n",
"2.5 Execute the cell below to view the pre-trained model. <br>\n",
"2.6 Execute the cell below to create the required data directories. <br>\n",
"2.7 Execute the cell below to create a 70%/30% split for train and val. <br>\n",
"2.8 Execute the cell below to copy data from the source to the TAO experiment folder. "
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "e55f23d5-5509-4a22-8d8b-b2c9612d75c3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: KEY=my_model_key\n",
"env: LOCAL_PROJECT_DIR=/dli/task/tao_project\n",
"env: LOCAL_DATA_DIR=/dli/task/tao_project/data\n",
"env: LOCAL_SPECS_DIR=/dli/task/tao_project/spec_files\n",
"env: TAO_PROJECT_DIR=/workspace/tao-experiments\n",
"env: TAO_DATA_DIR=/workspace/tao-experiments/data\n",
"env: TAO_SPECS_DIR=/workspace/tao-experiments/spec_files\n"
]
}
],
"source": [
"# 2.1\n",
"# DO NOT CHANGE THIS CELL\n",
"# set environment variables\n",
"%set_env KEY=my_model_key\n",
"\n",
"%set_env LOCAL_PROJECT_DIR=/dli/task/tao_project\n",
"%set_env LOCAL_DATA_DIR=/dli/task/tao_project/data\n",
"%set_env LOCAL_SPECS_DIR=/dli/task/tao_project/spec_files\n",
"os.environ[\"LOCAL_EXPERIMENT_DIR\"]=os.path.join(os.getenv(\"LOCAL_PROJECT_DIR\"), \"classification\")\n",
"\n",
"%set_env TAO_PROJECT_DIR=/workspace/tao-experiments\n",
"%set_env TAO_DATA_DIR=/workspace/tao-experiments/data\n",
"%set_env TAO_SPECS_DIR=/workspace/tao-experiments/spec_files\n",
"os.environ['TAO_EXPERIMENT_DIR']=os.path.join(os.getenv(\"TAO_PROJECT_DIR\"), \"classification\")\n",
"\n",
"# make the data directory\n",
"!mkdir -p $LOCAL_DATA_DIR"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "bb3a6cbe-430d-4c54-8897-64aa5d41a2b4",
"metadata": {},
"outputs": [],
"source": [
"# 2.2\n",
"# DO NOT CHANGE THIS CELL\n",
"# map local directories to the TAO docker\n",
"mounts_file = os.path.expanduser(\"~/.tao_mounts.json\")\n",
"\n",
"drive_map = {\n",
" \"Mounts\": [\n",
" # Mapping the data directory\n",
" {\n",
" \"source\": os.environ[\"LOCAL_PROJECT_DIR\"],\n",
" \"destination\": \"/workspace/tao-experiments\"\n",
" },\n",
" # Mapping the specs directory.\n",
" {\n",
" \"source\": os.environ[\"LOCAL_SPECS_DIR\"],\n",
" \"destination\": os.environ[\"TAO_SPECS_DIR\"]\n",
" },\n",
" # Mapping the data directory.\n",
" {\n",
" \"source\": os.environ[\"LOCAL_DATA_DIR\"],\n",
" \"destination\": os.environ[\"TAO_DATA_DIR\"]\n",
" },\n",
" ],\n",
" \"DockerOptions\": {\n",
" \"user\": \"{}:{}\".format(os.getuid(), os.getgid())\n",
" }\n",
"}\n",
"\n",
"# writing the mounts file\n",
"with open(mounts_file, \"w\") as mfile:\n",
" json.dump(drive_map, mfile, indent=4)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "0ebc8c2a-bb02-4515-8923-1cb6f53b2bef",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" \"versionId\": \"vgg19\"\n"
]
}
],
"source": [
"# 2.3\n",
"# DO NOT CHANGE THIS CELL\n",
"!ngc registry model list nvidia/tao/pretrained_classification:* | grep vgg19"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "548bd5b4-0e54-48f7-82d1-549623cd92db",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\n",
" \"download_end\": \"2025-12-25 08:11:02\",\n",
" \"download_start\": \"2025-12-25 08:11:00\",\n",
" \"download_time\": \"2s\",\n",
" \"files_downloaded\": 1,\n",
" \"local_path\": \"/dli/task/tao_project/classification/pretrained_vgg19/pretrained_classification_vvgg19\",\n",
" \"size_downloaded\": \"153.72 MB\",\n",
" \"status\": \"COMPLETED\"\n",
"}\n"
]
}
],
"source": [
"# 2.4\n",
"# create directory to store the pre-trained model\n",
"!mkdir -p $LOCAL_EXPERIMENT_DIR/pretrained_vgg19/\n",
"\n",
"# download the pre-trained vgg19 model from NGC\n",
"!ngc registry model download-version nvidia/tao/pretrained_classification:vgg19 --dest $LOCAL_EXPERIMENT_DIR/pretrained_vgg19"
]
},
{
"cell_type": "markdown",
"id": "b1cc0cf5-4c9d-476e-a302-6a175fc04d3a",
"metadata": {},
"source": [
"<p><img src='images/tip.png' width=720></p>\n",
"\n",
"We designated the model to be downloaded to `tao_project/classification/pretrained_vgg19`, which is mapped to `/workspace/tao-experiments/classification/pretrained_vgg19` in the TAO container based on the mapping of `LOCAL_EXPERIMENT_DIR` to `TAO_EXPERIMENT_DIR`. Looking at the `local_path` and `transfer_id` keys of the output JSON, we can gather that the path of the pre-trained model should be in the `tao_project/classification/pretrained_vgg19/pretrained_classification_vvgg19` directory. When referencing paths for the TAO Toolkit, it's important to use paths based on the TAO container. In this case it would be `/workspace/tao-experiments/classification/pretrained_vgg19/pretrained_classification_vvgg19`. "
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "e7655abf-8c17-4c85-86cb-8f594e932f61",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"total 157416\n",
"drwxr-xr-x 2 root root 4096 Dec 25 08:11 .\n",
"drwxr-xr-x 3 root root 4096 Dec 25 08:11 ..\n",
"-rw-r--r-- 1 root root 161183816 Dec 25 08:11 vgg_19.hdf5\n"
]
}
],
"source": [
"# 2.5\n",
"# DO NOT CHANGE THIS CELL\n",
"!ls -al tao_project/classification/pretrained_vgg19/pretrained_classification_vvgg19"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "2538dd6b-51bb-4347-b48b-fe1c1ee69dda",
"metadata": {},
"outputs": [],
"source": [
"# 2.6\n",
"# DO NOT CHANGE THIS CELL\n",
"# remove existing data from previous experiment (if any)\n",
"!rm -rf $LOCAL_DATA_DIR/*\n",
"\n",
"!mkdir -p $LOCAL_DATA_DIR/train/Q\n",
"!mkdir -p $LOCAL_DATA_DIR/train/C\n",
"!mkdir -p $LOCAL_DATA_DIR/train/U\n",
"!mkdir -p $LOCAL_DATA_DIR/train/R\n",
"!mkdir -p $LOCAL_DATA_DIR/val/Q\n",
"!mkdir -p $LOCAL_DATA_DIR/val/C\n",
"!mkdir -p $LOCAL_DATA_DIR/val/U\n",
"!mkdir -p $LOCAL_DATA_DIR/val/R"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "1521c5f5-3f0c-461e-a561-664dc68d8ef3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"data_set comp_type\n",
"train C 69\n",
" R 8\n",
" U 6\n",
"val C 30\n",
" R 4\n",
" U 2\n",
"dtype: int64"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 2.7\n",
"# DO NOT CHANGE THIS CELL\n",
"# set default as training set\n",
"cqru_df['data_set']='train'\n",
"\n",
"# sample 30% and set as validation set\n",
"val_set=cqru_df.groupby('comp_type', group_keys=False).apply(lambda x: x.sample(frac=0.3))\n",
"cqru_df.loc[val_set.index, 'data_set']='val'\n",
"cqru_df.groupby(['data_set', 'comp_type']).size()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "65f67e2b-0b15-4264-bc71-f08423236ff0",
"metadata": {},
"outputs": [],
"source": [
"# 2.8\n",
"# DO NOT CHANGE THIS CELL\n",
"# iterate through the DataFrame and copy images\n",
"for idx, row in cqru_df.iterrows(): \n",
" shutil.copyfile(row['defect_img_path'], f\"{os.environ['LOCAL_DATA_DIR']}/{row['data_set']}/{row['comp_type']}/{row['date']}_{row['board']}_{row['defect_image_name']}\")"
]
},
{
"cell_type": "markdown",
"id": "455daecb-fbd1-4e1e-a831-68b4672f10ed",
"metadata": {},
"source": [
"### Step 3: Model Training ###\n",
"The next step is to modify the configuration file that will be used for `train`. You can create a new text file for this purpose manually and start from scratch or use the [template provided](tao_project/spec_files/vgg19/config.txt). You can also refer to sample applications and configuration files [here](https://docs.nvidia.com/tao/tao-toolkit/text/image_classification.html). \n",
"\n",
"**Instructions**: <br>\n",
"3.1. Open and review the [configuration file](tao_project/spec_files/vgg19/config.txt). <br>\n",
"3.2. Modify the `<FIXME>`s only in the configuration file with the correct values and **save changes**. We recommend starting with a very low epoch count (e.g. 5) in the interest of time as each epoch can take ~100s to complete. <br>\n",
"* Recall that you don't need the `eval_config` section of the configuration file, which requires you to know the trained model path. Of course, if you know where you would like to place the model, you can go ahead and complete this section. \n",
"3.3 Execute the cell below to initiate model training. \n",
"\n",
"<p><img src='images/tip.png' width=720></p>\n",
"\n",
"Based on how NGC names the pre-trained model downloaded, we should use `/workspace/tao-experiments/classification/pretrained_vgg19/pretrained_classification_vvgg19/resnet_19.hdf5` to reference the pre-trained model. Furthermore, we can choose where to store the trained model - in this case we use `/workspace/tao-experiments/classification/vgg19` inside of the TAO container, which is mapped to `tao_project/classification/vgg19` in our local drive. Furthermore, the trained model name will follow the format `<model_arch>_0<last_epoch_count>.tlt`, unless specified otherwise. Therefore we should use `/workspace/tao-experiments/classification/vgg19/weights/vgg_XXX.tlt`, depending on `n_epochs` in the model configuration. "
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "b3fba5b6-ee35-48ab-9f09-6608c9388685",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2025-12-25 08:12:15,455 [TAO Toolkit] [INFO] root 160: Registry: ['nvcr.io']\n",
"2025-12-25 08:12:15,571 [TAO Toolkit] [INFO] nvidia_tao_cli.components.instance_handler.local_instance 360: Running command in container: nvcr.io/nvidia/tao/tao-toolkit:5.0.0-tf1.15.5\n",
"2025-12-25 08:12:15,585 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 301: Printing tty value True\n",
"Using TensorFlow backend.\n",
"2025-12-25 08:12:19.137732: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:12:19,192 [TAO Toolkit] [WARNING] tensorflow 40: Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"2025-12-25 08:12:20,435 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:12:20,480 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:12:20,485 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:12:22.915615: I tensorflow/core/platform/profile_utils/cpu_utils.cc:109] CPU Frequency: 2499995000 Hz\n",
"2025-12-25 08:12:22.916044: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x94ff9c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:12:22.916081: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2025-12-25 08:12:22.917680: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcuda.so.1\n",
"2025-12-25 08:12:23.126385: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.128650: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x931ad70 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:12:23.128691: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla T4, Compute Capability 7.5\n",
"2025-12-25 08:12:23.129062: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.131127: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1674] Found device 0 with properties: \n",
"name: Tesla T4 major: 7 minor: 5 memoryClockRate(GHz): 1.59\n",
"pciBusID: 0000:00:1e.0\n",
"2025-12-25 08:12:23.131197: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:12:23.131354: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcublas.so.12\n",
"2025-12-25 08:12:23.156801: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcufft.so.11\n",
"2025-12-25 08:12:23.156994: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcurand.so.10\n",
"2025-12-25 08:12:23.266050: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusolver.so.11\n",
"2025-12-25 08:12:23.278372: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusparse.so.12\n",
"2025-12-25 08:12:23.278549: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudnn.so.8\n",
"2025-12-25 08:12:23.278734: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.281070: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.283097: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1802] Adding visible gpu devices: 0\n",
"2025-12-25 08:12:23.283184: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:12:23.294084: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1214] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2025-12-25 08:12:23.294141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1220] 0 \n",
"2025-12-25 08:12:23.294170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1233] 0: N \n",
"2025-12-25 08:12:23.294526: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.296800: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:12:23.298874: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1359] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13496 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5)\n",
"Using TensorFlow backend.\n",
"WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"WARNING:tensorflow:TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:12:25,095 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"WARNING:tensorflow:TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:12:25,137 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"WARNING:tensorflow:TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:12:25,140 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:12:26,694 [TAO Toolkit] [INFO] __main__ 388: Loading experiment spec at /workspace/tao-experiments/spec_files/vgg19/config.txt.\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:398: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"2025-12-25 08:12:26,697 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:398: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:407: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"2025-12-25 08:12:26,698 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:407: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.\n",
"\n",
"2025-12-25 08:12:27,054 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.\n",
"\n",
"2025-12-25 08:12:27,054 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.\n",
"\n",
"2025-12-25 08:12:27,055 [TAO Toolkit] [INFO] __main__ 478: Default image mean [103.939, 116.779, 123.68] will be used.\n",
"Found 83 images belonging to 4 classes.\n",
"2025-12-25 08:12:27,073 [TAO Toolkit] [INFO] __main__ 294: Processing dataset (train): /workspace/tao-experiments/data/train\n",
"Found 36 images belonging to 4 classes.\n",
"2025-12-25 08:12:27,078 [TAO Toolkit] [INFO] __main__ 311: Processing dataset (validation): /workspace/tao-experiments/data/val\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"2025-12-25 08:12:27,078 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"2025-12-25 08:12:27,079 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"2025-12-25 08:12:27,083 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/third_party/keras/tensorflow_backend.py:199: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.\n",
"\n",
"2025-12-25 08:12:27,215 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/third_party/keras/tensorflow_backend.py:199: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"2025-12-25 08:12:27,408 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"2025-12-25 08:12:27,408 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:199: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"2025-12-25 08:12:27,408 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:199: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:206: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n",
"2025-12-25 08:12:27,493 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:206: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.\n",
"\n",
"2025-12-25 08:12:27,907 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"2025-12-25 08:12:27,913 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"_________________________________________________________________\n",
"Layer (type) Output Shape Param # \n",
"=================================================================\n",
"input_1 (InputLayer) (None, 3, 224, 224) 0 \n",
"_________________________________________________________________\n",
"block_1a_conv_1 (Conv2D) (None, 64, 224, 224) 1728 \n",
"_________________________________________________________________\n",
"block_1a_relu (Activation) (None, 64, 224, 224) 0 \n",
"_________________________________________________________________\n",
"block_1b_conv_1 (Conv2D) (None, 64, 224, 224) 36864 \n",
"_________________________________________________________________\n",
"block_1b_relu (Activation) (None, 64, 224, 224) 0 \n",
"_________________________________________________________________\n",
"block_2a_conv_1 (Conv2D) (None, 128, 112, 112) 73728 \n",
"_________________________________________________________________\n",
"block_2a_relu (Activation) (None, 128, 112, 112) 0 \n",
"_________________________________________________________________\n",
"block_2b_conv_1 (Conv2D) (None, 128, 112, 112) 147456 \n",
"_________________________________________________________________\n",
"block_2b_relu (Activation) (None, 128, 112, 112) 0 \n",
"_________________________________________________________________\n",
"block_3a_conv_1 (Conv2D) (None, 256, 56, 56) 294912 \n",
"_________________________________________________________________\n",
"block_3a_relu (Activation) (None, 256, 56, 56) 0 \n",
"_________________________________________________________________\n",
"block_3b_conv_1 (Conv2D) (None, 256, 56, 56) 589824 \n",
"_________________________________________________________________\n",
"block_3b_relu (Activation) (None, 256, 56, 56) 0 \n",
"_________________________________________________________________\n",
"block_3c_conv_1 (Conv2D) (None, 256, 56, 56) 589824 \n",
"_________________________________________________________________\n",
"block_3c_relu (Activation) (None, 256, 56, 56) 0 \n",
"_________________________________________________________________\n",
"block_3d_conv_1 (Conv2D) (None, 256, 56, 56) 589824 \n",
"_________________________________________________________________\n",
"block_3d_relu (Activation) (None, 256, 56, 56) 0 \n",
"_________________________________________________________________\n",
"block_4a_conv_1 (Conv2D) (None, 512, 28, 28) 1179648 \n",
"_________________________________________________________________\n",
"block_4a_relu (Activation) (None, 512, 28, 28) 0 \n",
"_________________________________________________________________\n",
"block_4b_conv_1 (Conv2D) (None, 512, 28, 28) 2359296 \n",
"_________________________________________________________________\n",
"block_4b_relu (Activation) (None, 512, 28, 28) 0 \n",
"_________________________________________________________________\n",
"block_4c_conv_1 (Conv2D) (None, 512, 28, 28) 2359296 \n",
"_________________________________________________________________\n",
"block_4c_relu (Activation) (None, 512, 28, 28) 0 \n",
"_________________________________________________________________\n",
"block_4d_conv_1 (Conv2D) (None, 512, 28, 28) 2359296 \n",
"_________________________________________________________________\n",
"block_4d_relu (Activation) (None, 512, 28, 28) 0 \n",
"_________________________________________________________________\n",
"block_5a_conv_1 (Conv2D) (None, 512, 14, 14) 2359296 \n",
"_________________________________________________________________\n",
"block_5a_relu (Activation) (None, 512, 14, 14) 0 \n",
"_________________________________________________________________\n",
"block_5b_conv_1 (Conv2D) (None, 512, 14, 14) 2359296 \n",
"_________________________________________________________________\n",
"block_5b_relu (Activation) (None, 512, 14, 14) 0 \n",
"_________________________________________________________________\n",
"block_5c_conv_1 (Conv2D) (None, 512, 14, 14) 2359296 \n",
"_________________________________________________________________\n",
"block_5c_relu (Activation) (None, 512, 14, 14) 0 \n",
"_________________________________________________________________\n",
"block_5d_conv_1 (Conv2D) (None, 512, 14, 14) 2359296 \n",
"_________________________________________________________________\n",
"block_5d_relu (Activation) (None, 512, 14, 14) 0 \n",
"_________________________________________________________________\n",
"avg_pool (AveragePooling2D) (None, 512, 1, 1) 0 \n",
"_________________________________________________________________\n",
"flatten (Flatten) (None, 512) 0 \n",
"_________________________________________________________________\n",
"predictions (Dense) (None, 4) 2052 \n",
"=================================================================\n",
"Total params: 20,020,932\n",
"Trainable params: 20,020,932\n",
"Non-trainable params: 0\n",
"_________________________________________________________________\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
"\n",
"2025-12-25 08:12:31,681 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:3295: The name tf.log is deprecated. Please use tf.math.log instead.\n",
"\n",
"2025-12-25 08:12:31,692 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:3295: The name tf.log is deprecated. Please use tf.math.log instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1133: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n",
"\n",
"2025-12-25 08:12:31,709 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1133: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n",
"\n",
"2025-12-25 08:12:31,710 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.logging.logging 197: Log file already exists at /workspace/tao-experiments/classification/vgg19/status.json\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:986: The name tf.assign_add is deprecated. Please use tf.compat.v1.assign_add instead.\n",
"\n",
"2025-12-25 08:12:32,115 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:986: The name tf.assign_add is deprecated. Please use tf.compat.v1.assign_add instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:973: The name tf.assign is deprecated. Please use tf.compat.v1.assign instead.\n",
"\n",
"2025-12-25 08:12:32,162 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:973: The name tf.assign is deprecated. Please use tf.compat.v1.assign instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1181: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.\n",
"\n",
"2025-12-25 08:12:32,684 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1181: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.\n",
"\n",
"2025-12-25 08:12:32,971 [TAO Toolkit] [INFO] root 2102: Starting Training Loop.\n",
"Epoch 1/5\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:199: The name tf.Summary is deprecated. Please use tf.compat.v1.Summary instead.\n",
"\n",
"2025-12-25 08:13:12,841 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:199: The name tf.Summary is deprecated. Please use tf.compat.v1.Summary instead.\n",
"\n",
"3/3 [==============================] - 105s 35s/step - loss: 15.7107 - acc: 0.0378 - val_loss: 14.5815 - val_acc: 0.1111\n",
"2025-12-25 08:14:21,408 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 2/5\n",
"3/3 [==============================] - 19s 6s/step - loss: 15.3260 - acc: 0.0649 - val_loss: 14.5828 - val_acc: 0.1111\n",
"2025-12-25 08:14:42,049 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 3/5\n",
"3/3 [==============================] - 2s 563ms/step - loss: 14.8060 - acc: 0.0973 - val_loss: 14.5841 - val_acc: 0.1111\n",
"2025-12-25 08:14:44,103 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 4/5\n",
"3/3 [==============================] - 2s 565ms/step - loss: 14.8935 - acc: 0.0919 - val_loss: 14.5854 - val_acc: 0.1111\n",
"2025-12-25 08:14:46,015 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 5/5\n",
"3/3 [==============================] - 2s 568ms/step - loss: 14.8947 - acc: 0.0919 - val_loss: 14.5864 - val_acc: 0.1111\n",
"2025-12-25 08:14:47,929 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"2025-12-25 08:14:47,933 [TAO Toolkit] [INFO] root 2102: Training loop complete.\n",
"2025-12-25 08:14:47,937 [TAO Toolkit] [INFO] root 2102: Final model evaluation in progress.\n",
"2025-12-25 08:14:48,449 [TAO Toolkit] [INFO] root 2102: Model evaluation is complete.\n",
"2025-12-25 08:14:48,450 [TAO Toolkit] [INFO] __main__ 625: Total Val Loss: 14.586379051208496\n",
"2025-12-25 08:14:48,450 [TAO Toolkit] [INFO] __main__ 626: Total Val accuracy: 0.1111111119389534\n",
"2025-12-25 08:14:48,450 [TAO Toolkit] [INFO] root 2102: Training finished successfully.\n",
"2025-12-25 08:14:48,450 [TAO Toolkit] [INFO] __main__ 651: Training finished successfully.\n",
"Telemetry data couldn't be sent, but the command ran successfully.\n",
"[WARNING]: <urlopen error Url for the certificates not found.>\n",
"Execution status: PASS\n",
"2025-12-25 08:15:11,119 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 363: Stopping container.\n"
]
}
],
"source": [
"# 3.2\n",
"# DO NOT CHANGE THIS CELL\n",
"# train model\n",
"!tao model classification_tf1 train -e $TAO_SPECS_DIR/vgg19/config.txt \\\n",
" -r $TAO_EXPERIMENT_DIR/vgg19 \\\n",
" -k $KEY"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "9508c989-db0f-4f67-a2c0-bb36127e5e07",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"total 765M\n",
"-rw-r--r-- 1 root root 153M Dec 25 08:14 vgg_001.hdf5\n",
"-rw-r--r-- 1 root root 153M Dec 25 08:14 vgg_002.hdf5\n",
"-rw-r--r-- 1 root root 153M Dec 25 08:14 vgg_003.hdf5\n",
"-rw-r--r-- 1 root root 153M Dec 25 08:14 vgg_004.hdf5\n",
"-rw-r--r-- 1 root root 153M Dec 25 08:14 vgg_005.hdf5\n"
]
}
],
"source": [
"!ls -ltrh $LOCAL_EXPERIMENT_DIR/vgg19/weights/"
]
},
{
"cell_type": "markdown",
"id": "96d92840-c3cd-4b9a-b025-c47d1bbb2f32",
"metadata": {},
"source": [
"### Step 4: Model Evaluation ###\n",
"The last step for the assessment is to `evaluate` the model through the `eval_config` section of the configuration file. Once completed, you should submit the output log for assessment. \n",
"\n",
"**Instructions**: <br>\n",
"4.1 Review the [configuration file](tao_project/spec_files/vgg19/config.txt) and modify the `eval_config` section if needed. <br>\n",
"4.2 Execute the below cell to evaluate the model. A log file will be generated through the use of the `--log_file` option, which will be used for grading purposes. <br>\n",
"4.3 Execute the cell below to submit the log for assessment. "
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "b637cba7-5394-4671-b6c9-49df0ff7303d",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2025-12-25 08:15:16,580 [TAO Toolkit] [INFO] root 160: Registry: ['nvcr.io']\n",
"2025-12-25 08:15:16,702 [TAO Toolkit] [INFO] nvidia_tao_cli.components.instance_handler.local_instance 360: Running command in container: nvcr.io/nvidia/tao/tao-toolkit:5.0.0-tf1.15.5\n",
"2025-12-25 08:15:16,723 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 301: Printing tty value True\n",
"Using TensorFlow backend.\n",
"2025-12-25 08:15:17.804692: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:15:17,864 [TAO Toolkit] [WARNING] tensorflow 40: Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"2025-12-25 08:15:20,106 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:15:20,215 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:15:20,229 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:15:22.911665: I tensorflow/core/platform/profile_utils/cpu_utils.cc:109] CPU Frequency: 2499995000 Hz\n",
"2025-12-25 08:15:22.912129: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7a28d60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:15:22.912168: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2025-12-25 08:15:22.913747: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcuda.so.1\n",
"2025-12-25 08:15:23.117897: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.120230: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7844110 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:15:23.120272: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla T4, Compute Capability 7.5\n",
"2025-12-25 08:15:23.120634: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.122956: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1674] Found device 0 with properties: \n",
"name: Tesla T4 major: 7 minor: 5 memoryClockRate(GHz): 1.59\n",
"pciBusID: 0000:00:1e.0\n",
"2025-12-25 08:15:23.123034: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:15:23.123156: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcublas.so.12\n",
"2025-12-25 08:15:23.125305: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcufft.so.11\n",
"2025-12-25 08:15:23.125472: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcurand.so.10\n",
"2025-12-25 08:15:23.129061: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusolver.so.11\n",
"2025-12-25 08:15:23.130332: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusparse.so.12\n",
"2025-12-25 08:15:23.130431: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudnn.so.8\n",
"2025-12-25 08:15:23.130597: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.132718: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.134652: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1802] Adding visible gpu devices: 0\n",
"2025-12-25 08:15:23.134725: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:15:23.144179: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1214] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2025-12-25 08:15:23.144236: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1220] 0 \n",
"2025-12-25 08:15:23.144251: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1233] 0: N \n",
"2025-12-25 08:15:23.144583: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.146756: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:15:23.148724: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1359] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13496 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5)\n",
"Telemetry data couldn't be sent, but the command ran successfully.\n",
"[WARNING]: <urlopen error Url for the certificates not found.>\n",
"Execution status: PASS\n",
"2025-12-25 08:16:16,727 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 363: Stopping container.\n"
]
}
],
"source": [
"# 4.1\n",
"# DO NOT CHANGE THIS CELL\n",
"# evaluate the model using the same validation set as training\n",
"!tao model classification_tf1 evaluate -e $TAO_SPECS_DIR/vgg19/config.txt\\\n",
" -k $KEY \\\n",
" --log_file $TAO_PROJECT_DIR/log_file.txt"
]
},
{
"cell_type": "raw",
"id": "da01ece6-6169-42a3-8738-155e82387854",
"metadata": {},
"source": [
"Confusion Matrix\n",
"[[ 0 30 0]\n",
" [ 0 4 0]\n",
" [ 0 2 0]]\n",
"Classification Report\n",
" precision recall f1-score support\n",
"\n",
" C 0.00 0.00 0.00 30\n",
" Q 0.00 0.00 0.00 0\n",
" R 0.11 1.00 0.20 4\n",
" U 0.00 0.00 0.00 2\n",
"\n",
" micro avg 0.11 0.11 0.11 36\n",
" macro avg 0.03 0.25 0.05 36\n",
"weighted avg 0.01 0.11 0.02 36\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "cd519ab8-32bb-468e-9741-38f8da66388e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" \"versionId\": \"resnet50\"\n",
" \"versionId\": \"resnet34\"\n",
" \"versionId\": \"resnet18\"\n",
" \"versionId\": \"resnet101\"\n",
" \"versionId\": \"resnet10\"\n"
]
}
],
"source": [
"!ngc registry model list nvidia/tao/pretrained_classification:* | grep resnet"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "60c26e8e-fc98-46ce-8aaa-ff976d64df6e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\n",
" \"download_end\": \"2025-12-25 08:25:07\",\n",
" \"download_start\": \"2025-12-25 08:25:05\",\n",
" \"download_time\": \"2s\",\n",
" \"files_downloaded\": 1,\n",
" \"local_path\": \"/dli/task/tao_project/classification/pretrained_resnet50/pretrained_classification_vresnet50\",\n",
" \"size_downloaded\": \"294.2 MB\",\n",
" \"status\": \"COMPLETED\"\n",
"}\n"
]
}
],
"source": [
"!ngc registry model download-version nvidia/tao/pretrained_classification:resnet50 --dest $LOCAL_EXPERIMENT_DIR/pretrained_resnet50"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "960997de-4756-4d76-9c3c-b9be2a0adff6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2025-12-25 08:44:12,756 [TAO Toolkit] [INFO] root 160: Registry: ['nvcr.io']\n",
"2025-12-25 08:44:12,876 [TAO Toolkit] [INFO] nvidia_tao_cli.components.instance_handler.local_instance 360: Running command in container: nvcr.io/nvidia/tao/tao-toolkit:5.0.0-tf1.15.5\n",
"2025-12-25 08:44:12,889 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 301: Printing tty value True\n",
"Using TensorFlow backend.\n",
"2025-12-25 08:44:13.844067: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:44:13,896 [TAO Toolkit] [WARNING] tensorflow 40: Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"2025-12-25 08:44:15,105 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:44:15,149 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:44:15,154 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:44:17.201067: I tensorflow/core/platform/profile_utils/cpu_utils.cc:109] CPU Frequency: 2499995000 Hz\n",
"2025-12-25 08:44:17.201471: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x8b60d30 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:44:17.201505: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2025-12-25 08:44:17.203226: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcuda.so.1\n",
"2025-12-25 08:44:17.386188: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.388107: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x897c0e0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:44:17.388148: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla T4, Compute Capability 7.5\n",
"2025-12-25 08:44:17.388607: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.390410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1674] Found device 0 with properties: \n",
"name: Tesla T4 major: 7 minor: 5 memoryClockRate(GHz): 1.59\n",
"pciBusID: 0000:00:1e.0\n",
"2025-12-25 08:44:17.390475: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:44:17.390574: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcublas.so.12\n",
"2025-12-25 08:44:17.392789: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcufft.so.11\n",
"2025-12-25 08:44:17.392911: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcurand.so.10\n",
"2025-12-25 08:44:17.396667: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusolver.so.11\n",
"2025-12-25 08:44:17.398009: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusparse.so.12\n",
"2025-12-25 08:44:17.398106: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudnn.so.8\n",
"2025-12-25 08:44:17.398264: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.400147: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.401844: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1802] Adding visible gpu devices: 0\n",
"2025-12-25 08:44:17.401923: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:44:17.411218: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1214] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2025-12-25 08:44:17.411285: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1220] 0 \n",
"2025-12-25 08:44:17.411301: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1233] 0: N \n",
"2025-12-25 08:44:17.411642: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.413618: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:44:17.415368: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1359] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13496 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5)\n",
"Using TensorFlow backend.\n",
"WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"WARNING:tensorflow:TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:44:19,075 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"WARNING:tensorflow:TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:44:19,118 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"WARNING:tensorflow:TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:44:19,121 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:44:20,450 [TAO Toolkit] [INFO] __main__ 388: Loading experiment spec at /workspace/tao-experiments/spec_files/resnet50/config.txt.\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:398: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"2025-12-25 08:44:20,455 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:398: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:407: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"2025-12-25 08:44:20,455 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:407: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"2025-12-25 08:44:20,810 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.logging.logging 197: Log file already exists at /workspace/tao-experiments/classification/resnet50/status.json\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.\n",
"\n",
"2025-12-25 08:44:20,810 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.\n",
"\n",
"2025-12-25 08:44:20,810 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/train.py:431: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.\n",
"\n",
"2025-12-25 08:44:20,811 [TAO Toolkit] [INFO] __main__ 478: Default image mean [103.939, 116.779, 123.68] will be used.\n",
"Found 83 images belonging to 4 classes.\n",
"2025-12-25 08:44:20,819 [TAO Toolkit] [INFO] __main__ 294: Processing dataset (train): /workspace/tao-experiments/data/train\n",
"Found 36 images belonging to 4 classes.\n",
"2025-12-25 08:44:20,822 [TAO Toolkit] [INFO] __main__ 311: Processing dataset (validation): /workspace/tao-experiments/data/val\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"2025-12-25 08:44:20,823 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"2025-12-25 08:44:20,823 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"2025-12-25 08:44:20,825 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/third_party/keras/tensorflow_backend.py:199: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.\n",
"\n",
"2025-12-25 08:44:21,192 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/third_party/keras/tensorflow_backend.py:199: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"2025-12-25 08:44:21,852 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"2025-12-25 08:44:21,853 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:190: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:199: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"2025-12-25 08:44:21,853 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:199: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:206: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n",
"2025-12-25 08:44:22,102 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:206: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.\n",
"\n",
"2025-12-25 08:44:22,911 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"2025-12-25 08:44:22,917 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:133: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"__________________________________________________________________________________________________\n",
"Layer (type) Output Shape Param # Connected to \n",
"==================================================================================================\n",
"input_1 (InputLayer) (None, 3, 224, 224) 0 \n",
"__________________________________________________________________________________________________\n",
"conv1 (Conv2D) (None, 64, 112, 112) 9408 input_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"activation_1 (Activation) (None, 64, 112, 112) 0 conv1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_conv_1 (Conv2D) (None, 64, 56, 56) 4096 activation_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_relu_1 (Activation) (None, 64, 56, 56) 0 block_1a_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_conv_2 (Conv2D) (None, 64, 56, 56) 36864 block_1a_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_relu_2 (Activation) (None, 64, 56, 56) 0 block_1a_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_conv_3 (Conv2D) (None, 256, 56, 56) 16384 block_1a_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_conv_shortcut (Conv2D) (None, 256, 56, 56) 16384 activation_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_1 (Add) (None, 256, 56, 56) 0 block_1a_conv_3[0][0] \n",
" block_1a_conv_shortcut[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1a_relu (Activation) (None, 256, 56, 56) 0 add_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_conv_1 (Conv2D) (None, 64, 56, 56) 16384 block_1a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_relu_1 (Activation) (None, 64, 56, 56) 0 block_1b_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_conv_2 (Conv2D) (None, 64, 56, 56) 36864 block_1b_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_relu_2 (Activation) (None, 64, 56, 56) 0 block_1b_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_conv_3 (Conv2D) (None, 256, 56, 56) 16384 block_1b_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_2 (Add) (None, 256, 56, 56) 0 block_1b_conv_3[0][0] \n",
" block_1a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1b_relu (Activation) (None, 256, 56, 56) 0 add_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_conv_1 (Conv2D) (None, 64, 56, 56) 16384 block_1b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_relu_1 (Activation) (None, 64, 56, 56) 0 block_1c_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_conv_2 (Conv2D) (None, 64, 56, 56) 36864 block_1c_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_relu_2 (Activation) (None, 64, 56, 56) 0 block_1c_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_conv_3 (Conv2D) (None, 256, 56, 56) 16384 block_1c_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_3 (Add) (None, 256, 56, 56) 0 block_1c_conv_3[0][0] \n",
" block_1b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_1c_relu (Activation) (None, 256, 56, 56) 0 add_3[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_conv_1 (Conv2D) (None, 128, 28, 28) 32768 block_1c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_relu_1 (Activation) (None, 128, 28, 28) 0 block_2a_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_conv_2 (Conv2D) (None, 128, 28, 28) 147456 block_2a_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_relu_2 (Activation) (None, 128, 28, 28) 0 block_2a_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_conv_3 (Conv2D) (None, 512, 28, 28) 65536 block_2a_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_conv_shortcut (Conv2D) (None, 512, 28, 28) 131072 block_1c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_4 (Add) (None, 512, 28, 28) 0 block_2a_conv_3[0][0] \n",
" block_2a_conv_shortcut[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2a_relu (Activation) (None, 512, 28, 28) 0 add_4[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_conv_1 (Conv2D) (None, 128, 28, 28) 65536 block_2a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_relu_1 (Activation) (None, 128, 28, 28) 0 block_2b_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_conv_2 (Conv2D) (None, 128, 28, 28) 147456 block_2b_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_relu_2 (Activation) (None, 128, 28, 28) 0 block_2b_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_conv_3 (Conv2D) (None, 512, 28, 28) 65536 block_2b_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_5 (Add) (None, 512, 28, 28) 0 block_2b_conv_3[0][0] \n",
" block_2a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2b_relu (Activation) (None, 512, 28, 28) 0 add_5[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_conv_1 (Conv2D) (None, 128, 28, 28) 65536 block_2b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_relu_1 (Activation) (None, 128, 28, 28) 0 block_2c_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_conv_2 (Conv2D) (None, 128, 28, 28) 147456 block_2c_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_relu_2 (Activation) (None, 128, 28, 28) 0 block_2c_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_conv_3 (Conv2D) (None, 512, 28, 28) 65536 block_2c_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_6 (Add) (None, 512, 28, 28) 0 block_2c_conv_3[0][0] \n",
" block_2b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2c_relu (Activation) (None, 512, 28, 28) 0 add_6[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_conv_1 (Conv2D) (None, 128, 28, 28) 65536 block_2c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_relu_1 (Activation) (None, 128, 28, 28) 0 block_2d_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_conv_2 (Conv2D) (None, 128, 28, 28) 147456 block_2d_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_relu_2 (Activation) (None, 128, 28, 28) 0 block_2d_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_conv_3 (Conv2D) (None, 512, 28, 28) 65536 block_2d_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_7 (Add) (None, 512, 28, 28) 0 block_2d_conv_3[0][0] \n",
" block_2c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_2d_relu (Activation) (None, 512, 28, 28) 0 add_7[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_conv_1 (Conv2D) (None, 256, 14, 14) 131072 block_2d_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_relu_1 (Activation) (None, 256, 14, 14) 0 block_3a_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3a_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_relu_2 (Activation) (None, 256, 14, 14) 0 block_3a_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3a_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_conv_shortcut (Conv2D) (None, 1024, 14, 14) 524288 block_2d_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_8 (Add) (None, 1024, 14, 14) 0 block_3a_conv_3[0][0] \n",
" block_3a_conv_shortcut[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3a_relu (Activation) (None, 1024, 14, 14) 0 add_8[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_conv_1 (Conv2D) (None, 256, 14, 14) 262144 block_3a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_relu_1 (Activation) (None, 256, 14, 14) 0 block_3b_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3b_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_relu_2 (Activation) (None, 256, 14, 14) 0 block_3b_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3b_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_9 (Add) (None, 1024, 14, 14) 0 block_3b_conv_3[0][0] \n",
" block_3a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3b_relu (Activation) (None, 1024, 14, 14) 0 add_9[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_conv_1 (Conv2D) (None, 256, 14, 14) 262144 block_3b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_relu_1 (Activation) (None, 256, 14, 14) 0 block_3c_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3c_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_relu_2 (Activation) (None, 256, 14, 14) 0 block_3c_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3c_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_10 (Add) (None, 1024, 14, 14) 0 block_3c_conv_3[0][0] \n",
" block_3b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3c_relu (Activation) (None, 1024, 14, 14) 0 add_10[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_conv_1 (Conv2D) (None, 256, 14, 14) 262144 block_3c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_relu_1 (Activation) (None, 256, 14, 14) 0 block_3d_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3d_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_relu_2 (Activation) (None, 256, 14, 14) 0 block_3d_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3d_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_11 (Add) (None, 1024, 14, 14) 0 block_3d_conv_3[0][0] \n",
" block_3c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3d_relu (Activation) (None, 1024, 14, 14) 0 add_11[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_conv_1 (Conv2D) (None, 256, 14, 14) 262144 block_3d_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_relu_1 (Activation) (None, 256, 14, 14) 0 block_3e_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3e_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_relu_2 (Activation) (None, 256, 14, 14) 0 block_3e_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3e_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_12 (Add) (None, 1024, 14, 14) 0 block_3e_conv_3[0][0] \n",
" block_3d_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3e_relu (Activation) (None, 1024, 14, 14) 0 add_12[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_conv_1 (Conv2D) (None, 256, 14, 14) 262144 block_3e_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_relu_1 (Activation) (None, 256, 14, 14) 0 block_3f_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_conv_2 (Conv2D) (None, 256, 14, 14) 589824 block_3f_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_relu_2 (Activation) (None, 256, 14, 14) 0 block_3f_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_conv_3 (Conv2D) (None, 1024, 14, 14) 262144 block_3f_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_13 (Add) (None, 1024, 14, 14) 0 block_3f_conv_3[0][0] \n",
" block_3e_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_3f_relu (Activation) (None, 1024, 14, 14) 0 add_13[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_conv_1 (Conv2D) (None, 512, 14, 14) 524288 block_3f_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_relu_1 (Activation) (None, 512, 14, 14) 0 block_4a_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_conv_2 (Conv2D) (None, 512, 14, 14) 2359296 block_4a_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_relu_2 (Activation) (None, 512, 14, 14) 0 block_4a_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_conv_3 (Conv2D) (None, 2048, 14, 14) 1048576 block_4a_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_conv_shortcut (Conv2D) (None, 2048, 14, 14) 2097152 block_3f_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_14 (Add) (None, 2048, 14, 14) 0 block_4a_conv_3[0][0] \n",
" block_4a_conv_shortcut[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4a_relu (Activation) (None, 2048, 14, 14) 0 add_14[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_conv_1 (Conv2D) (None, 512, 14, 14) 1048576 block_4a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_relu_1 (Activation) (None, 512, 14, 14) 0 block_4b_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_conv_2 (Conv2D) (None, 512, 14, 14) 2359296 block_4b_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_relu_2 (Activation) (None, 512, 14, 14) 0 block_4b_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_conv_3 (Conv2D) (None, 2048, 14, 14) 1048576 block_4b_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_15 (Add) (None, 2048, 14, 14) 0 block_4b_conv_3[0][0] \n",
" block_4a_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4b_relu (Activation) (None, 2048, 14, 14) 0 add_15[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_conv_1 (Conv2D) (None, 512, 14, 14) 1048576 block_4b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_relu_1 (Activation) (None, 512, 14, 14) 0 block_4c_conv_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_conv_2 (Conv2D) (None, 512, 14, 14) 2359296 block_4c_relu_1[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_relu_2 (Activation) (None, 512, 14, 14) 0 block_4c_conv_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_conv_3 (Conv2D) (None, 2048, 14, 14) 1048576 block_4c_relu_2[0][0] \n",
"__________________________________________________________________________________________________\n",
"add_16 (Add) (None, 2048, 14, 14) 0 block_4c_conv_3[0][0] \n",
" block_4b_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"block_4c_relu (Activation) (None, 2048, 14, 14) 0 add_16[0][0] \n",
"__________________________________________________________________________________________________\n",
"avg_pool (AveragePooling2D) (None, 2048, 1, 1) 0 block_4c_relu[0][0] \n",
"__________________________________________________________________________________________________\n",
"flatten (Flatten) (None, 2048) 0 avg_pool[0][0] \n",
"__________________________________________________________________________________________________\n",
"predictions (Dense) (None, 4) 8196 flatten[0][0] \n",
"==================================================================================================\n",
"Total params: 23,463,108\n",
"Trainable params: 23,453,700\n",
"Non-trainable params: 9,408\n",
"__________________________________________________________________________________________________\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
"\n",
"2025-12-25 08:44:53,062 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:3295: The name tf.log is deprecated. Please use tf.math.log instead.\n",
"\n",
"2025-12-25 08:44:53,073 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:3295: The name tf.log is deprecated. Please use tf.math.log instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1133: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n",
"\n",
"2025-12-25 08:44:53,100 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1133: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n",
"\n",
"2025-12-25 08:44:53,100 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.logging.logging 197: Log file already exists at /workspace/tao-experiments/classification/resnet50/status.json\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:986: The name tf.assign_add is deprecated. Please use tf.compat.v1.assign_add instead.\n",
"\n",
"2025-12-25 08:44:54,293 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:986: The name tf.assign_add is deprecated. Please use tf.compat.v1.assign_add instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:973: The name tf.assign is deprecated. Please use tf.compat.v1.assign instead.\n",
"\n",
"2025-12-25 08:44:54,436 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/keras/backend/tensorflow_backend.py:973: The name tf.assign is deprecated. Please use tf.compat.v1.assign instead.\n",
"\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1181: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.\n",
"\n",
"2025-12-25 08:44:55,916 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:1181: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.\n",
"\n",
"2025-12-25 08:44:57,086 [TAO Toolkit] [INFO] root 2102: Starting Training Loop.\n",
"Epoch 1/15\n",
"WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:199: The name tf.Summary is deprecated. Please use tf.compat.v1.Summary instead.\n",
"\n",
"2025-12-25 08:45:16,531 [TAO Toolkit] [WARNING] tensorflow 137: From /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py:199: The name tf.Summary is deprecated. Please use tf.compat.v1.Summary instead.\n",
"\n",
"3/3 [==============================] - 30s 10s/step - loss: 2.5789 - acc: 0.5673 - val_loss: 2.8771 - val_acc: 0.8333\n",
"2025-12-25 08:45:36,733 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 2/15\n",
"3/3 [==============================] - 1s 313ms/step - loss: 3.0641 - acc: 0.8217 - val_loss: 2.8772 - val_acc: 0.8333\n",
"2025-12-25 08:45:42,533 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 3/15\n",
"3/3 [==============================] - 1s 310ms/step - loss: 2.8919 - acc: 0.8324 - val_loss: 2.8772 - val_acc: 0.8333\n",
"2025-12-25 08:45:44,790 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 4/15\n",
"3/3 [==============================] - 1s 287ms/step - loss: 2.7197 - acc: 0.8431 - val_loss: 2.8773 - val_acc: 0.8333\n",
"2025-12-25 08:45:46,405 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 5/15\n",
"3/3 [==============================] - 1s 289ms/step - loss: 2.7197 - acc: 0.8431 - val_loss: 2.8774 - val_acc: 0.8333\n",
"2025-12-25 08:45:48,033 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 6/15\n",
"3/3 [==============================] - 1s 286ms/step - loss: 2.8921 - acc: 0.8324 - val_loss: 2.8774 - val_acc: 0.8333\n",
"2025-12-25 08:45:49,226 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 7/15\n",
"3/3 [==============================] - 1s 289ms/step - loss: 3.1506 - acc: 0.8164 - val_loss: 2.8775 - val_acc: 0.8333\n",
"2025-12-25 08:45:50,405 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 8/15\n",
"3/3 [==============================] - 1s 283ms/step - loss: 3.0645 - acc: 0.8217 - val_loss: 2.8775 - val_acc: 0.8333\n",
"2025-12-25 08:45:51,592 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 9/15\n",
"3/3 [==============================] - 1s 289ms/step - loss: 2.9784 - acc: 0.8271 - val_loss: 2.8775 - val_acc: 0.8333\n",
"2025-12-25 08:45:52,787 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 10/15\n",
"3/3 [==============================] - 1s 283ms/step - loss: 2.6338 - acc: 0.8485 - val_loss: 2.8775 - val_acc: 0.8333\n",
"2025-12-25 08:45:53,947 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 11/15\n",
"3/3 [==============================] - 1s 286ms/step - loss: 3.0646 - acc: 0.8217 - val_loss: 2.8776 - val_acc: 0.8333\n",
"2025-12-25 08:45:55,132 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 12/15\n",
"3/3 [==============================] - 1s 286ms/step - loss: 2.9784 - acc: 0.8271 - val_loss: 2.8776 - val_acc: 0.8333\n",
"2025-12-25 08:45:56,311 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 13/15\n",
"3/3 [==============================] - 1s 284ms/step - loss: 2.9784 - acc: 0.8271 - val_loss: 2.8776 - val_acc: 0.8333\n",
"2025-12-25 08:45:57,479 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 14/15\n",
"3/3 [==============================] - 1s 284ms/step - loss: 2.7200 - acc: 0.8431 - val_loss: 2.8776 - val_acc: 0.8333\n",
"2025-12-25 08:45:58,647 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"Epoch 15/15\n",
"3/3 [==============================] - 1s 283ms/step - loss: 2.8061 - acc: 0.8378 - val_loss: 2.8776 - val_acc: 0.8333\n",
"2025-12-25 08:45:59,816 [TAO Toolkit] [INFO] root 2102: Training loop in progress\n",
"2025-12-25 08:45:59,833 [TAO Toolkit] [INFO] root 2102: Training loop complete.\n",
"2025-12-25 08:45:59,839 [TAO Toolkit] [INFO] root 2102: Final model evaluation in progress.\n",
"2025-12-25 08:46:00,696 [TAO Toolkit] [INFO] root 2102: Model evaluation is complete.\n",
"2025-12-25 08:46:00,697 [TAO Toolkit] [INFO] __main__ 625: Total Val Loss: 2.8775815963745117\n",
"2025-12-25 08:46:00,697 [TAO Toolkit] [INFO] __main__ 626: Total Val accuracy: 0.8333333134651184\n",
"2025-12-25 08:46:00,697 [TAO Toolkit] [INFO] root 2102: Training finished successfully.\n",
"2025-12-25 08:46:00,697 [TAO Toolkit] [INFO] __main__ 651: Training finished successfully.\n",
"Telemetry data couldn't be sent, but the command ran successfully.\n",
"[WARNING]: <urlopen error Url for the certificates not found.>\n",
"Execution status: PASS\n",
"2025-12-25 08:46:22,952 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 363: Stopping container.\n"
]
}
],
"source": [
"!tao model classification_tf1 train -e $TAO_SPECS_DIR/resnet50/config.txt \\\n",
" -r $TAO_EXPERIMENT_DIR/resnet50 \\\n",
" -k $KEY"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c99eaa3-dc72-4833-b074-c4f250fd58a3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2025-12-25 08:47:26,493 [TAO Toolkit] [INFO] root 160: Registry: ['nvcr.io']\n",
"2025-12-25 08:47:26,611 [TAO Toolkit] [INFO] nvidia_tao_cli.components.instance_handler.local_instance 360: Running command in container: nvcr.io/nvidia/tao/tao-toolkit:5.0.0-tf1.15.5\n",
"2025-12-25 08:47:26,629 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 301: Printing tty value True\n",
"Using TensorFlow backend.\n",
"2025-12-25 08:47:27.758154: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:47:27,819 [TAO Toolkit] [WARNING] tensorflow 40: Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\n",
"2025-12-25 08:47:29,792 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use sklearn by default. This improves performance in some cases. To enable sklearn export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:47:29,836 [TAO Toolkit] [WARNING] tensorflow 42: TensorFlow will not use Dask by default. This improves performance in some cases. To enable Dask export the environment variable TF_ALLOW_IOLIBS=1.\n",
"2025-12-25 08:47:29,841 [TAO Toolkit] [WARNING] tensorflow 43: TensorFlow will not use Pandas by default. This improves performance in some cases. To enable Pandas export the environment variable TF_ALLOW_IOLIBS=1.\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:150: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_hue(img, max_delta=10.0):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:173: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_saturation(img, max_shift):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:183: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_contrast(img, center, max_contrast_scale):\n",
"/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/utils/helper.py:192: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.\n",
" def random_shift(x_img, shift_stddev):\n",
"2025-12-25 08:47:31.972455: I tensorflow/core/platform/profile_utils/cpu_utils.cc:109] CPU Frequency: 2499995000 Hz\n",
"2025-12-25 08:47:31.972882: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x8a40100 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:47:31.972930: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2025-12-25 08:47:31.974821: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcuda.so.1\n",
"2025-12-25 08:47:32.174011: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.176045: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x885b4b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2025-12-25 08:47:32.176083: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla T4, Compute Capability 7.5\n",
"2025-12-25 08:47:32.176402: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.178239: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1674] Found device 0 with properties: \n",
"name: Tesla T4 major: 7 minor: 5 memoryClockRate(GHz): 1.59\n",
"pciBusID: 0000:00:1e.0\n",
"2025-12-25 08:47:32.178306: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:47:32.178428: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcublas.so.12\n",
"2025-12-25 08:47:32.180627: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcufft.so.11\n",
"2025-12-25 08:47:32.180744: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcurand.so.10\n",
"2025-12-25 08:47:32.184414: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusolver.so.11\n",
"2025-12-25 08:47:32.185675: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcusparse.so.12\n",
"2025-12-25 08:47:32.185762: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudnn.so.8\n",
"2025-12-25 08:47:32.185921: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.187870: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.189683: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1802] Adding visible gpu devices: 0\n",
"2025-12-25 08:47:32.189744: I tensorflow/stream_executor/platform/default/dso_loader.cc:50] Successfully opened dynamic library libcudart.so.12\n",
"2025-12-25 08:47:32.198735: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1214] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2025-12-25 08:47:32.198790: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1220] 0 \n",
"2025-12-25 08:47:32.198805: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1233] 0: N \n",
"2025-12-25 08:47:32.199111: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.201132: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1082] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2025-12-25 08:47:32.202987: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1359] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13496 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5)\n"
]
}
],
"source": [
"!tao model classification_tf1 evaluate -e $TAO_SPECS_DIR/resnet50/config.txt\\\n",
" -k $KEY \\\n",
" --log_file $TAO_PROJECT_DIR/log_file_resnet.txt"
]
},
{
"cell_type": "markdown",
"id": "5384a9ac-c05b-4179-940a-9fdfab23337e",
"metadata": {},
"source": [
"Click [here](tao_project/log_file.txt) to view the log file. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7a796eaf-3086-48fa-b18c-7d227ad410c8",
"metadata": {},
"outputs": [],
"source": [
"# 4.2\n",
"# DO NOT CHANGE THIS CELL\n",
"!cp $LOCAL_PROJECT_DIR/log_file.txt my_assessment/log_file.txt"
]
},
{
"cell_type": "markdown",
"id": "aab7921b-734c-4cb1-8b91-7ab1b00892cb",
"metadata": {},
"source": [
"### Grade Your Code ###\n",
"If you have trained the model and completed model evaluation successfully, save changes to the notebook and revisit the webpage where you launched this interactive environment. Click on the \"**ASSESS TASK**\" button as shown in the screenshot below. Doing so will give you credit for this part of the lab that counts towards earning a certificate of competency for the entire course.\n",
"<p><img src='images/credit.png' width=720></p>"
]
},
{
"cell_type": "markdown",
"id": "e9e13c81-abd4-43a2-bfe8-774116b3257f",
"metadata": {},
"source": [
"<a href=\"https://www.nvidia.com/dli\"><img src=\"images/DLI_Header.png\" alt=\"Header\" style=\"width: 400px;\"/></a>"
]
}
],
"metadata": {
"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.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|