{"id":588,"date":"2020-10-06T20:12:12","date_gmt":"2020-10-06T12:12:12","guid":{"rendered":"https:\/\/xg1990.com\/blog\/?p=588"},"modified":"2020-10-06T20:12:14","modified_gmt":"2020-10-06T12:12:14","slug":"%e4%bb%80%e4%b9%88%e6%98%af%e5%af%b9%e6%af%94%e5%ad%a6%e4%b9%a0%ef%bc%88contrastive-learning%ef%bc%89%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/xg1990.com\/blog\/en\/archives\/588","title":{"rendered":"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f"},"content":{"rendered":"\n<p><em>\u672c\u6587\u7ffb\u8bd1\u81ea\uff1a<a href=\"https:\/\/analyticsindiamag.com\/contrastive-learning-self-supervised-ml\/\">https:\/\/analyticsindiamag.com\/contrastive-learning-self-supervised-ml\/<\/a><\/em><\/p>\n\n\n\n<p>\u8fd1\u5e74\u6765\uff0c\u81ea\u6211\u76d1\u7763\u6a21\u5f0f\u7684\u6210\u529f\u53ef\u4ee5\u5f52\u56e0\u4e8e\u7814\u7a76\u8005\u5bf9\u5bf9\u6bd4\u5b66\u4e60\u8fd9\u4e00\u81ea\u6211\u76d1\u7763\u5b66\u4e60\u8303\u5f0f\u7684\u91cd\u65b0\u5174\u8da3\u3002\u4f8b\u5982\uff0c\u4eba\u7c7b\u53ef\u4ee5\u8fa8\u8ba4\u51fa\u91ce\u5916\u7684\u7269\u4f53\uff0c\u5373\u4f7f\u6211\u4eec\u4e0d\u8bb0\u5f97\u7269\u4f53\u7684\u786e\u5207\u6837\u5b50\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u901a\u8fc7\u8bb0\u4f4f\u9ad8\u5c42\u7279\u5f81\u800c\u5ffd\u7565\u5fae\u89c2\u5c42\u9762\u7684\u7ec6\u8282\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u6240\u4ee5\uff0c\u73b0\u5728\u7684\u95ee\u9898\u662f\uff0c\u6211\u4eec\u662f\u5426\u53ef\u4ee5\u5efa\u7acb\u4e00\u4e2a\u4e0d\u5173\u6ce8\u50cf\u7d20\u7ea7\u7ec6\u8282\uff0c\u53ea\u7f16\u7801\u8db3\u4ee5\u533a\u5206\u4e0d\u540c\u5bf9\u8c61\u7684\u9ad8\u7ea7\u7279\u5f81\u7684\u8868\u793a\u5b66\u4e60\u7b97\u6cd5\uff1f\u901a\u8fc7\u5bf9\u6bd4\u5b66\u4e60\uff0c\u7814\u7a76\u4eba\u5458\u6b63\u8bd5\u56fe\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u6700\u8fd1\uff0c\u751a\u81f3\u8fdeGoogle\u7684SimCLR\u4e5f\u5c55\u793a\u4e86\u5bf9\u6bd4\u5b66\u4e60\u7684\u542b\u4e49\uff0c\u6211\u4eec\u5c06\u5728\u672c\u6587\u7684\u6700\u540e\u7b80\u8981\u4ecb\u7ecd\u8fd9\u4e00\u70b9\u3002<\/p>\n\n\n\n<h2>\u5bf9\u6bd4\u5b66\u4e60\u7684\u57fa\u672c\u539f\u5219<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/pinterest.com\/pin\/create\/bookmarklet\/?url=https%3A%2F%2Fanalyticsindiamag.com%2Fcontrastive-learning-self-supervised-ml%2F&amp;media=https%3A%2F%2Flh4.googleusercontent.com%2FNFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr&amp;is_video=false\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr\" alt=\"\"\/><\/a><figcaption>via <a href=\"https:\/\/ankeshanand.com\/blog\/2020\/01\/26\/contrative-self-supervised-learning.html\" target=\"_blank\" rel=\"noreferrer noopener\">Ankesh Anand<\/a><\/figcaption><\/figure>\n\n\n\n<p>\u5bf9\u6bd4\u5b66\u4e60\u662f\u4e00\u79cd\u4e3aML\u6a21\u578b\u63cf\u8ff0\u76f8\u4f3c\u548c\u4e0d\u540c\u4e8b\u7269\u7684\u4efb\u52a1\u7684\u65b9\u6cd5\u3002\u5229\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8bad\u7ec3\u673a\u5668\u5b66\u4e60\u6a21\u578b\u6765\u533a\u5206\u76f8\u4f3c\u548c\u4e0d\u540c\u7684\u56fe\u50cf\u3002<\/p>\n\n\n\n<p>\u5bf9\u6bd4\u5b66\u4e60\u7684\u5185\u90e8\u5de5\u4f5c\u53ef\u4ee5\u8868\u8ff0\u4e3a\u4e00\u4e2a\u5206\u6570\u51fd\u6570\uff0c\u5b83\u662f\u8861\u91cf\u4e24\u4e2a\u7279\u5f81\u4e4b\u95f4\u76f8\u4f3c\u5ea6\u7684\u4e00\u4e2a\u5c3a\u5ea6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/gWU6CnAgojtKx32iP9YvP0l3eLoSQH4bKBDiScQzzc_zgnzFo1_RUdhwkHoiHckWy7jUhOfC8rMatCIs29zu-b9FNIJdzcIwL7rCAMT4tePz1uJgKpHEMMY9jLfhn3YvhFKTIAc2\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u5728\u8fd9\u91cc<\/p>\n\n\n\n<p>x+\u662f\u4e0ex\u76f8\u4f3c\u7684\u6570\u636e\u70b9\uff0c\u79f0\u4e3a\u9633\u6027\u6837\u672c<\/p>\n\n\n\n<p>x\u2212\u662f\u4e0ex\u4e0d\u540c\u7684\u6570\u636e\u70b9\uff0c\u79f0\u4e3a\u9634\u6027\u6837\u672c<\/p>\n\n\n\n<p>\u5728\u6b64\u57fa\u7840\u4e0a\uff0c\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2asoftmax\u5206\u7c7b\u5668\u6765\u6b63\u786e\u5730\u5bf9\u6b63\u6837\u672c\u548c\u8d1f\u6837\u672c\u8fdb\u884c\u5206\u7c7b\u3002\u5728\u6700\u8fd1\u5f15\u5165\u7684 <a href=\"https:\/\/ai.googleblog.com\/2020\/04\/advancing-self-supervised-and-semi.html\" target=\"_blank\" rel=\"noreferrer noopener\">SimCLR<\/a> \u6846\u67b6\u4e2d\u4e5f\u53ef\u4ee5\u627e\u5230\u8fd9\u79cd\u6280\u672f\u7684\u7c7b\u4f3c\u5e94\u7528\u3002<\/p>\n\n\n\n<h2>\u5e94\u7528\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/pinterest.com\/pin\/create\/bookmarklet\/?url=https%3A%2F%2Fanalyticsindiamag.com%2Fcontrastive-learning-self-supervised-ml%2F&amp;media=https%3A%2F%2Flh6.googleusercontent.com%2FUVN-ArRhK7YeFcmWaTyPE8Qzqmt1cU_9Krnupz77OIW0qu3cT8GLuDvQEzuwGbN4kWLEwfkkdkaSAyhJPJUC2oY1MvmkU-Ghitj4XzRCvMCnUNgkpfVKphXTLyMhc4tqyF6OhnTB&amp;is_video=false\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/lh6.googleusercontent.com\/UVN-ArRhK7YeFcmWaTyPE8Qzqmt1cU_9Krnupz77OIW0qu3cT8GLuDvQEzuwGbN4kWLEwfkkdkaSAyhJPJUC2oY1MvmkU-Ghitj4XzRCvMCnUNgkpfVKphXTLyMhc4tqyF6OhnTB\" alt=\"\"\/><\/a><figcaption>via Google AI<\/figcaption><\/figure><\/div>\n\n\n\n<p>\u8c37\u6b4c\u63a8\u51fa\u4e86\u4e00\u4e2a\u540d\u4e3a\u201cSimCLR\u201d\u7684\u6846\u67b6\uff0c\u4f7f\u7528\u5bf9\u6bd4\u5b66\u4e60\u3002\u8be5\u6846\u67b6\u9996\u5148\u5b66\u4e60\u672a\u6807\u8bb0\u6570\u636e\u96c6\u4e0a\u56fe\u50cf\u7684\u4e00\u822c\u8868\u793a\uff0c\u7136\u540e\u9488\u5bf9\u7ed9\u5b9a\u7684\u5206\u7c7b\u4efb\u52a1\uff0c\u4f7f\u7528\u5e26\u6807\u7b7e\u56fe\u50cf\u7684\u5c0f\u6570\u636e\u96c6\u5bf9\u5176\u8fdb\u884c\u5fae\u8c03\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u540c\u65f6\u6700\u5927\u5316\u540c\u4e00\u56fe\u50cf\u7684\u4e0d\u540c\u7248\u672c\u6216\u89c6\u56fe\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\uff0c\u5e76\u901a\u8fc7\u5bf9\u6bd4\u5b66\u4e60\u7f29\u5c0f\u5dee\u5f02\u6765\u5b66\u4e60\u57fa\u672c\u8868\u5f81\u3002<\/p>\n\n\n\n<p>\u5f53\u4f7f\u7528\u8fd9\u4e2a\u5bf9\u6bd4\u76ee\u6807\u66f4\u65b0\u795e\u7ecf\u7f51\u7edc\u7684\u53c2\u6570\u65f6\uff0c\u76f8\u5e94\u89c6\u56fe\u7684\u8868\u793a\u76f8\u4e92\u201c\u5438\u5f15\u201d\uff0c\u800c\u975e\u5bf9\u5e94\u89c6\u56fe\u7684\u8868\u793a\u76f8\u4e92\u201c\u6392\u65a5\u201d\u3002<\/p>\n\n\n\n<p>\u5728<a href=\"https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/\">\u8fd9\u4e2a\u535a\u5ba2<\/a>\u4e2d\uff0c\u5bf9\u539f\u59cb\u8bba\u6587\u4f5c\u4e86\u66f4\u7ec6\u81f4\u7684\u89e3\u91ca\u3002<\/p>\n\n\n\n<p>\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol><li>\u9996\u5148\uff0c\u4ece\u539f\u59cb\u56fe\u50cf\u751f\u6210\u4e00\u5b9a\u5927\u5c0f\u7684\u6279\u5904\u7406\u6570\u636e\uff08Batch\uff09\uff0c\u6bd4\u5982N<\/li><li>\u5bf9\u4e8e\u8fd9\u4e2a\u6279\u5904\u7406\u4e2d\u7684\u6bcf\u4e2a\u56fe\u50cf\uff0c\u5e94\u7528\u4e00\u4e2a\u968f\u673a\u53d8\u6362\u51fd\u6570\u6765\u83b7\u5f97\u4e00\u5bf9\u4e24\u4e2a\u56fe\u50cf<\/li><li>\u4e00\u5bf9\u56fe\u50cf\u4e2d\u7684\u6bcf\u4e2a\u589e\u5f3a\u56fe\u50cf\u90fd\u901a\u8fc7\u4e00\u4e2a\u7f16\u7801\u5668\u6765\u83b7\u5f97\u56fe\u50cf\u8868\u793a\u3002<\/li><li>\u4e24\u4e2a\u589e\u5f3a\u56fe\u50cf\u7684\u8868\u793a\u7136\u540e\u901a\u8fc7\u4e00\u4e2a\u975e\u7ebf\u6027\u5bc6\u96c6\u5c42\uff0c\u7136\u540e\u662f\u4e00\u4e2aReLU\uff0c\u7136\u540e\u662f\u53e6\u4e00\u4e2a\u5bc6\u96c6\u5c42\u3002\u8fd9\u4e9b\u56fe\u50cf\u88ab\u4f20\u9012\u5230\u4e00\u7cfb\u5217\u8fd9\u4e9b\u5c42\u4e0a\uff0c\u4ee5\u5e94\u7528\u975e\u7ebf\u6027\u53d8\u6362\u5e76\u5c06\u5176\u6295\u5f71\u5230\u8868\u793a\u4e2d<\/li><li>\u5bf9\u4e8e\u6279\u5904\u7406\u4e2d\u7684\u6bcf\u4e2a\u589e\u5f3a\u56fe\u50cf\uff0c\u83b7\u53d6\u4e00\u4e2a\u5d4c\u5165\u5411\u91cf\u3002<\/li><\/ol>\n\n\n\n<p>\u73b0\u5728\uff0c\u56fe\u50cf\u7684\u4e24\u4e2a\u589e\u5f3a\u7248\u672c\u4e4b\u95f4\u7684\u76f8\u4f3c\u6027\u662f\u7528\u4f59\u5f26\u76f8\u4f3c\u6027\u6765\u8ba1\u7b97\u7684\u3002SimCLR\u4f7f\u7528\u201cNT-Xent\u635f\u5931\u201d\uff08\u6807\u51c6\u5316\u7684\u6e29\u5ea6\u6807\u5ea6\u4ea4\u53c9\u71b5\u635f\u5931\uff09\uff0c\u5373\u6240\u8c13\u7684\u5bf9\u6bd4\u635f\u5931<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/pinterest.com\/pin\/create\/bookmarklet\/?url=https%3A%2F%2Fanalyticsindiamag.com%2Fcontrastive-learning-self-supervised-ml%2F&amp;media=https%3A%2F%2Flh6.googleusercontent.com%2FOiR4taHQh_Z7Mr01lOyL5Vx5oacWIn9A8M1nZfpw95Iqph6Ob7SE0Wi2M7EkE77KuntjQAOBoWS--vYOFgj02DXQe8WOMG_PFoj0BRblgKTwfZ7S03dlkCKAp7AHWznEZk4VIwDr&amp;is_video=false\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/lh6.googleusercontent.com\/OiR4taHQh_Z7Mr01lOyL5Vx5oacWIn9A8M1nZfpw95Iqph6Ob7SE0Wi2M7EkE77KuntjQAOBoWS--vYOFgj02DXQe8WOMG_PFoj0BRblgKTwfZ7S03dlkCKAp7AHWznEZk4VIwDr\" alt=\"\"\/><\/a><figcaption>via <a href=\"https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/\" target=\"_blank\" rel=\"noreferrer noopener\">amitness<\/a><\/figcaption><\/figure>\n\n\n\n<p>\u9996\u5148\uff0c\u9010\u4e2a\u83b7\u53d6\u6279\u5904\u7406\u4e2d\u7684\u589e\u5e7f\u5bf9\u3002\u7136\u540e\u5e94\u7528\u4e00\u4e2asoftmax\u51fd\u6570\u6765\u8ba1\u7b97\u8fd9\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c\u7684\u6982\u7387\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/pinterest.com\/pin\/create\/bookmarklet\/?url=https%3A%2F%2Fanalyticsindiamag.com%2Fcontrastive-learning-self-supervised-ml%2F&amp;media=https%3A%2F%2Flh6.googleusercontent.com%2FftfybHRZSzAScbLe7mpXvg0MrAuQQpu1ViEzl0M-PsrgkHTTnHJiW-27VeeOnt5muzPvZfpzsZo1O4GwHdsUqqj_TnL14yd64NTTFr2tkr0tVJROn3jXW0MQ4qm_TKdVTsAqONef&amp;is_video=false\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/lh6.googleusercontent.com\/ftfybHRZSzAScbLe7mpXvg0MrAuQQpu1ViEzl0M-PsrgkHTTnHJiW-27VeeOnt5muzPvZfpzsZo1O4GwHdsUqqj_TnL14yd64NTTFr2tkr0tVJROn3jXW0MQ4qm_TKdVTsAqONef\" alt=\"\"\/><\/a><figcaption>via <a href=\"https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/\" target=\"_blank\" rel=\"noreferrer noopener\">amitness<\/a><\/figcaption><\/figure>\n\n\n\n<p>\u5982\u4e0a\u6240\u793a\uff0csoftmax\u51fd\u6570\u53ef\u7528\u4e8e\u8ba1\u7b97\u4e24\u4e2a\u589e\u5f3acat\u56fe\u50cf\u7684\u76f8\u4f3c\u6027\uff0c\u5e76\u5c06\u6279\u5904\u7406\u4e2d\u7684\u6240\u6709\u5269\u4f59\u56fe\u50cf\u4f5c\u4e3a\u4e0d\u540c\u7684\u56fe\u50cf\uff08\u8d1f\u5bf9\uff09\u8fdb\u884c\u91c7\u6837\u3002<\/p>\n\n\n\n<p>\u57fa\u4e8e\u8fd9\u79cd\u635f\u5931\uff0c\u7f16\u7801\u5668\u548c\u6295\u5f71\u5934\u7684\u8868\u793a\u4f1a\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\u800c\u6539\u8fdb\uff0c\u5e76\u4e14\u5f97\u5230\u7684\u8868\u793a\u5c06\u76f8\u4f3c\u7684\u56fe\u50cf\u653e\u5728\u66f4\u8fd1\u7684\u7a7a\u95f4\u4e2d\u3002<\/p>\n\n\n\n<p>SimCLR\u7684\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u5b83\u5728ImageNet\u4e0a\u7684\u6027\u80fd\u4f18\u4e8e\u4ee5\u5f80\u7684\u81ea\u76d1\u7763\u5b66\u4e60\u65b9\u6cd5\u3002<\/p>\n\n\n\n<h2>\u5176\u4ed6\u76f8\u5173\u535a\u5ba2\uff1a<\/h2>\n\n\n\n<p><a href=\"https:\/\/ankeshanand.com\/blog\/2020\/01\/26\/contrative-self-supervised-learning.html\">https:\/\/ankeshanand.com\/blog\/2020\/01\/26\/contrative-self-supervised-learning.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/\">https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81ea\uff1ahttps:\/\/analyticsindiamag.com\/contrastive-learning-self-supervised-ml\/ \u8fd1\u5e74\u6765\uff0c\u81ea\u6211\u76d1\u7763\u6a21\u5f0f\u7684\u6210\u529f\u53ef\u4ee5\u5f52\u56e0\u4e8e\u7814\u7a76\u8005\u5bf9\u5bf9\u6bd4\u5b66\u4e60\u8fd9\u4e00\u81ea\u6211\u76d1\u7763\u5b66\u4e60\u8303\u5f0f\u7684\u91cd\u65b0\u5174\u8da3\u3002\u4f8b\u5982\uff0c\u4eba\u7c7b\u53ef\u4ee5\u8fa8\u8ba4\u51fa\u91ce\u5916\u7684\u7269\u4f53\uff0c\u5373\u4f7f\u6211\u4eec\u4e0d\u8bb0\u5f97\u7269\u4f53\u7684\u786e\u5207\u6837\u5b50\u3002 \u6211\u4eec\u901a\u8fc7\u8bb0\u4f4f\u9ad8\u5c42\u7279\u5f81\u800c\u5ffd\u7565\u5fae\u89c2\u5c42\u9762\u7684\u7ec6\u8282\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u6240\u4ee5\uff0c\u73b0\u5728\u7684\u95ee\u9898\u662f\uff0c\u6211\u4eec\u662f\u5426\u53ef\u4ee5\u5efa\u7acb\u4e00\u4e2a\u4e0d\u5173\u6ce8\u50cf\u7d20\u7ea7\u7ec6\u8282\uff0c\u53ea\u7f16\u7801\u8db3\u4ee5\u533a\u5206\u4e0d\u540c\u5bf9\u8c61\u7684\u9ad8\u7ea7\u7279\u5f81\u7684\u8868\u793a\u5b66\u4e60\u7b97\u6cd5\uff1f\u901a\u8fc7\u5bf9\u6bd4\u5b66\u4e60\uff0c\u7814\u7a76\u4eba\u5458\u6b63\u8bd5\u56fe\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u3002 \u6700\u8fd1\uff0c\u751a\u81f3\u8fdeGoogle\u7684SimCLR\u4e5f\u5c55\u793a\u4e86\u5bf9\u6bd4\u5b66\u4e60\u7684\u542b\u4e49\uff0c\u6211\u4eec\u5c06\u5728\u672c\u6587\u7684\u6700\u540e\u7b80\u8981\u4ecb\u7ecd\u8fd9\u4e00\u70b9\u3002 \u5bf9\u6bd4\u5b66\u4e60\u7684\u57fa\u672c\u539f\u5219 \u5bf9\u6bd4\u5b66\u4e60\u662f\u4e00\u79cd\u4e3aML\u6a21\u578b\u63cf\u8ff0\u76f8\u4f3c\u548c\u4e0d\u540c\u4e8b\u7269\u7684\u4efb\u52a1\u7684\u65b9\u6cd5\u3002\u5229\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8bad\u7ec3\u673a\u5668\u5b66\u4e60\u6a21\u578b\u6765\u533a\u5206\u76f8\u4f3c\u548c\u4e0d\u540c\u7684\u56fe\u50cf\u3002 \u5bf9\u6bd4\u5b66\u4e60\u7684\u5185\u90e8\u5de5\u4f5c\u53ef\u4ee5\u8868\u8ff0\u4e3a\u4e00\u4e2a\u5206\u6570\u51fd\u6570\uff0c\u5b83\u662f\u8861\u91cf\u4e24\u4e2a\u7279\u5f81\u4e4b\u95f4\u76f8\u4f3c\u5ea6\u7684\u4e00\u4e2a\u5c3a\u5ea6\u3002 \u5728\u8fd9\u91cc x+\u662f\u4e0ex\u76f8\u4f3c\u7684\u6570\u636e\u70b9\uff0c\u79f0\u4e3a\u9633\u6027\u6837\u672c x\u2212\u662f\u4e0ex\u4e0d\u540c\u7684\u6570\u636e\u70b9\uff0c\u79f0\u4e3a\u9634\u6027\u6837\u672c \u5728\u6b64\u57fa\u7840\u4e0a\uff0c\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2asoftmax\u5206\u7c7b\u5668\u6765\u6b63\u786e\u5730\u5bf9\u6b63\u6837\u672c\u548c\u8d1f\u6837\u672c\u8fdb\u884c\u5206\u7c7b\u3002\u5728\u6700\u8fd1\u5f15\u5165\u7684 SimCLR \u6846\u67b6\u4e2d\u4e5f\u53ef\u4ee5\u627e\u5230\u8fd9\u79cd\u6280\u672f\u7684\u7c7b\u4f3c\u5e94\u7528\u3002 \u5e94\u7528\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09 \u8c37\u6b4c\u63a8\u51fa\u4e86\u4e00\u4e2a\u540d\u4e3a\u201cSimCLR\u201d\u7684\u6846\u67b6\uff0c\u4f7f\u7528\u5bf9\u6bd4\u5b66\u4e60\u3002\u8be5\u6846\u67b6\u9996\u5148\u5b66\u4e60\u672a\u6807\u8bb0\u6570\u636e\u96c6\u4e0a\u56fe\u50cf\u7684\u4e00\u822c\u8868\u793a\uff0c\u7136\u540e\u9488\u5bf9\u7ed9\u5b9a\u7684\u5206\u7c7b\u4efb\u52a1\uff0c\u4f7f\u7528\u5e26\u6807\u7b7e\u56fe\u50cf\u7684\u5c0f\u6570\u636e\u96c6\u5bf9\u5176\u8fdb\u884c\u5fae\u8c03\u3002 \u901a\u8fc7\u540c\u65f6\u6700\u5927\u5316\u540c\u4e00\u56fe\u50cf\u7684\u4e0d\u540c\u7248\u672c\u6216\u89c6\u56fe\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\uff0c\u5e76\u901a\u8fc7\u5bf9\u6bd4\u5b66\u4e60\u7f29\u5c0f\u5dee\u5f02\u6765\u5b66\u4e60\u57fa\u672c\u8868\u5f81\u3002 \u5f53\u4f7f\u7528\u8fd9\u4e2a\u5bf9\u6bd4\u76ee\u6807\u66f4\u65b0\u795e\u7ecf\u7f51\u7edc\u7684\u53c2\u6570\u65f6\uff0c\u76f8\u5e94\u89c6\u56fe\u7684\u8868\u793a\u76f8\u4e92\u201c\u5438\u5f15\u201d\uff0c\u800c\u975e\u5bf9\u5e94\u89c6\u56fe\u7684\u8868\u793a\u76f8\u4e92\u201c\u6392\u65a5\u201d\u3002 \u5728\u8fd9\u4e2a\u535a\u5ba2\u4e2d\uff0c\u5bf9\u539f\u59cb\u8bba\u6587\u4f5c\u4e86\u66f4\u7ec6\u81f4\u7684\u89e3\u91ca\u3002 \u7a0b\u5e8f\u5982\u4e0b\uff1a \u9996\u5148\uff0c\u4ece\u539f\u59cb\u56fe\u50cf\u751f\u6210\u4e00\u5b9a\u5927\u5c0f\u7684\u6279\u5904\u7406\u6570\u636e\uff08Batch\uff09\uff0c\u6bd4\u5982N \u5bf9\u4e8e\u8fd9\u4e2a\u6279\u5904\u7406\u4e2d\u7684\u6bcf\u4e2a\u56fe\u50cf\uff0c\u5e94\u7528\u4e00\u4e2a\u968f\u673a\u53d8\u6362\u51fd\u6570\u6765\u83b7\u5f97\u4e00\u5bf9\u4e24\u4e2a\u56fe\u50cf \u4e00\u5bf9\u56fe\u50cf\u4e2d\u7684\u6bcf\u4e2a\u589e\u5f3a\u56fe\u50cf\u90fd\u901a\u8fc7\u4e00\u4e2a\u7f16\u7801\u5668\u6765\u83b7\u5f97\u56fe\u50cf\u8868\u793a\u3002 \u4e24\u4e2a\u589e\u5f3a\u56fe\u50cf\u7684\u8868\u793a\u7136\u540e\u901a\u8fc7\u4e00\u4e2a\u975e\u7ebf\u6027\u5bc6\u96c6\u5c42\uff0c\u7136\u540e\u662f\u4e00\u4e2aReLU\uff0c\u7136\u540e\u662f\u53e6\u4e00\u4e2a\u5bc6\u96c6\u5c42\u3002\u8fd9\u4e9b\u56fe\u50cf\u88ab\u4f20\u9012\u5230\u4e00\u7cfb\u5217\u8fd9\u4e9b\u5c42\u4e0a\uff0c\u4ee5\u5e94\u7528\u975e\u7ebf\u6027\u53d8\u6362\u5e76\u5c06\u5176\u6295\u5f71\u5230\u8868\u793a\u4e2d \u5bf9\u4e8e\u6279\u5904\u7406\u4e2d\u7684\u6bcf\u4e2a\u589e\u5f3a\u56fe\u50cf\uff0c\u83b7\u53d6\u4e00\u4e2a\u5d4c\u5165\u5411\u91cf\u3002 \u73b0\u5728\uff0c\u56fe\u50cf\u7684\u4e24\u4e2a\u589e\u5f3a\u7248\u672c\u4e4b\u95f4\u7684\u76f8\u4f3c\u6027\u662f\u7528\u4f59\u5f26\u76f8\u4f3c\u6027\u6765\u8ba1\u7b97\u7684\u3002SimCLR\u4f7f\u7528\u201cNT-Xent\u635f\u5931\u201d\uff08\u6807\u51c6\u5316\u7684\u6e29\u5ea6\u6807\u5ea6\u4ea4\u53c9\u71b5\u635f\u5931\uff09\uff0c\u5373\u6240\u8c13\u7684\u5bf9\u6bd4\u635f\u5931 \u9996\u5148\uff0c\u9010\u4e2a\u83b7\u53d6\u6279\u5904\u7406\u4e2d\u7684\u589e\u5e7f\u5bf9\u3002\u7136\u540e\u5e94\u7528\u4e00\u4e2asoftmax\u51fd\u6570\u6765\u8ba1\u7b97\u8fd9\u4e24\u4e2a\u56fe\u50cf\u76f8\u4f3c\u7684\u6982\u7387\u3002 \u5982\u4e0a\u6240\u793a\uff0csoftmax\u51fd\u6570\u53ef\u7528\u4e8e\u8ba1\u7b97\u4e24\u4e2a\u589e\u5f3acat\u56fe\u50cf\u7684\u76f8\u4f3c\u6027\uff0c\u5e76\u5c06\u6279\u5904\u7406\u4e2d\u7684\u6240\u6709\u5269\u4f59\u56fe\u50cf\u4f5c\u4e3a\u4e0d\u540c\u7684\u56fe\u50cf\uff08\u8d1f\u5bf9\uff09\u8fdb\u884c\u91c7\u6837\u3002 \u57fa\u4e8e\u8fd9\u79cd\u635f\u5931\uff0c\u7f16\u7801\u5668\u548c\u6295\u5f71\u5934\u7684\u8868\u793a\u4f1a\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\u800c\u6539\u8fdb\uff0c\u5e76\u4e14\u5f97\u5230\u7684\u8868\u793a\u5c06\u76f8\u4f3c\u7684\u56fe\u50cf\u653e\u5728\u66f4\u8fd1\u7684\u7a7a\u95f4\u4e2d\u3002 SimCLR\u7684\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u5b83\u5728ImageNet\u4e0a\u7684\u6027\u80fd\u4f18\u4e8e\u4ee5\u5f80\u7684\u81ea\u76d1\u7763\u5b66\u4e60\u65b9\u6cd5\u3002 \u5176\u4ed6\u76f8\u5173\u535a\u5ba2\uff1a https:\/\/ankeshanand.com\/blog\/2020\/01\/26\/contrative-self-supervised-learning.html https:\/\/amitness.com\/2020\/03\/illustrated-simclr\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"categories":[1],"tags":[],"translation":{"provider":"WPGlobus","version":"3.0.1","language":"en","enabled_languages":["zh","en"],"languages":{"zh":{"title":true,"content":true,"excerpt":false},"en":{"title":false,"content":false,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.4.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xg1990.com\/blog\/archives\/588\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xg1990.com\/blog\/archives\/588\" \/>\n<meta property=\"og:site_name\" content=\"xg1990\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-06T12:12:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-06T12:12:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"xg1990\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xg1990.com\/blog\/#website\",\"url\":\"https:\/\/xg1990.com\/blog\/\",\"name\":\"xg1990\",\"description\":\"\u5730\u7406\u5708\u7684\u7801\u519c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/xg1990.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/588#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr\",\"contentUrl\":\"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/588#webpage\",\"url\":\"https:\/\/xg1990.com\/blog\/archives\/588\",\"name\":\"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990\",\"isPartOf\":{\"@id\":\"https:\/\/xg1990.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/588#primaryimage\"},\"datePublished\":\"2020-10-06T12:12:12+00:00\",\"dateModified\":\"2020-10-06T12:12:14+00:00\",\"author\":{\"@id\":\"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f\"},\"description\":\"\u8fd1\u5e74\u6765\uff0c\u81ea\u6211\u76d1\u7763\u6a21\u5f0f\u7684\u6210\u529f\u53ef\u4ee5\u5f52\u56e0\u4e8e\u7814\u7a76\u8005\u5bf9\u5bf9\u6bd4\u5b66\u4e60\u8fd9\u4e00\u81ea\u6211\u76d1\u7763\u5b66\u4e60\u8303\u5f0f\u7684\u91cd\u65b0\u5174\u8da3\u3002\u4f8b\u5982\uff0c\u4eba\u7c7b\u53ef\u4ee5\u8fa8\u8ba4\u51fa\u91ce\u5916\u7684\u7269\u4f53\uff0c\u5373\u4f7f\u6211\u4eec\u4e0d\u8bb0\u5f97\u7269\u4f53\u7684\u786e\u5207\u6837\u5b50\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/588#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xg1990.com\/blog\/archives\/588\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/588#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/xg1990.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f\",\"name\":\"xg1990\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/xg1990.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g\",\"caption\":\"xg1990\"},\"url\":\"https:\/\/xg1990.com\/blog\/en\/archives\/author\/xg1990\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xg1990.com\/blog\/archives\/588","og_locale":"en_US","og_type":"article","og_title":"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990","og_url":"https:\/\/xg1990.com\/blog\/archives\/588","og_site_name":"xg1990","article_published_time":"2020-10-06T12:12:12+00:00","article_modified_time":"2020-10-06T12:12:14+00:00","og_image":[{"url":"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr"}],"twitter_misc":{"Written by":"xg1990"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/xg1990.com\/blog\/#website","url":"https:\/\/xg1990.com\/blog\/","name":"xg1990","description":"\u5730\u7406\u5708\u7684\u7801\u519c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xg1990.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/xg1990.com\/blog\/archives\/588#primaryimage","inLanguage":"en-US","url":"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr","contentUrl":"https:\/\/lh4.googleusercontent.com\/NFYj5oT4MCnqcMSu_asvwqAb1A8rmzZr0jB2SZjMJiOGEz_my3VWcZq_jOGMogc_fwnuFGmXbaHjAa6eugaeauio1uvgR5W9be7tn_Nxo0jXiWGIb-eB9x6km22ZM6kOqIA0YAyr"},{"@type":"WebPage","@id":"https:\/\/xg1990.com\/blog\/archives\/588#webpage","url":"https:\/\/xg1990.com\/blog\/archives\/588","name":"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f - xg1990","isPartOf":{"@id":"https:\/\/xg1990.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/xg1990.com\/blog\/archives\/588#primaryimage"},"datePublished":"2020-10-06T12:12:12+00:00","dateModified":"2020-10-06T12:12:14+00:00","author":{"@id":"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f"},"description":"\u8fd1\u5e74\u6765\uff0c\u81ea\u6211\u76d1\u7763\u6a21\u5f0f\u7684\u6210\u529f\u53ef\u4ee5\u5f52\u56e0\u4e8e\u7814\u7a76\u8005\u5bf9\u5bf9\u6bd4\u5b66\u4e60\u8fd9\u4e00\u81ea\u6211\u76d1\u7763\u5b66\u4e60\u8303\u5f0f\u7684\u91cd\u65b0\u5174\u8da3\u3002\u4f8b\u5982\uff0c\u4eba\u7c7b\u53ef\u4ee5\u8fa8\u8ba4\u51fa\u91ce\u5916\u7684\u7269\u4f53\uff0c\u5373\u4f7f\u6211\u4eec\u4e0d\u8bb0\u5f97\u7269\u4f53\u7684\u786e\u5207\u6837\u5b50\u3002","breadcrumb":{"@id":"https:\/\/xg1990.com\/blog\/archives\/588#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xg1990.com\/blog\/archives\/588"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/xg1990.com\/blog\/archives\/588#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xg1990.com\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4ec0\u4e48\u662f\u5bf9\u6bd4\u5b66\u4e60\uff08Contrastive Learning\uff09\uff1f"}]},{"@type":"Person","@id":"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f","name":"xg1990","image":{"@type":"ImageObject","@id":"https:\/\/xg1990.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g","caption":"xg1990"},"url":"https:\/\/xg1990.com\/blog\/en\/archives\/author\/xg1990"}]}},"_links":{"self":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/588"}],"collection":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":2,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/588\/revisions\/590"}],"wp:attachment":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}