{"id":12793,"date":"2021-08-30T08:34:00","date_gmt":"2021-08-30T04:04:00","guid":{"rendered":"https:\/\/shahaab-co.com\/mag\/?p=12793"},"modified":"2024-11-29T18:36:44","modified_gmt":"2024-11-29T15:06:44","slug":"keras-tutorial-transfer-learning-using-pre-trained-models","status":"publish","type":"post","link":"https:\/\/shahaab-co.com\/mag\/edu\/keras-tutorial-transfer-learning-using-pre-trained-models\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 Keras : \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647"},"content":{"rendered":"<p style=\"text-align: justify;\">\u062f\u0631 <a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/keras-tutorial-using-pre-trained-imagenet-models\/\" target=\"_blank\" rel=\"noopener\">\u0622\u0645\u0648\u0632\u0634 \u0642\u0628\u0644\u06cc<\/a> \u060c \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0631\u0648\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc ILSVRC \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0627\u0646\u062f \u0631\u0627 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u0645. \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u060c \u0645\u0627 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0645\u062f\u0644 \u0647\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0646\u0646\u062f\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0648 \u0622\u0645\u0648\u0632\u0634 \u06cc\u06a9 \u0645\u062f\u0644 \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0631 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u0645\u062a\u0641\u0627\u0648\u062a \u0631\u0627 \u0645\u0648\u0631\u062f \u0628\u062d\u062b \u0642\u0631\u0627\u0631 \u0645\u06cc \u062f\u0647\u06cc\u0645.<\/p>\n<p style=\"text-align: justify;\">\u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u062f \u06cc\u06a9 \u0631\u0628\u0627\u062a \u062e\u0627\u0646\u06af\u06cc \u0628\u0633\u0627\u0632\u06cc\u062f \u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u062f \u0622\u0634\u067e\u0632\u06cc \u06a9\u0646\u062f. \u0627\u0648\u0644\u06cc\u0646 \u0642\u062f\u0645 \u0634\u0646\u0627\u0633\u0627\u06cc\u06cc \u0633\u0628\u0632\u06cc\u062c\u0627\u062a \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u062a. \u0645\u0627 \u0633\u0639\u06cc \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u0645\u062f\u0644\u06cc \u0628\u0631\u0627\u06cc \u062a\u0634\u062e\u06cc\u0635 \u06af\u0648\u062c\u0647 \u0641\u0631\u0646\u06af\u06cc \u060c \u0647\u0646\u062f\u0648\u0627\u0646\u0647 \u0648 \u06a9\u062f\u0648 \u062a\u0646\u0628\u0644 \u0628\u0633\u0627\u0632\u06cc\u0645. \u062f\u0631 \u0622\u0645\u0648\u0632\u0634 \u0642\u0628\u0644\u06cc \u060c \u062f\u06cc\u062f\u06cc\u0645 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0642\u0627\u062f\u0631 \u0628\u0647 \u0634\u0646\u0627\u0633\u0627\u06cc\u06cc \u0627\u06cc\u0646 \u0645\u0648\u0627\u0631\u062f \u0646\u0628\u0648\u062f\u0646\u062f \u0632\u06cc\u0631\u0627 \u0645\u062f\u0644 \u0645\u0627 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0647 \u0647\u0627 \u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u0646\u062f\u06cc\u062f\u0647 \u0627\u0633\u062a.<\/p>\n\n\n<div class=\"wp-block-rank-math-toc-block\"><h2>\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/h2><nav><ul><li><a href=\"#h-\" >\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642<\/a><\/li><li><a href=\"#h--1\" >\u062f\u0627\u0646\u0644\u0648\u062f \u0648 \u0622\u0645\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627<\/a><\/li><li><a href=\"#h--2\" >\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062f\u0644 \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/a><\/li><li><a href=\"#h--3\" >\u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627<\/a><\/li><li><a href=\"#h--4\" >\u0645\u062f\u0644 \u062e\u0648\u062f \u0631\u0627 \u0628\u0633\u0627\u0632\u06cc\u062f<\/a><\/li><li><a href=\"#h--5\" >\u0645\u062f\u0644 \u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u062f<\/a><\/li><li><a href=\"#h--6\" >\u0628\u0631\u0631\u0633\u06cc \u0639\u0645\u0644\u06a9\u0631\u062f<\/a><\/li><\/nav><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\"><strong>\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642<\/strong><\/h2>\n\n\n<p style=\"text-align: justify;\">\u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0628\u0631 \u0631\u0648\u06cc \u0645\u0633\u0627\u0626\u0644 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 \u062f\u0631 \u0645\u0642\u06cc\u0627\u0633 \u0628\u0632\u0631\u06af \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0627\u0646\u062f. \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0646\u0646\u062f\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0648 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0645\u0644\u0627\u064b \u0645\u062a\u0635\u0644 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"700\" height=\"446\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0634\u0645\u0627\u062a\u06cc\u06a9-\u0634\u0628\u06a9\u0647-\u0639\u0635\u0628\u06cc-\u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc.jpg\" alt=\"\u0634\u0645\u0627\u062a\u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u0639\u0635\u0628\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc\" class=\"wp-image-12294\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0634\u0645\u0627\u062a\u06cc\u06a9-\u0634\u0628\u06a9\u0647-\u0639\u0635\u0628\u06cc-\u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc.jpg 700w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0634\u0645\u0627\u062a\u06cc\u06a9-\u0634\u0628\u06a9\u0647-\u0639\u0635\u0628\u06cc-\u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc-300x191.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption>\u0634\u0645\u0627\u062a\u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u0639\u0635\u0628\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify\">\u0627\u0632 \u0622\u0646\u062c\u0627 \u06a9\u0647 \u0627\u06cc\u0646 \u0645\u062f\u0644 \u0647\u0627 \u0628\u0633\u06cc\u0627\u0631 \u0628\u0632\u0631\u06af \u0647\u0633\u062a\u0646\u062f \u0648 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0632\u06cc\u0627\u062f\u06cc \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0627\u0646\u062f \u060c \u062a\u0645\u0627\u06cc\u0644 \u062f\u0627\u0631\u0646\u062f \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0639\u0627\u0644\u06cc \u0648 \u0645\u062a\u0645\u0627\u06cc\u0632 \u0631\u0627 \u0628\u06cc\u0627\u0645\u0648\u0632\u0646\u062f. \u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0635\u0631\u0641\u0627\u064b \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0646\u0646\u062f\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645 \u06cc\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0631\u0627 \u0645\u062a\u0646\u0627\u0633\u0628 \u0628\u0627 \u0645\u0633\u0626\u0644\u0647 \u0645\u0648\u062c\u0648\u062f \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u0645. \u0631\u0648\u0634 \u0627\u0648\u0644 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 <strong>\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc<\/strong> \u0648 \u062f\u0648\u0645\u06cc \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 <strong>\u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642<\/strong> \u0634\u0646\u0627\u062e\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p style=\"text-align: justify\">\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0642\u0627\u0639\u062f\u0647 \u06a9\u0644\u06cc \u060c \u0648\u0642\u062a\u06cc \u06a9\u0647 \u0645\u0627 \u06cc\u06a9 \u0645\u062c\u0645\u0648\u0639\u0647 \u0622\u0645\u0648\u0632\u0634\u06cc \u06a9\u0648\u0686\u06a9 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u0645 \u0648 \u0645\u0633\u0626\u0644\u0647 \u0645\u0627 \u0634\u0628\u06cc\u0647 \u0648\u0638\u06cc\u0641\u0647 \u0627\u06cc \u0628\u0627\u0634\u062f \u06a9\u0647 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0628\u0631\u0627\u06cc \u0622\u0646 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0627\u0646\u062f \u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645. \u0627\u06af\u0631 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0641\u06cc \u062f\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u0645 \u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0631\u0627 \u0637\u0648\u0631\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u0645 \u06a9\u0647 \u0622\u0646 \u0647\u0627 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u062a\u0631 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0645\u0633\u0626\u0644\u0647 \u0645\u0627 \u0631\u0627 \u0628\u06cc\u0627\u0645\u0648\u0632\u0646\u062f. \u0634\u0645\u0627 \u062f\u0631 <a href=\"https:\/\/cs231n.github.io\/transfer-learning\/\" target=\"_blank\" rel=\"noopener\">\u0627\u06cc\u0646\u062c\u0627<\/a> \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0646\u06af\u0627\u0647\u06cc \u0628\u0647 \u062c\u0632\u0626\u06cc\u0627\u062a \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f. \u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0633\u062a \u062f\u0631\u0628\u0627\u0631\u0647 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u062f\u0631 Keras \u0628\u062d\u062b \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"830\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u062a\u0635\u0627\u0648\u06cc\u0631-\u06af\u0648\u062c\u0647-\u0641\u0631\u0646\u06af\u06cc-\u062f\u0631-ImageNet.png\" alt=\"\u062a\u0635\u0627\u0648\u06cc\u0631 \u06af\u0648\u062c\u0647 \u0641\u0631\u0646\u06af\u06cc \u062f\u0631 ImageNet\" class=\"wp-image-12815\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u062a\u0635\u0627\u0648\u06cc\u0631-\u06af\u0648\u062c\u0647-\u0641\u0631\u0646\u06af\u06cc-\u062f\u0631-ImageNet.png 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u062a\u0635\u0627\u0648\u06cc\u0631-\u06af\u0648\u062c\u0647-\u0641\u0631\u0646\u06af\u06cc-\u062f\u0631-ImageNet-300x243.png 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u062a\u0635\u0627\u0648\u06cc\u0631-\u06af\u0648\u062c\u0647-\u0641\u0631\u0646\u06af\u06cc-\u062f\u0631-ImageNet-768x623.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u062a\u0635\u0627\u0648\u06cc\u0631 \u06af\u0648\u062c\u0647 \u0641\u0631\u0646\u06af\u06cc \u062f\u0631 ImageNet<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify\">\u0633\u0627\u062e\u062a\u0627\u0631 ImageNet \u0628\u0631 \u0627\u0633\u0627\u0633 WordNet \u0627\u0633\u062a \u06a9\u0647 \u06a9\u0644\u0645\u0627\u062a \u0631\u0627 \u0628\u0647 \u0645\u062c\u0645\u0648\u0639\u0647 \u0647\u0627\u06cc \u0645\u062a\u0631\u0627\u062f\u0641 (synsets) \u06af\u0631\u0648\u0647 \u0628\u0646\u062f\u06cc \u0645\u06cc \u06a9\u0646\u062f. \u062f\u0631 \u0648\u0627\u0642\u0639 \u0628\u0647 \u0647\u0631 synset \u06cc\u06a9 &#8220;wnid&#8221; \u06cc\u0627 (Wordnet ID) \u0627\u062e\u062a\u0635\u0627\u0635 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u06cc\u06a9 \u062f\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u06a9\u0644\u06cc\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0632\u06cc\u0631 \u0645\u062c\u0645\u0648\u0639\u0647 \u0647\u0627\u06cc \u0632\u06cc\u0627\u062f\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f \u0648 \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0622\u0646 \u0647\u0627 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u06cc\u06a9 synset \u0645\u062a\u0641\u0627\u0648\u062a \u0647\u0633\u062a\u0646\u062f. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u0633\u06af \u0634\u0627\u063a\u0644 (sysnet = n02103406) \u060c \u0633\u06af \u0631\u0627\u0647\u0646\u0645\u0627 (sysnet = n02109150) \u0648 \u0633\u06af \u067e\u0644\u06cc\u0633 (synset = n02106854) \u0633\u0647 \u0645\u062c\u0645\u0648\u0639\u0647 \u0628\u0627 synset \u0645\u062e\u062a\u0644\u0641 \u0647\u0633\u062a\u0646\u062f.<\/p>\n<p style=\"text-align: justify\">wnid \u0647\u0627\u06cc \u06f3 \u06a9\u0644\u0627\u0633 \u0645\u062f \u0646\u0638\u0631 \u0645\u0627 \u062f\u0631 \u0632\u06cc\u0631 \u0622\u0648\u0631\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a<\/p>\n<p dir=\"ltr\" style=\"text-align: justify\">n07734017 -&gt; \u06af\u0648\u062c\u0647 \u0641\u0631\u0646\u06af\u06cc (Tomato)<\/p>\n<p dir=\"ltr\" style=\"text-align: justify\">n07735510 -&gt; \u06a9\u062f\u0648 \u062a\u0646\u0628\u0644 (Pumpkin)<\/p>\n<p dir=\"ltr\" style=\"text-align: justify\">n07756951 -&gt;&nbsp; \u0647\u0646\u062f\u0648\u0627\u0646\u0647 (WaterMelon)<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--1\"><strong>\u062f\u0627\u0646\u0644\u0648\u062f \u0648 \u0622\u0645\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627<\/strong><\/h2>\n\n\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 Imagenet \u0627\u0632 wnid \u060c \u06cc\u06a9 \u06a9\u062f \u0645\u0631\u062c\u0639 \u062e\u0648\u0628 \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 Tzuta Lin \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u062f\u0631 <a href=\"https:\/\/github.com\/tzutalin\/ImageNet_Utils\" target=\"_blank\" rel=\"noopener\">GitHub<\/a> \u0645\u0648\u062c\u0648\u062f \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u06cc\u06a9 &#8220;wnid&#8221; \u062e\u0627\u0635 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u0647\u0631 wnid \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u0635\u0641\u062d\u0647 GitHub \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0631\u062f\u0647 \u0648 \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0647\u0627 \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0646\u06cc\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644 \u060c \u0627\u06af\u0631 \u0634\u0645\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627\u06cc \u06a9\u0627\u0631 \u0647\u0633\u062a\u06cc\u062f \u0648 \u0646\u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0627 \u0627\u0646\u062f\u0627\u0632\u0647 \u06a9\u0627\u0645\u0644 \u0631\u0627 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f \u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u062f\u06cc\u06af\u0631\u06cc \u0627\u0632 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0627\u0632 \u0637\u0631\u06cc\u0642 pip \u2013 <a href=\"https:\/\/pypi.org\/project\/imagenetscraper\/\" target=\"_blank\" rel=\"noopener\">imagenetscraper<\/a> \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0627\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0622\u0633\u0627\u0646 \u0627\u0633\u062a \u0648 \u062f\u0627\u0631\u0627\u06cc \u06af\u0632\u06cc\u0646\u0647 \u0647\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u0627\u0646\u062f\u0627\u0632\u0647 \u0646\u06cc\u0632 \u0645\u06cc \u0628\u0627\u0634\u062f. \u062f\u0633\u062a\u0648\u0631\u0627\u0644\u0639\u0645\u0644 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 \u0632\u06cc\u0631 \u0622\u0648\u0631\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0641\u0642\u0637 \u0628\u0627 python3 \u06a9\u0627\u0631 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># Install imagenetscraper\npip3 install imagenetscraper\n\n# Download the images for the three wnids and keep them in separate folders.\nimagenetscraper n07756951 watermelon\nimagenetscraper n07734017 tomato\nimagenetscraper n07735510 pumpkin<\/pre>\n<p style=\"text-align: justify;\">\u0645\u0627 \u062f\u0631\u06cc\u0627\u0641\u062a\u0645 \u06a9\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0628\u0633\u06cc\u0627\u0631 \u0646\u0648\u06cc\u0632\u06cc \u0647\u0633\u062a\u0646\u062f \u060c \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u060c \u0628\u0647\u0645 \u0631\u06cc\u062e\u062a\u06af\u06cc \u0632\u06cc\u0627\u062f\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u060c \u0627\u0634\u06cc\u0627\u0621 \u062f\u0631 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0648\u0627\u0636\u062d \u0646\u06cc\u0633\u062a\u0646\u062f \u0648 \u063a\u06cc\u0631\u0647. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u060c \u062d\u062f\u0648\u062f \u06f2\u06f5\u06f0 \u062a\u0635\u0648\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0647\u0631 \u06a9\u0644\u0627\u0633 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062f\u06cc\u0645. \u0645\u0627 \u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u062f\u0648 \u06af\u0631\u0648\u0647 \u0628\u0647 \u0646\u0627\u0645 \u0647\u0627\u06cc&#8221; \u0622\u0645\u0648\u0632\u0634 &#8221; \u0648 &#8221; \u0627\u0639\u062a\u0628\u0627\u0631\u0633\u0646\u062c\u06cc &#8221; \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645 \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u062a\u0648\u0627\u0628\u0639 Keras \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u062f\u0631 \u062f\u0633\u062a\u0647 \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--2\"><strong>\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062f\u0644 \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/strong><\/h2>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">from tensorflow.keras.applications import vgg16\n\nvgg_conv = vgg16.VGG16(weights='imagenet',\n                  include_top=False,\n                  input_shape=(224, 224, 3))<\/pre>\n<p style=\"text-align: justify;\">\u062f\u0631 \u06a9\u062f \u0628\u0627\u0644\u0627 \u060c \u0645\u0627 \u0645\u062f\u0644 VGG \u0631\u0627 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u0648\u0632\u0646 \u0647\u0627\u06cc ImageNet \u0645\u0634\u0627\u0628\u0647 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u0642\u0628\u0644\u06cc \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u06cc \u06a9\u0646\u06cc\u0645. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644 \u060c \u06cc\u06a9 \u062a\u063a\u06cc\u06cc\u0631 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f : include_top=False. \u0645\u0627 \u062f\u0648 \u0644\u0627\u06cc\u0647 \u0622\u062e\u0631 \u06a9\u0627\u0645\u0644\u0627\u064b \u0645\u062a\u0635\u0644 \u0631\u0627 \u06a9\u0647 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u0646\u062f \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0646\u06a9\u0631\u062f\u0647 \u0627\u06cc\u0645. \u062f\u0631 \u0648\u0627\u0642\u0639 \u0641\u0642\u0637 \u062f\u0631 \u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0647\u0633\u062a\u06cc\u0645. \u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a \u06a9\u0647 \u0627\u0628\u0639\u0627\u062f \u0644\u0627\u06cc\u0647 \u0622\u062e\u0631 \u06f7x7x512 \u0627\u0633\u062a.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--3\"><strong>\u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627<\/strong><\/h2>\n\n\n<p style=\"text-align: justify;\">\u062f\u0627\u062f\u0647 \u0647\u0627 \u0628\u0647 \u0646\u0633\u0628\u062a \u06f8\u06f0:\u06f2\u06f0 \u062a\u0642\u0633\u06cc\u0645 \u0634\u062f\u0647 \u0648 \u062f\u0631 \u067e\u0648\u0634\u0647 \u0647\u0627\u06cc \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u0622\u0645\u0648\u0632\u0634 \u0648 \u0627\u0639\u062a\u0628\u0627\u0631 \u0633\u0646\u062c\u06cc \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0645\u06cc \u0634\u0648\u0646\u062f. \u0647\u0631 \u067e\u0648\u0634\u0647 \u0628\u0627\u06cc\u062f \u062f\u0627\u0631\u0627\u06cc \u06f3 \u067e\u0648\u0634\u0647 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637\u0647 \u0628\u0627\u0634\u062f. \u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0633\u06cc\u0633\u062a\u0645 \u062e\u0648\u062f \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0686\u06cc\u062f\u0645\u0627\u0646 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># each folder contains three subfolders in accordance with the number of classes\ntrain_dir = '.\/clean-dataset\/train'\nvalidation_dir = '.\/clean-dataset\/validation'\n\n# the number of images for train and test is divided into 80:20 ratio\nnTrain = 600\nnVal = 150<\/pre>\n<p style=\"text-align: justify;\">\u0645\u0627 \u0627\u0632 \u06a9\u0644\u0627\u0633 ImageDataGenerator \u0628\u0631\u0627\u06cc \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u0648 \u062a\u0627\u0628\u0639 flow_from_directory \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u062f\u0633\u062a\u0647 \u0647\u0627\u06cc\u06cc \u0627\u0632 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0648 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># load the normalized images\ndatagen = ImageDataGenerator(rescale=1.\/255)\n\n# define the batch size\nbatch_size = 20\n\n# the defined shape is equal to the network output tensor shape\ntrain_features = np.zeros(shape=(nTrain, 7, 7, 512))\ntrain_labels = np.zeros(shape=(nTrain,3))\n\n# generate batches of train images and labels\ntrain_generator = datagen.flow_from_directory(\n    train_dir,\n    target_size=(224, 224),\n    batch_size=batch_size,\n    class_mode='categorical',\n    shuffle=True)<\/pre>\n<p style=\"text-align: justify;\">\u0633\u067e\u0633 \u0627\u0632 \u062a\u0627\u0628\u0639 ()model.predict \u0628\u0631\u0627\u06cc \u0639\u0628\u0648\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0627\u0632 \u0634\u0628\u06a9\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u0647 \u0645\u0627 \u06cc\u06a9 \u062a\u0646\u0633\u0648\u0631 \u0628\u0627 \u0627\u0628\u0639\u0627\u062f \u06f7x7x512 \u0645\u06cc \u062f\u0647\u062f. \u0645\u0627 \u062a\u0646\u0633\u0648\u0631 \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0628\u0631\u062f\u0627\u0631 \u062a\u063a\u06cc\u06cc\u0631 \u0634\u06a9\u0644 \u0645\u06cc \u062f\u0647\u06cc\u0645. \u0628\u0647 \u0637\u0648\u0631 \u0645\u0634\u0627\u0628\u0647 \u060c \u0645\u0627 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0627\u0639\u062a\u0628\u0627\u0631\u0633\u0646\u062c\u06cc ( validation_features ) \u0631\u0627 \u067e\u06cc\u062f\u0627 \u0645\u06cc \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># iterate through the batches of train images and labels\nfor i, (inputs_batch, labels_batch) in enumerate(train_generator):\n    if i * batch_size &gt;= nTrain:\n        break    \n    # pass the images through the network\n    features_batch = vgg_conv.predict(inputs_batch)\n    train_features[i * batch_size : (i + 1) * batch_size] = features_batch\n    train_labels[i * batch_size : (i + 1) * batch_size] = labels_batch\n\n# reshape train_features into vector        \ntrain_features_vec = np.reshape(train_features, (nTrain, 7 * 7 * 512))\nprint(\"Train features: {}\".format(train_features_vec.shape))<\/pre>\n<p>\u062e\u0631\u0648\u062c\u06cc :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-linenumbers=\"false\">Train features: (600, 25088)<\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--4\"><strong>\u0645\u062f\u0644 \u062e\u0648\u062f \u0631\u0627 \u0628\u0633\u0627\u0632\u06cc\u062f<\/strong><\/h2>\n\n\n<p>\u0645\u0627 \u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u067e\u06cc\u0634\u062e\u0648\u0631 \u0633\u0627\u062f\u0647 \u0628\u0627 \u0644\u0627\u06cc\u0647 \u062e\u0631\u0648\u062c\u06cc softmax \u062f\u0627\u0631\u06cc\u0645 \u06a9\u0647 \u062f\u0627\u0631\u0627\u06cc \u06f3 \u06a9\u0644\u0627\u0633 \u0627\u0633\u062a.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">from tensorflow.keras.layers import Dense, Dropout\nfrom tensorflow.keras import Sequential, optimizers\n\nmodel = Sequential()\nmodel.add(Dense(512, activation='relu', input_dim=7 * 7 * 512))\nmodel.add(Dropout(0.5))\nmodel.add(Dense(3, activation='softmax'))<\/pre>\n<p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--5\"><strong>\u0645\u062f\u0644 \u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u062f<\/strong><\/h2>\n\n\n<p>\u0628\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u062a\u0627\u0628\u0639 ()model.fit \u0628\u0647 \u0633\u0627\u062f\u06af\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u0631\u0627 \u062f\u0631 Keras \u0622\u0645\u0648\u0632\u0634 \u062f\u0627\u062f \u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u0642\u0628\u0644\u06cc \u062e\u0648\u062f \u062f\u06cc\u062f\u0647 \u0628\u0648\u062f\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># configure the model for training\nmodel.compile(optimizer=optimizers.RMSprop(lr=2e-4),\n              loss='categorical_crossentropy',\n              metrics=['acc'])\n\n# use the train and validation feature vectors \nhistory = model.fit(train_features_vec,\n                    train_labels,\n                    epochs=20,\n                    batch_size=batch_size,\n                    validation_data=(validation_features_vec, \n                    validation_labels)\n)<\/pre>\n<p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h--6\"><strong>\u0628\u0631\u0631\u0633\u06cc \u0639\u0645\u0644\u06a9\u0631\u062f<\/strong><\/h2>\n\n\n<p>\u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u0645 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u06a9\u0647 \u06a9\u062f\u0627\u0645 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0647 \u0627\u0634\u062a\u0628\u0627\u0647 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0646\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># get the list of all validation file names\nfnames = validation_generator.filenames\n\n# get the list of the corresponding classes\nground_truth = validation_generator.classes\n\n# get the dictionary of classes\nlabel2index = validation_generator.class_indices\n\n# obtain the list of classes\nidx2label = list(label2index.keys())\nprint(\"The list of classes: \", idx2label)<\/pre>\n<p>\u062e\u0631\u0648\u062c\u06cc :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-linenumbers=\"false\">The list of classes: ['pumpkin', 'tomato', 'watermelon']<\/pre>\n<p>\u0628\u06cc\u0627\u06cc\u06cc\u062f \u062a\u0639\u062f\u0627\u062f \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627\u06cc \u0646\u0627\u062f\u0631\u0633\u062a \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u0645 :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">predictions = model.predict_classes(validation_features_vec)\nprob = model.predict(validation_features_vec)\n\nerrors = np.where(predictions != ground_truth)[0]\nprint(\"Number of errors = {}\/{}\".format(len(errors),nVal))<\/pre>\n<p>\u0627\u0632 \u06f1\u06f5\u06f0 \u062a\u0635\u0648\u06cc\u0631 \u0627\u0639\u062a\u0628\u0627\u0631\u0633\u0646\u062c\u06cc \u060c \u06f1\u06f4 \u06a9\u0644\u0627\u0633 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0634\u062f\u0647 \u0627\u0634\u062a\u0628\u0627\u0647 \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc \u06a9\u0646\u06cc\u0645 :<\/p>\n<p style=\"text-align: center;\">\u062a\u0639\u062f\u0627\u062f \u062e\u0637\u0627 \u0647\u0627 = \u06f1\u06f4\/\u06f1\u06f5\u06f0<\/p>\n<p>\u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u0628\u0628\u06cc\u0646\u06cc\u0645 \u06a9\u062f\u0627\u0645 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0627\u0634\u062a\u0628\u0627\u0647 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0634\u062f\u0647 \u0627\u0646\u062f :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">for i in range(len(errors)):\n    pred_class = np.argmax(prob[errors[i]])\n    pred_label = idx2label[pred_class]\n    \n    print('Original label:{}, Prediction :{}, confidence : {:.3f}'.format(\n        fnames[errors[i]].split('\/')[0],\n        pred_label,\n        prob[errors[i]][pred_class]))\n    \n    original = load_img('{}\/{}'.format(validation_dir,fnames[errors[i]]))\n    plt.axis('off')\n    plt.imshow(original)\n    plt.show()<\/pre>\n<p>\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0686\u0646\u062f\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0627\u0632 \u0646\u062a\u06cc\u062c\u0647 \u0627\u062c\u0631\u0627\u06cc \u06a9\u062f \u0628\u0627\u0644\u0627 \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u062f :<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"510\" height=\"926\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0646\u062a\u0627\u06cc\u062c-\u0646\u0627\u062f\u0631\u0633\u062a-\u0627\u0632-\u062a\u0634\u062e\u06cc\u0635-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc-\u0627\u0646\u062a\u0642\u0627\u0644\u06cc.png\" alt=\"\u0646\u062a\u0627\u06cc\u062c \u0646\u0627\u062f\u0631\u0633\u062a \u0627\u0632 \u062a\u0634\u062e\u06cc\u0635 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc\" class=\"wp-image-12816\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0646\u062a\u0627\u06cc\u062c-\u0646\u0627\u062f\u0631\u0633\u062a-\u0627\u0632-\u062a\u0634\u062e\u06cc\u0635-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc-\u0627\u0646\u062a\u0642\u0627\u0644\u06cc.png 510w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/08\/\u0646\u062a\u0627\u06cc\u062c-\u0646\u0627\u062f\u0631\u0633\u062a-\u0627\u0632-\u062a\u0634\u062e\u06cc\u0635-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc-\u0627\u0646\u062a\u0642\u0627\u0644\u06cc-165x300.png 165w\" sizes=\"(max-width: 510px) 100vw, 510px\" \/><figcaption>\u0646\u062a\u0627\u06cc\u062c \u0646\u0627\u062f\u0631\u0633\u062a \u0627\u0632 \u062a\u0634\u062e\u06cc\u0635 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u062f\u0631 \u067e\u0633\u062a \u0628\u0639\u062f\u06cc \u0633\u0639\u06cc \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0647 \u0646\u0627\u0645 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642 (Fine-tuning) \u060c \u0645\u062d\u062f\u0648\u062f\u06cc\u062a \u0647\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u0631\u0627 \u0628\u0647\u0628\u0648\u062f \u0628\u0628\u062e\u0634\u06cc\u0645. \u0628\u0627 \u0645\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f.<\/p>\n<h4><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f :<\/strong><\/h4>\n\n\n<div class=\"wp-block-columns has-vivid-green-cyan-color has-text-color is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<ul class=\"wp-block-yoast-seo-related-links\"><li><a href=\"https:\/\/shahaab-co.com\/mag\/news\/ai\/ai-premature-death-prediction\/\">\u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0631 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u0631\u06af \u0632\u0648\u062f\u0631\u0633 \u0627\u0632 \u067e\u0632\u0634\u06a9\u0627\u0646 \u062f\u0642\u06cc\u0642 \u062a\u0631 \u0627\u0633\u062a!<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/using-deep-learning-with-limited-data-part-1-transfer-learning\/\">\u0648\u0642\u062a\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0645\u062d\u062f\u0648\u062f\u06cc \u062f\u0627\u0631\u06cc\u0645\u060c \u0686\u06af\u0648\u0646\u0647 \u0627\u0632 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0639\u0645\u06cc\u0642 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645\u061f \u0628\u062e\u0634 \u0627\u0648\u0644 : \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/ml\/natural-language-processing-is-fun-part-1\/\">\u067e\u0631\u062f\u0627\u0632\u0634 \u0632\u0628\u0627\u0646 \u0637\u0628\u06cc\u0639\u06cc \u062c\u0630\u0627\u0628 \u0627\u0633\u062a! \u0642\u0633\u0645\u062a \u0627\u0648\u0644<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/en-articles\/instance-segmentation-with-mask-r-cnn-and-tensorflow\/\">Splash of Color: Instance Segmentation with Mask R-CNN and TensorFlow<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/keras-tutorial-using-pre-trained-imagenet-models\/\">\u0622\u0645\u0648\u0632\u0634 Keras : \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 ImageNet<\/a><\/li><\/ul>\n<\/div>\n<\/div>\n\n\n<a href=\"#\" class=\"shortc-button small blue \">\u0645\u0646\u0628\u0639<\/a> <a href=\"https:\/\/learnopencv.com\/keras-tutorial-transfer-learning-using-pre-trained-models\/\" target=\"_blank\" class=\"shortc-button small gray \" rel=\"noopener\">Learn OpenCV<\/a>\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;12793&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u0622\u0645\u0648\u0632\u0634 Keras : \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0627\u0646\u062a\u0642\u0627\u0644\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0622\u0645\u0648\u0632\u0634 \u0642\u0628\u0644\u06cc \u060c \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0631\u0648\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc ILSVRC \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0627\u0646\u062f \u0631\u0627 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u0645. \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u060c \u0645\u0627 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0645\u062f\u0644 \u0647\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0646\u0646\u062f\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0648 \u0622\u0645\u0648\u0632\u0634 \u06cc\u06a9 \u0645\u062f\u0644 \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0631 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u0645\u062a\u0641\u0627\u0648\u062a \u0631\u0627 \u0645\u0648\u0631\u062f \u0628\u062d\u062b &hellip;<\/p>\n","protected":false},"author":17,"featured_media":12820,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,19],"tags":[147,97,101,86],"class_list":["post-12793","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-edu","category-deep-learning","tag-147","tag-97","tag-101","tag-86"],"_links":{"self":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/12793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/comments?post=12793"}],"version-history":[{"count":20,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/12793\/revisions"}],"predecessor-version":[{"id":16179,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/12793\/revisions\/16179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media\/12820"}],"wp:attachment":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media?parent=12793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/categories?post=12793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/tags?post=12793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}