{"id":31587,"date":"2026-04-02T01:11:22","date_gmt":"2026-04-01T16:11:22","guid":{"rendered":"https:\/\/wp.study3.biz\/?p=31587"},"modified":"2026-04-06T06:14:44","modified_gmt":"2026-04-05T21:14:44","slug":"ubuntu22-04-5-lts-%e3%81%a7nvidia-caffe%e3%82%92%e7%b6%99%e7%b6%9a%e3%81%97%e3%81%a6%e4%bd%bf%e7%94%a8%e3%81%a7%e3%81%8d%e3%82%8b%e4%bf%ae%e6%ad%a3%e3%83%9d%e3%82%a4%e3%83%b3%e3%83%88","status":"publish","type":"post","link":"https:\/\/wp.study3.biz\/?p=31587","title":{"rendered":"Ubuntu22.04.5 LTS \u3067Nvidia Caffe\u3092\u7d99\u7d9a\u3057\u3066\u4f7f\u7528\u3067\u304d\u308b\u4fee\u6b63\u30dd\u30a4\u30f3\u30c8"},"content":{"rendered":"<p>\u5fcd\u91ce\u516b\u6d77<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.study3.biz\/wp-content\/uploads\/2025\/07\/unnamed.jpg\" alt=\"\" width=\"1360\" height=\"1020\" class=\"alignnone size-full wp-image-30284\" \/><br \/>\ndesktop <strong>Ubuntu22.04.5 LTS <\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.study3.biz\/wp-content\/uploads\/2024\/04\/Screenshot-from-2024-04-07-05-57-17.jpg\" alt=\"\" width=\"1024\" height=\"576\" class=\"alignnone size-full wp-image-19534\" \/><br \/>\n1.Pyhton2\u304c\u4f7f\u3048\u306a\u3044\u306e\u3067Python3\u3092\u6d3b\u7528\u3059\u308b<br \/>\n2.Numpy \u3092 i.26.4 \u306b\u8a2d\u5b9a<br \/>\n<strong>pip3 install numpy==1.26.4<\/strong><br \/>\n3. show_result_py3.py \u3092\u8a2d\u5b9a\u3059\u308b<br \/>\nchibi@22042204:~\/caffe$ cat show_result_py3.py<br \/>\nimport sys<br \/>\nimport numpy as np<\/p>\n<p>if len(sys.argv) != 3:<br \/>\n    print(&#8220;Usage: python3 show_result_py3.py synset_words.txt result.npy&#8221;)<br \/>\n    sys.exit(1)<\/p>\n<p>label_file = sys.argv[1]<br \/>\nresult_file = sys.argv[2]<\/p>\n<p># synset_words.txt \u306e\u8aad\u307f\u8fbc\u307f<br \/>\nlabels = []<br \/>\nwith open(label_file, &#8216;r&#8217;) as f:<br \/>\n    for line in f:<br \/>\n        line = line.strip()<br \/>\n        if not line:<br \/>\n            continue<br \/>\n        parts = line.split(&#8216; &#8216;, 1)<br \/>\n        labels.append(parts[1] if len(parts) > 1 else parts[0])<\/p>\n<p># \u63a8\u8ad6\u7d50\u679c\u306e\u8aad\u307f\u8fbc\u307f<br \/>\nprobs = np.load(result_file)[0]<\/p>\n<p># \u4e0a\u4f4d5\u4ef6<br \/>\ntop5 = probs.argsort()[::-1][:5]<\/p>\n<p>for rank, idx in enumerate(top5, 1):<br \/>\n    print(&#8220;#%d | %s | %.1f%%&#8221; % (rank, labels[idx], probs[idx] * 100.0))<br \/>\n<strong>\u30b3\u30d4\u30da\u306e\u5834\u5408\u306f\u3053\u308c\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"https:\/\/wp.study3.biz\/wp-content\/uploads\/2026\/04\/show_result_py3.py_.py_.txt\">show_result_py3.py.py<\/a><br \/>\nchibi@22042204:~\/caffe$ <strong>sudo chown chibi:chibi show_result_py3.py<\/strong><br \/>\nchibi@22042204:~\/caffe$ <strong>chmod +x show_result_py3.py<\/strong><br \/>\nchibi@22042204:~\/caffe$ cd python; python3 classify.py &#8211;raw_scale 255 ..\/101_ObjectCategories\/airplanes\/image_0001.jpg ..\/result.npy; cd ..<br \/>\nchibi@22042204:~\/caffe$ python3 show_result_py3.py data\/ilsvrc12\/synset_words.txt result.npy<br \/>\n\u8a73\u7d30\u306f\u3053\u3053<br \/>\n<a href=\"https:\/\/wp.study3.biz\/wp-content\/uploads\/2026\/04\/panda-0002-99.9.txt\">panda 0002 99.9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5fcd\u91ce\u516b\u6d77 desktop Ubuntu22.04.5 LTS 1.Pyhton2\u304c\u4f7f\u3048\u306a\u3044\u306e\u3067Python3\u3092\u6d3b\u7528\u3059\u308b 2.Numpy \u3092 i.26.4 \u306b\u8a2d\u5b9a pip3 install numpy==1.26.4 3. &hellip; <a href=\"https:\/\/wp.study3.biz\/?p=31587\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18,17],"tags":[],"class_list":["post-31587","post","type-post","status-publish","format-standard","hentry","category-nvidia","category-ubuntu"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/posts\/31587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31587"}],"version-history":[{"count":12,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/posts\/31587\/revisions"}],"predecessor-version":[{"id":31740,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=\/wp\/v2\/posts\/31587\/revisions\/31740"}],"wp:attachment":[{"href":"https:\/\/wp.study3.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.study3.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}