{"id":323172,"date":"2021-05-15T15:00:32","date_gmt":"2021-05-15T15:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=323172"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=323172","title":{"rendered":"\u041c\u0430\u0442\u0440\u0438\u0446\u0430-\u041f\u0435\u0440\u0435\u043c\u0430\u0442\u0440\u0438\u0446\u0430"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b94\/797\/212\/b947972126c68cc727a970a6fb82210d.jpg\" alt=\"\u0422\u0435\u043d\u0437\u043e\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443\" title=\"\u0422\u0435\u043d\u0437\u043e\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443\" width=\"900\" height=\"600\"><figcaption>\u0422\u0435\u043d\u0437\u043e\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443<\/figcaption><\/figure>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044f\u0445 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u0438 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430, \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043c\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c). \u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u201c\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u201d \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0438\u0437 \u043c\u0430\u0442\u0440\u0438\u0446, \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0441\u0442\u0440\u0430\u0448\u0430\u044e\u0449\u0435. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u201c\u043d\u0430\u0441 \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0441\u0442\u0435\u0440\u0435\u0433\u0430\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u201d.  \u041f\u043e\u0440\u0430 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0431\u043b\u0438\u0436\u0435.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438 : \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442; <\/p>\n<\/li>\n<li>\n<p> \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u0448\u0430\u0433\u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NumPy\" rel=\"noopener noreferrer nofollow\"><strong>NumPy<\/strong><\/a> . \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0435, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0417\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043d\u043e \u043d\u0435 \u043e\u0442\u0447\u0430\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 &#8212; \u0432\u0438\u043d\u0442\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0437\u0430\u043a\u0440\u0443\u0442\u0438\u0442\u044c, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e &#8212; \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445:  \u043b\u0438\u0431\u043e <strong>\u0441\u0431\u043e\u0439 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435<\/strong>, \u043b\u0438\u0431\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445.<\/p>\n<h2>\u041c\u0430\u0442\u0440\u0438\u0446\u044b &#8212; \u043e\u043d\u0438 \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u044b<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f &#8212; <strong>\u0442\u0435\u043d\u0437\u043e\u0440<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0442\u0435\u043d\u0437\u043e\u0440 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u043b\u0438\u0434\u043d\u0435\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u043e\u043d \u0432\u043e\u0448\u0435\u043b \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f Google <a href=\"https:\/\/ru.wikipedia.org\/wiki\/TensorFlow\" rel=\"noopener noreferrer nofollow\"><strong>TensorFlow<\/strong><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043e\u043d \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0441\u044c\u044e, \u043e\u043d \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <strong>\u0432\u0435\u043a\u0442\u043e\u0440<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"a_{i}\" alt=\"a_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c19\/c03\/1b8\/c19c031b8852afcb0a1f1e1bea71f575.svg\"> , \u0433\u0434\u0435 \u0438\u043d\u0434\u0435\u043a\u0441  <img decoding=\"async\" class=\"formula inline\" source=\"i = 0, 1, 2, \u2026, n-1\" alt=\"i = 0, 1, 2, \u2026, n-1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/216\/a5a\/f1b\/216a5af1be81aaeeebdf906741e10f27.svg\">; <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/edf\/206\/9c5\/edf2069c5942fa50ccae5b5f14fd6012.svg\"> &#8212; \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"python\">import numpy as np # \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f numpy a=np.array([1,2,5]) a.ndim # \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0435\u0439 = 1 a.shape # \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0441\u0438 (3,) a.shape[0] # \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043e\u0441\u0438 = 3<\/code><\/pre>\n<p><strong>\u0421\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong> \u0434\u0432\u0443\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"a_{i}\\cdot b_{i}= a_{0}\\cdot b_{0}+a_{1}\\cdot b_{1}+a_{2}\\cdot b_{2}\" alt=\"a_{i}\\cdot b_{i}= a_{0}\\cdot b_{0}+a_{1}\\cdot b_{1}+a_{2}\\cdot b_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/434\/56a\/f8c\/43456af8c51c9c70ed0ea82d271b9b1e.svg\">\u200b. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0434\u0435\u0441\u044c \u200b \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 2 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<pre><code class=\"python\">b=np.array([3,4,7]) np.dot(a,b) # \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 = 46 a*b # \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 array([ 3,  8, 35]) np.sum(a*b) # = 46<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u0442\u0435\u043d\u0437\u043e\u0440\u0443 (\u0442\u0435\u043d\u0437\u043e\u0440\u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430) &#8212; <strong>\u043c\u0430\u0442\u0440\u0438\u0446\u0435<img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e70\/648\/21f\/e7064821f86fd7fde6cbf9a20c31b3e7.svg\"><\/strong>\u200b, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u0430\u043a<img decoding=\"async\" class=\"formula inline\" source=\"A_{i, j} \" alt=\"A_{i, j} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbb\/00c\/5ec\/fbb00c5ec483e6efa2707bddb8e3607d.svg\">\u200b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <img decoding=\"async\" class=\"formula inline\" source=\"A_{0, 2}\" alt=\"A_{0, 2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f8\/b17\/980\/8f8b17980a0f0e927d4f04495c0288d0.svg\">&#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0438 0-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 2-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0418\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0435 \u043e\u0441\u0438.<\/p>\n<pre><code class=\"python\">A=np.array([[ 1,  2,  3],             [ 2,  4,  6]]) A # array([[1, 2, 3],   #        [2, 4, 6]]) A[0, 2] # \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 = 3 A.shape # (2, 3) \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 2 \u0441\u0442\u0440\u043e\u043a\u0438, 3 \u0441\u0442\u043e\u043b\u0431\u0446\u0430<\/code><\/pre>\n<p>\u041f\u0440\u0438 <strong>\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0430\u0442\u0440\u0438\u0446<\/strong><img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/311\/015\/cee\/311015ceecfab7767ec06a0eb7c1e31c.svg\">\u0438<img decoding=\"async\" class=\"formula inline\" source=\"B\" alt=\"B\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d04\/a25\/d87\/d04a25d87133c54938823773e41a1d0f.svg\">\u200b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c  \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"C=AB\" alt=\"C=AB\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e8\/788\/04d\/6e878804d0febd5872a53f373d66c36a.svg\"> \u200b , \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"C_{i,k}=A_{i, j}B_{j, k}\" alt=\"C_{i,k}=A_{i, j}B_{j, k}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c81\/551\/7e7\/c815517e7f6227cb9eedfb75fd3b751e.svg\">\u200b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b<img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fb6\/c26\/d95\/fb6c26d958400b13b1c22e120d963531.svg\">\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0440\u043e\u043a<img decoding=\"async\" class=\"formula inline\" source=\"B\" alt=\"B\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d0f\/ad0\/b9e\/d0fad0b9ec84fe9f039541ef3b782064.svg\">\u200b (\u043f\u0435\u0440\u0432\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a6\/aaf\/89f\/8a6aaf89fbd661c336cef1d97e4753b3.svg\">  \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u043c<img decoding=\"async\" class=\"formula inline\" source=\"B\" alt=\"B\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e29\/092\/d32\/e29092d32974fa13a8b6fa228e3bf9ff.svg\">\u200b)<\/p>\n<pre><code class=\"python\">B=np.array([[7, 8, 1, 3],             [5, 4, 2, 7],             [3, 6, 9, 4]]) A.shape[1] == B.shape[0] # true A.shape[1], B.shape[0] # (3, 3)  A.shape, B.shape # ((2, 3), (3, 4)) C = np.dot(A, B) C # array([[26, 34, 32, 29],   #        [52, 68, 64, 58]]);    #  \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, C[0,1]=A[0,0]B[0,1]+ A[0,1]B[1,1]+A[0,2]B[2,1]=1*8+2*4+3*6=34 C.shape # (2, 4)   <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"BA\" alt=\"BA\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/548\/95d\/49a\/54895d49a076acef95cb21e210545350.svg\">\u200b , \u0442\u043e:<\/p>\n<pre><code class=\"python\">np.dot(B, A) # ValueError: shapes (3,4) and (2,3) not aligned: 4 (dim 1) != 2 (dim 0)<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img decoding=\"async\" class=\"formula inline\" source=\"B\" alt=\"B\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/59c\/253\/429\/59c2534293efd1ee0dbdadd37fed7e4e.svg\">\u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d26\/cba\/483\/d26cba48392fb8bcedfb49b5da800f9d.svg\">, \u043e \u0447\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0440\u0435\u0447\u0438\u0432\u043e \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432.  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"a_{i, 0}\" alt=\"a_{i, 0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aef\/138\/86e\/aef13886ee2174475a9dd2a82f82a3bc.svg\">\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"b_{j, 0}\" alt=\"b_{j, 0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d9\/71f\/e28\/8d971fe28ba7ad9d6ab3d4a3a097d819.svg\">\u200b. \u0417\u0430\u0442\u0435\u043c \u0438\u043c\u0435\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"D_{i,j}=a_{i,0}b_{j,0}\" alt=\"D_{i,j}=a_{i,0}b_{j,0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f1\/c41\/510\/4f1c415103d673c6fd538551b1b2bbce.svg\">\u200b. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d \u0441\u0442\u043e\u0438\u0442 \u043d\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445  \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043e\u043c <img decoding=\"async\" class=\"formula inline\" source=\"b_{j, 0}=(b.T)_{0, j}\" alt=\"b_{j, 0}=(b.T)_{0, j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f82\/de0\/31d\/f82de031d91efede27c7596923adcc29.svg\">\u200b, \u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"b.T\" alt=\"b.T\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b06\/018\/677\/b0601867762314824dcb8ccf9e7b7e42.svg\">&#8212; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A2%D1%80%D0%B0%D0%BD%D1%81%D0%BF%D0%BE%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%B0%D1%8F_%D0%BC%D0%B0%D1%82%D1%80%D0%B8%D1%86%D0%B0\" rel=\"noopener noreferrer nofollow\"><strong>\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430<\/strong><\/a> (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f  <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NumPy\" rel=\"noopener noreferrer nofollow\"><strong>NumPy<\/strong><\/a>). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u0435\u043c<img decoding=\"async\" class=\"formula inline\" source=\"D=a\\cdot b.T\" alt=\"D=a\\cdot b.T\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/855\/675\/4ee\/8556754eedcd8956df3a39dff9d658cd.svg\"> \u200b.  \u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u0447\u0442\u043e  \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"D.T=(a\\cdot b.T).T=(b.T.T)\\cdot a.T=b\\cdot a.T\" alt=\"D.T=(a\\cdot b.T).T=(b.T.T)\\cdot a.T=b\\cdot a.T\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dfc\/e95\/936\/dfce95936bda4ebaa96172cf6676a543.svg\">\u200b.<\/p>\n<pre><code class=\"python\">a = np.reshape(a, (3,1)) # \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0442\u0435\u043d\u0437\u043e\u0440\u0430, \u043e\u0442 a.shape = (3,) \u043a (3,1), b = np.reshape(b, (3,1)) # \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438, \u043e\u0434\u0438\u043d \u0441\u0442\u043e\u043b\u0431\u0435\u0446 D = np.dot(a,b.T) D # array([[ 3,  4,  7],   #        [ 6,  8, 14],   #        [15, 20, 35]])<\/code><\/pre>\n<h2>\u0418\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/h2>\n<p>\u0412\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u043d\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043a\u0430\u043a \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a \u0441 \u0440\u0443\u0447\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u044f\u0449\u0438\u043a\u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041c\u0435\u0440\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/en.wikipedia.org\/wiki\/Loss_function\" rel=\"noopener noreferrer nofollow\"><strong>\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c<\/strong><\/a> (<strong>cost function<\/strong>). \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0440\u0443\u0447\u043a\u0438 \u043a\u0440\u0443\u0442\u044f\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0433\u0447\u0435. \u0422\u0443\u0434\u0430 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0438 \u043a\u0440\u0443\u0442\u0438\u043c. \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0448\u043b\u0438 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0438 \u043a\u0430\u0436\u0434\u0443\u044e \u0440\u0443\u0447\u043a\u0443 \u043f\u043e\u043a\u0440\u0443\u0442\u0438\u043b\u0438 \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c (<a href=\"https:\/\/wiki.loginom.ru\/articles\/learning-rate.html\" rel=\"noopener noreferrer nofollow\"><strong>learning rate<\/strong><\/a>), \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0434\u043d\u0430 <a href=\"https:\/\/towardsdatascience.com\/epoch-vs-iterations-vs-batch-size-4dfb9c7ce9c9\" rel=\"noopener noreferrer nofollow\"><strong>\u044d\u043f\u043e\u0445\u0430<\/strong><\/a> (<strong>epoch<\/strong>). \u0418 \u0442\u0430\u043a \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c. \u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0440\u0443\u0447\u0435\u043a (<strong>\u0432\u0435\u0441\u0430<\/strong>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u0432\u0435\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432 \u043d\u0430\u0448 \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a \u043b\u044e\u0431\u044b\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u0420\u0430\u043d\u044c\u0448\u0435 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c <strong>\u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435<\/strong>, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043a\u0430\u043a \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0442\u0430\u043a \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438 \u043d\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db9\/20e\/883\/db920e88377e181d40a812b3970f005e.jpeg\" alt=\"\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u044b\u0445\" title=\"\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u044b\u0445\" width=\"800\" height=\"476\"><figcaption>\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u044b\u0445<\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0438\u0437 <a href=\"https:\/\/towardsdatascience.com\/how-to-build-your-own-neural-network-from-scratch-in-python-68998a08e4f6\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u0440\u0443\u0441\u0441\u043a\u0438\u0439 <a href=\"https:\/\/neurohive.io\/ru\/tutorial\/kak-sozdat-nejronnuju-set-s-nulja-na-jazyke-python\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> ).<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80e\/7fc\/445\/80e7fc44510dbc8017e834e4b690e4d8.png\" width=\"420\" height=\"422\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 (<strong>samples<\/strong>) . \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u0441 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430 (\u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439), \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0441\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e (\u043e\u0441\u044c \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c ) &#8212; \u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 (<strong>samples<\/strong>), \u0432\u0442\u043e\u0440\u0430\u044f  &#8212; \u043e\u0441\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (<strong>features<\/strong>).  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438\u043c\u0435\u0435\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 (<strong>\u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>). \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c (\u043c\u0443\u0436\u0447\u0438\u043d\u0430, \u0436\u0435\u043d\u0449\u0438\u043d\u0430 \u0438 \u2026) \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b  \u043a\u043e\u043d\u0447\u0438\u043a\u0430 \u043d\u043e\u0441\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430. <\/p>\n<h3>\u041f\u043e\u043b\u043d\u044b\u0439 \u0432\u043f\u0435\u0440\u0435\u0434!<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u043d\u0430\u0448\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0433\u0443\u043b\u044f\u0435\u043c \u043f\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B5%D1%82%D0%BE%D0%B4_%D0%BB%D0%BE%D0%BA%D1%83%D1%81%D0%BE%D0%B2\" rel=\"noopener noreferrer nofollow\">\u201c<strong>\u0414\u0432\u043e\u0440\u0446\u0443 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong>\u201d<\/a> . \u0422\u0430\u043c \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041c\u044b \u0432\u043e\u043b\u044c\u043d\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0446\u0435\u043f\u043b\u044f\u043b\u0430\u0441\u044c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446. \u0415\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0438 \u0435\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0439\u0434\u0435\u043c \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h4>\u0412\u0445\u043e\u0434<\/h4>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c 10 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441 \u0442\u0440\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u200b \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 (10, 3).  \u041f\u043e\u043a\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0435\u0435 \u201c\u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430\u201d, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418\u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443:<\/p>\n<ul>\n<li>\n<p>\u0446\u0435\u043b\u044b\u043c\u0438 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442 0 \u0434\u043e 50 ; <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=np.random.randint(0, 50, (10, 3))<\/code><\/pre>\n<ul>\n<li>\n<p>\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1;<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=np.random.rand(10, 3)<\/code><\/pre>\n<ul>\n<li>\n<p>\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9D%D0%BE%D1%80%D0%BC%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5_%D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u043a\u043e\u043d\u0443<\/a> \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"\\mu=2\" alt=\"\\mu=2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c9\/612\/b3f\/9c9612b3fc5985cda83bc129d749b34b.svg\"> \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439<img decoding=\"async\" class=\"formula inline\" source=\"\\sigma ^2=16\" alt=\"\\sigma ^2=16\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/181\/eb4\/105\/181eb4105e67e6b0510ba011d49320c3.svg\">\u200b.  \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0413\u0430\u0443\u0441\u0441\u0430, \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a<img decoding=\"async\" class=\"formula inline\" source=\"N(\\mu,\\sigma^2)\" alt=\"N(\\mu,\\sigma^2)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/61a\/33c\/fb7\/61a33cfb71dbb0d4bc067586bf45d5b1.svg\">;<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=4*np.random.randn(10, 3) + 2<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\mu=0\" alt=\"\\mu=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f12\/953\/344\/f12953344009c4bc889449ba35a27cb5.svg\"> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\\sigma = 1\" alt=\"\\sigma = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f9\/c54\/47d\/1f9c5447db565bd7ca84581a6f4031e0.svg\">\u200b,  \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c. <\/p>\n<h4>\u0412\u044b\u0445\u043e\u0434<\/h4>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"X\" alt=\"X\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cc8\/1e9\/410\/cc81e9410c7defc8d37c4a9a5db87212.svg\">\u0441 \u0444\u043e\u0440\u043c\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"(10, 3)\" alt=\"(10, 3)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bd\/ef7\/04b\/1bdef704b6b8201ee5b5ab7ed08e912c.svg\">\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W^{(1)}\" alt=\"W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8f\/dfb\/9ce\/b8fdfb9ce7666c6b9631a60debad6dcf.svg\">\u200b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f,  \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e, \u043f\u043e\u043b\u0430\u0433\u0430\u044f\u0441\u044c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, <img decoding=\"async\" class=\"formula inline\" source=\"W^{(1)}\" alt=\"W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/33e\/d6b\/d07\/33ed6bd0773e86a48e3f36663a3abbd4.svg\">\u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0444\u043e\u0440\u043c\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"(3, 4)\" alt=\"(3, 4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ef\/918\/2e6\/4ef9182e62727a8fa36bce42058ef85c.svg\">. \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e <img decoding=\"async\" class=\"formula inline\" source=\"(10, 3)(3, 4)\\Rightarrow(10, 4)\" alt=\"(10, 3)(3, 4)\\Rightarrow(10, 4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/964\/8b9\/04b\/9648b904bff7628b7f32bce0e97129eb.svg\">\u200b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"X\\cdot W^{(1)}\" alt=\"X\\cdot W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db9\/24b\/6eb\/db924b6eb58962896ba6547d66f21626.svg\">\u0441 \u0444\u043e\u0440\u043c\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"(10,4)\" alt=\"(10,4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4eb\/b56\/6ae\/4ebb566ae5663ea3ddf64e8426f5ee50.svg\">\u200b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 &#8212; \u043f\u0440\u0438\u0447\u0435\u043c \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c &#8212; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F_%D0%B0%D0%BA%D1%82%D0%B8%D0%B2%D0%B0%D1%86%D0%B8%D0%B8\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/a> , \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"A\" alt=\"A\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b51\/61e\/b90\/b5161eb9094ae00254ae3bdad6012a4b.svg\">\u200b\u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u200b<img decoding=\"async\" class=\"formula inline\" source=\"(m,n)\" alt=\"(m,n)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44f\/77b\/275\/44f77b2753eaca450cf6283e237e1c6d.svg\">( <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06c\/288\/c6c\/06c288c6c39b0ae31c2e20fcf266ed51.svg\">\u0441\u0442\u0440\u043e\u043a, <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/321\/316\/bf5\/321316bf5acf2ba2bf223fe763a4b3c6.svg\">\u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 ) \u0438 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"a_{i,j}\" alt=\"a_{i,j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f04\/f3c\/9dd\/f04f3c9ddbc8dd600298add5dbac4cc3.svg\">\u200b, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"f(A)\" alt=\"f(A)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/180\/0a7\/2e7\/1800a72e7bf40d2508b65cc28aafb24c.svg\">\u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u043e\u0439, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0432\u043d\u044b <img decoding=\"async\" class=\"formula inline\" source=\"f(a_{i,j})\" alt=\"f(a_{i,j})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43e\/b6c\/cc0\/43eb6ccc0d2ebb342a3b15f4c7711262.svg\">; \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"a_{1,2}\\Rightarrow f(a_{1,2})\" alt=\"a_{1,2}\\Rightarrow f(a_{1,2})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4c\/328\/dc4\/d4c328dc4ee152718756c0b1776c4247.svg\">, \u0438 \u0442\u0430\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0438\u0441\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W^{(2)}\" alt=\"W^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fda\/3ae\/596\/fda3ae596863705745a0786f4a25228a.svg\">\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0444\u043e\u0440\u043c\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"(4, 1)\" alt=\"(4, 1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/792\/656\/6d9\/7926566d9ba859fd1d903c34cc37278f.svg\">\u200b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <img decoding=\"async\" class=\"formula inline\" source=\"(10, 3)(3, 4)(4, 1)\\Rightarrow(10, 1)\" alt=\"(10, 3)(3, 4)(4, 1)\\Rightarrow(10, 1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/659\/86b\/704\/65986b70423e74bbd8226333069507b7.svg\">\u200b. \u0418\u0442\u0430\u043a, \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u200b <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{Y}\" alt=\"\\hat{Y}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d6a\/826\/1b1\/d6a8261b11b76da1ee0dd9bbac3c7fe1.svg\">\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 10-\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 (<strong>samples<\/strong>) \u0438 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c. \u0412 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\hat{Y}=X\\cdot W^{(1)}\\cdot W^{(2)}, \\quad\\quad \\hat{Y}_{i,0}=X_{i,j} W_{j,k}^{(1)} W_{k,0}^{(2)}.\" alt=\"\\hat{Y}=X\\cdot W^{(1)}\\cdot W^{(2)}, \\quad\\quad \\hat{Y}_{i,0}=X_{i,j} W_{j,k}^{(1)} W_{k,0}^{(2)}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ed\/acb\/1a1\/9edacb1a1156a974ac0c3ab9c90363e7.svg\" width=\"327\" height=\"28\"><\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f (<strong>bias<\/strong>).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u0434\u0435. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435, \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0444\u043e\u0440\u043c\u043e\u0439. <\/p>\n<pre><code class=\"python\">X=np.random.randint(0, 50, (10, 3)) w1=2*np.random.rand(3,4)-1 # \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 -1 \u0434\u043e +1 w2=2*np.random.rand(4,1)-1 Y=np.dot(np.dot(x,w1),w2) # \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 Y.shape # (10, 1) Y.T.shape # (1, 10) (np.dot(Y.T,Y)).shape # (1, 1), \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0432\u0435\u0440\u0442\u043a\u0435<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b  \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u200b. \u041c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0438 \u0432\u0435\u0441\u0430 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 -1 \u0434\u043e +1, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u201c\u043c\u0443\u0442\u043d\u044b\u0445\u201d \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (\u043f\u043e\u043a\u0430 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e). <\/p>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/strong>. \u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"f_1\" alt=\"f_1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e3\/3de\/3bf\/9e33de3bf607e0964eb454e1859ec589.svg\">\u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u201c\u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f\u201d, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 . \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u0435\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\hat{Y}_{i,0}=f_2(f_1(X_{i,j} W_{j,k}^{(1)})W_{k,0}^{(2)}),\" alt=\"\\hat{Y}_{i,0}=f_2(f_1(X_{i,j} W_{j,k}^{(1)})W_{k,0}^{(2)}),\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f14\/ef5\/5f2\/f14ef55f2e62792795dded5f9c845f3f.svg\" width=\"204\" height=\"28\"><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\hat{Y}=f_2(f_1(X \\cdot W^{(1)})\\cdot W^{(2)}).\" alt=\"\\hat{Y}=f_2(f_1(X \\cdot W^{(1)})\\cdot W^{(2)}).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c6\/9a2\/054\/9c69a2054557c96d14b502b8cc4909a2.svg\" width=\"200\" height=\"23\"><\/p>\n<p>\u041f\u043e\u0434\u0430\u0432\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Loss_function\" rel=\"noopener noreferrer nofollow\"><strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c<\/strong><\/a> <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\triangle=\\sum_i(Y_{i,0}-\\hat{Y}_{i,0})^2=\\sum_i\\widetilde{Y}_{i,0}^2=(\\widetilde{Y}.T)_{0,i}\\widetilde{Y}_{i,0}=(\\widetilde{Y}.T)\\cdot\\widetilde{Y},\" alt=\"\\triangle=\\sum_i(Y_{i,0}-\\hat{Y}_{i,0})^2=\\sum_i\\widetilde{Y}_{i,0}^2=(\\widetilde{Y}.T)_{0,i}\\widetilde{Y}_{i,0}=(\\widetilde{Y}.T)\\cdot\\widetilde{Y},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f1\/886\/737\/2f18867373de83e5d6fb0e7513eb58d0.svg\" width=\"427\" height=\"40\"><\/p>\n<p> \u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"(X,Y)\" alt=\"(X,Y)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a3\/b4b\/7fe\/5a3b4b7fe7ab45c7acabfda9be2be113.svg\">&#8212; \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440, \u0438 \u043c\u044b \u0432\u0432\u0435\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\widetilde{Y}_{i,0}=Y_{i,0}-\\hat{Y}_{i,0}\" alt=\"\\widetilde{Y}_{i,0}=Y_{i,0}-\\hat{Y}_{i,0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ae\/576\/8d7\/5ae5768d7b42acd38b04a91103dba95a.svg\">. \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c,  \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"(\\widetilde{Y}.T)_{0,i}=\\widetilde{Y}_{i,0}\" alt=\"(\\widetilde{Y}.T)_{0,i}=\\widetilde{Y}_{i,0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a97\/fc4\/769\/a97fc476981236e171bfca7da9a34174.svg\">.<\/p>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. <strong>\u041f\u043e\u0440\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c<\/strong>.<\/p>\n<h3>\u041d\u0430\u0437\u0430\u0434<\/h3>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u0412\u044b\u0445\u043e\u0434 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446. \u041f\u0440\u0438\u0447\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c <strong>\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0443\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432.<\/p>\n<h4>\u041c\u0435\u0442\u043e\u0434 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c &#8212; \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432 \u0440\u043e\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432\u0435\u0441\u0430. \u042d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"f(x)\" alt=\"f(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/85a\/1e8\/550\/85a1e8550f80e6b47ec71342312f783f.svg\">\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"f^{'}(x_0)=0\" alt=\"f^{'}(x_0)=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a1\/653\/8ac\/7a16538ac0dad64de9127528bfb7bd37.svg\">\u200b, \u0433\u0434\u0435 \u201c\u0448\u0442\u0440\u0438\u0445 \u201d &#8212; \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f. \u0415\u0441\u043b\u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u0432 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043f\u0440\u043e\u0449\u0435: \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u0435\u0441\u043e\u0432 &#8212; \u043e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043d\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, &#8212; \u0437\u0430\u0442\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430. \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0441\u0430 (\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0438\u0445 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 16 \u0448\u0442\u0443\u043a), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u0430\u044f, \u0435\u0441\u043b\u0438 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435. \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u043e\u0442 \u043d\u0443\u043b\u044f \u0432 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438 \u0441\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u0432\u043d\u0438\u0437,<img decoding=\"async\" class=\"formula inline\" source=\"f^{'}(W)<0\" alt=\"f^{'}(W)<0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bbc\/1e4\/fdb\/bbc1e4fdbc19d81b531a93fd8819c849.svg\">\u200b, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0441\u043a\u043b\u043e\u043d\u0443, <img class=\"formula inline\" source=\"f^{'}(W)>0&#8243; alt=&#187;f^{&#8216;}(W)>0&#8243; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2b0\/95c\/777\/2b095c777bd0ac0fa268b2d6dc1bdfb4.svg&#187;> \u200b, \u043b\u0443\u0447\u0448\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0430\u0434  \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443.  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u200b\u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c. \u0414\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u0438\u043c\u0435\u0435\u043c  <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"W\\Rightarrow W+\\mu\\cdot\\delta W=W-\\mu\\cdot\\frac{\\partial \\triangle}{\\partial W},\" alt=\"W\\Rightarrow W+\\mu\\cdot\\delta W=W-\\mu\\cdot\\frac{\\partial \\triangle}{\\partial W},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c2\/180\/0c3\/7c21800c3b27e260fe92f48bea15f0b8.svg\" width=\"242\" height=\"37\"><\/p>\n<p>\u0438\u043b\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442  <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"W_{i,j}\\Rightarrow W_{i,j}+\\mu\\cdot\\delta W_{i,j}=W_{i,j}-\\mu\\cdot\\frac{\\partial \\triangle}{\\partial W_{i,j}},\" alt=\"W_{i,j}\\Rightarrow W_{i,j}+\\mu\\cdot\\delta W_{i,j}=W_{i,j}-\\mu\\cdot\\frac{\\partial \\triangle}{\\partial W_{i,j}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d84\/2a1\/e51\/d842a1e5177c3679d4d0f05f82f73bfa.svg\" width=\"301\" height=\"42\"><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\mu\" alt=\"\\mu\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/831\/6f9\/c73\/8316f9c73c9726e44dff9e295c4d6ff8.svg\">&#8212; <a href=\"https:\/\/wiki.loginom.ru\/articles\/learning-rate.html\" rel=\"noopener noreferrer nofollow\"><strong>\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/strong><\/a> (<strong>learning rate<\/strong>).  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0441\u0442\u043e\u044f\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0432 \u044d\u0442\u0438\u0445 \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u0445 \u0435\u0449\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442  <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D1%80%D0%B0%D0%B4%D0%B8%D0%B5%D0%BD%D1%82\" rel=\"noopener noreferrer nofollow\"><strong>\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c<\/strong><\/a> . \u0414\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 &#8212; \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0430 \u0434\u043b\u044f \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 &#8212;  <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D1%80%D0%B0%D0%B4%D0%B8%D0%B5%D0%BD%D1%82%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D1%83%D1%81%D0%BA\" rel=\"noopener noreferrer nofollow\"><strong>\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a<\/strong><\/a> .<\/p>\n<h4>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c. \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c   <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial a_{m, n}}{\\partial a_{i,j}}=\\delta_{m,i}\\delta_{n,j},\" alt=\"\\frac{\\partial a_{m, n}}{\\partial a_{i,j}}=\\delta_{m,i}\\delta_{n,j},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/77e\/5ed\/c9e\/77e5edc9e08650de2dcc8e0c675a506b.svg\" width=\"121\" height=\"44\"><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\delta_{i,j}\" alt=\"\\delta_{i,j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cad\/8a1\/3b0\/cad8a13b0c9b52a46d7a5ce6ff34d938.svg\">\u200b- <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB_%D0%9A%D1%80%D0%BE%D0%BD%D0%B5%D0%BA%D0%B5%D1%80%D0%B0\" rel=\"noopener noreferrer nofollow\"><strong>\u0441\u0438\u043c\u0432\u043e\u043b \u041a\u0440\u043e\u043d\u0435\u043a\u0435\u0440\u0430<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043b\u0438\u0447\u0435\u043d \u043e\u0442 \u043d\u0443\u043b\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"i=j\" alt=\"i=j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4c\/b9a\/c63\/f4cb9ac630469f934ecf1ee18cb7435d.svg\"> . \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <img decoding=\"async\" class=\"formula inline\" source=\"\\delta_{1,1}=1\" alt=\"\\delta_{1,1}=1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2bd\/7a6\/524\/2bd7a65248d31e85fe9d60d6e3cb6ccb.svg\"> \u200b, \u0430 \u0443\u0436\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\delta_{2,1}=0\" alt=\"\\delta_{2,1}=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/333\/6c1\/1f7\/3336c11f78c1f6f2ca8f2993b912f2d9.svg\">\u200b. \u041d\u043e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0438\u043c\u0435\u0435\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial \\triangle}{\\partial W_{m,n}}=-2\\sum_i(Y_{i,0}-\\hat{Y}_{i,0})\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}},\" alt=\"\\frac{\\partial \\triangle}{\\partial W_{m,n}}=-2\\sum_i(Y_{i,0}-\\hat{Y}_{i,0})\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b51\/74e\/86f\/b5174e86fc460c77de6c534d938ff4ba.svg\" width=\"383\" height=\"51\"><\/p>\n<p>\u0433\u0434\u0435, \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, <img decoding=\"async\" class=\"formula inline\" source=\"\\widetilde{Y}_{i,0}=Y_{i,0}-\\hat{Y}_{i,0}\" alt=\"\\widetilde{Y}_{i,0}=Y_{i,0}-\\hat{Y}_{i,0}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c1\/f72\/6b0\/7c1f726b0793addc3a7dfa798db6b35e.svg\">\u200b, \u043f\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p><strong>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0431\u0435\u0437 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. <\/strong>\u041f\u043e\u043a\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. \u0417\u0430\u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u0441\u0432\u043e\u0438\u043c\u0441\u044f \u0432 \u043c\u0438\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{Y}_{i,0}=X_{i,j} W_{j,k}^{(1)} W_{k,0}^{(2)}\" alt=\"\\hat{Y}_{i,0}=X_{i,j} W_{j,k}^{(1)} W_{k,0}^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/645\/a12\/a76\/645a12a7610adafd6137975fb6a354e2.svg\">, \u043f\u043e\u043b\u0443\u0447\u0438\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial \\triangle}{\\partial W_{m,0}^{(2)}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,0}^{(2)}}=-2\\widetilde{Y}_{i,0}X_{i,j} W_{j,k}^{(1)}\\delta_{k,m}=-2\\widetilde{Y}_{i,0}X_{i,j} W_{j,m}^{(1)}=-2\\widetilde{Y}_{i,0}(X\\cdot W^{(1)})_{i,m}\" alt=\"\\frac{\\partial \\triangle}{\\partial W_{m,0}^{(2)}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,0}^{(2)}}=-2\\widetilde{Y}_{i,0}X_{i,j} W_{j,k}^{(1)}\\delta_{k,m}=-2\\widetilde{Y}_{i,0}X_{i,j} W_{j,m}^{(1)}=-2\\widetilde{Y}_{i,0}(X\\cdot W^{(1)})_{i,m}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c62\/02c\/cde\/c6202ccde7a035e0bb05d65c39124aa8.svg\" width=\"623\" height=\"56\"><\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e <img decoding=\"async\" class=\"formula inline\" source=\"A_{i,m}=(A.T)_{m.i}\" alt=\"A_{i,m}=(A.T)_{m.i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/947\/303\/61b\/94730361b03a1546a03b59687d0d2436.svg\">\u200b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,0}^{(2)}=-\\frac{\\partial \\triangle}{\\partial W_{m,0}^{(2)}}=2((X\\cdot W^{(1)}).T)_{m,i}\\widetilde{Y}_{i,0},\" alt=\"\\delta  W_{m,0}^{(2)}=-\\frac{\\partial \\triangle}{\\partial W_{m,0}^{(2)}}=2((X\\cdot W^{(1)}).T)_{m,i}\\widetilde{Y}_{i,0},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a96\/95f\/59e\/a9695f59e4dd5a959ef4a53bd6a08380.svg\" width=\"313\" height=\"50\"><\/p>\n<p>\u0438\u043b\u0438<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W^{(2)}=2((X\\cdot W^{(1)}).T)\\cdot \\widetilde{Y}.\" alt=\"\\delta  W^{(2)}=2((X\\cdot W^{(1)}).T)\\cdot \\widetilde{Y}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a1d\/f7c\/7db\/a1df7c7db0ab5ee886f8faea7b50288c.svg\" width=\"203\" height=\"23\"><\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0448\u0438 \u0434\u043e\u043c\u043e\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f<img decoding=\"async\" class=\"formula inline\" source=\"\\delta  W^{(2)}\" alt=\"\\delta  W^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01f\/3d3\/018\/01f3d3018bdd2507842eb3eca2e40e9e.svg\">\u200b.  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"X\\cdot W^{(1)}\" alt=\"X\\cdot W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd3\/135\/da6\/bd3135da6ebdd18633741440093d84df.svg\">\u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"(10,3)(3,4)=(10,4)\" alt=\"(10,3)(3,4)=(10,4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b21\/41f\/82f\/b2141f82ffb2a5d52247def6eced4996.svg\">\u200b, \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f &#8212; <img decoding=\"async\" class=\"formula inline\" source=\"(4,10)\" alt=\"(4,10)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/869\/1c1\/cf9\/8691c1cf9aa0ac38d37a425da9980c81.svg\">\u200b. \u0424\u043e\u0440\u043c\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\widetilde{Y}\" alt=\"\\widetilde{Y}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd3\/071\/e48\/bd3071e48c68104aeee92f4fd0266646.svg\">\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{Y}\" alt=\"\\hat{Y}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/478\/629\/150\/4786291507b469928f45e78339d4198e.svg\">&#8212; <img decoding=\"async\" class=\"formula inline\" source=\"(10,1)\" alt=\"(10,1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/288\/fd4\/339\/288fd4339d55bb41f1f8fe78f25efb6d.svg\">\u200b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u043e\u0440\u043c\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\delta  W^{(2)}\" alt=\"\\delta  W^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d89\/dcd\/7d8\/d89dcd7d8d9ab0a56d7341116b110191.svg\">\u0440\u0430\u0432\u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"(4,10)(10,1)=(4,1)\" alt=\"(4,10)(10,1)=(4,1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/096\/87a\/257\/09687a257355199e108d2e2a507db2a5.svg\">\u200b, \u043a\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c.<\/p>\n<pre><code class=\"python\">deltaW2=2*np.dot(np.dot(X,w1).T,Y) deltaW2.shape # (4,1)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f <img decoding=\"async\" class=\"formula inline\" source=\"W^{(1)}\" alt=\"W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd1\/ec2\/6be\/dd1ec26be0574b9b90e59a571d387077.svg\">.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial \\triangle}{\\partial W_{m,n}^{(1)}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}^{(1)}}=-2\\widetilde{Y}_{i,0}X_{i,j} \\delta_{j,m}\\delta_{k,n}W_{k,0}^{(2)}=-2\\widetilde{Y}_{i,0}X_{i,m} W_{n,0}^{(2)}=-2(X.T)_{m,i}\\widetilde{Y}_{i,0}(W^{(2)}.T)_{0,n},\" alt=\"\\frac{\\partial \\triangle}{\\partial W_{m,n}^{(1)}}=-2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}^{(1)}}=-2\\widetilde{Y}_{i,0}X_{i,j} \\delta_{j,m}\\delta_{k,n}W_{k,0}^{(2)}=-2\\widetilde{Y}_{i,0}X_{i,m} W_{n,0}^{(2)}=-2(X.T)_{m,i}\\widetilde{Y}_{i,0}(W^{(2)}.T)_{0,n},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30a\/e7b\/f8a\/30ae7bf8a7271d44baa01d1515dfa5a1.svg\" width=\"713\" height=\"53\"><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W^{(1)}=2(X.T)\\cdot \\widetilde{Y}\\cdot (W^{(2)}.T).\" alt=\"\\delta  W^{(1)}=2(X.T)\\cdot \\widetilde{Y}\\cdot (W^{(2)}.T).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/47f\/cc6\/448\/47fcc64484329f17abd4a05011af4683.svg\" width=\"222\" height=\"23\"><\/p>\n<p>\u0418\u043d\u0434\u0435\u043a\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u201c\u0442\u043e\u0440\u0447\u0430\u0442 \u043d\u0430\u0440\u0443\u0436\u0443\u201d, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u201c\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0435 \u201d &#8212; \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/006\/c1f\/0b6\/006c1f0b69d08a2b42597df112927515.svg\">\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/78b\/70c\/1a0\/78b70c1a0f515061f5ba415dd2f1b633.svg\">\u200b. \u041f\u043e\u043a\u0430 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0447\u0438\u0441\u043b\u0430.  \u042d\u0442\u043e \u043c\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438: \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0447\u043b\u0435\u043d\u044b \u0441 \u201c\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u043c\u0438\u201d \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0432\u043f\u0435\u0440\u0435\u0434\u0438 \u0438 \u0441\u0437\u0430\u0434\u0438 (\u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438), \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0446\u0435\u043f\u043b\u044f\u043b\u0438\u0441\u044c \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446.<\/p>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u044b <img decoding=\"async\" class=\"formula inline\" source=\"\\delta  W^{(1)}\" alt=\"\\delta  W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b9\/921\/310\/8b9921310d0d3fcc10a05ee14a5cbd5c.svg\">\u0438\u043c\u0435\u0435\u043c: <img decoding=\"async\" class=\"formula inline\" source=\"(3,10)(10,1)(1,4)=(3,4)\" alt=\"(3,10)(10,1)(1,4)=(3,4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/03b\/606\/090\/03b6060906adfc133650e3b66f22b20f.svg\">.<\/p>\n<p><strong>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0441 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0435\u0439<\/strong>. \u041d\u0430\u0434\u0435\u044e\u0441\u044c,\u0442\u0435, \u043a\u0442\u043e \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/strong>. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0445 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c \u043d\u0430\u0434\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 \u0441\u043a\u0440\u044b\u0442\u044b \u043f\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043b\u0438 \u0434\u0435\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c: \u0435\u0441\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"z=f(y(x))\" alt=\"z=f(y(x))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44a\/d31\/15f\/44ad3115f2ff6554f7a478effbd33c09.svg\">\u200b, \u0442\u043e  \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u043e\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"z\" alt=\"z\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d0c\/31a\/cfe\/d0c31acfece5197cd1f9e9605056eb58.svg\">\u043f\u043e <img decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad0\/ab4\/08d\/ad0ab408d8479bfa3a1f17e099d635c0.svg\">\u200b\u0440\u0430\u0432\u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"z_x^{'}=f_y^{'}y_x^{'}\" alt=\"z_x^{'}=f_y^{'}y_x^{'}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04f\/691\/1c0\/04f6911c0f8457b27041068da73aeaa4.svg\">\u200b.<\/p>\n<p>\u0418\u0442\u0430\u043a,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\hat{Y}_{i,0}=f_2(f_1(X_{i,j} W_{j,k}^{(1)})W_{k,0}^{(2)})\\quad\\Rightarrow\\quad  \\hat{Y}_{i,0}=f_2(C_{i,0}),\" alt=\"\\hat{Y}_{i,0}=f_2(f_1(X_{i,j} W_{j,k}^{(1)})W_{k,0}^{(2)})\\quad\\Rightarrow\\quad  \\hat{Y}_{i,0}=f_2(C_{i,0}),\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/284\/0e3\/86e\/2840e386e6686a5028e4b429c32f7e03.svg\" width=\"364\" height=\"28\"><\/p>\n<p>\u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0437\u0430\u043c\u0435\u043d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"C_{i,0}=B_{i,k}W_{k,0}^{(2)}, \\quad\\quad B_{i,k}=f_1(A_{i,k}), \\quad\\quad A_{i,k}=X_{i,j} W_{j,k}^{(1)}.\" alt=\"C_{i,0}=B_{i,k}W_{k,0}^{(2)}, \\quad\\quad B_{i,k}=f_1(A_{i,k}), \\quad\\quad A_{i,k}=X_{i,j} W_{j,k}^{(1)}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/293\/628\/693\/293628693ef3250ce618dc5bf4ad4d60.svg\" width=\"406\" height=\"28\"><\/p>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u0435\u0441\u043e\u0432 <img decoding=\"async\" class=\"formula inline\" source=\"W_2\" alt=\"W_2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7d0\/e8a\/ee4\/7d0e8aee40ab12cd24226b11c81067d7.svg\">\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0439\u0434\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u043f\u043e \u044d\u0442\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u0435\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,0}^{(2)}=2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,0}^{(2)}}=2\\widetilde{Y}_{i,0}\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,0}}\\frac{\\partial C_{\\mu,0}}{\\partial W_{m,0}^{(2)}}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\delta_{i,\\mu}B_{\\mu,k}\\delta_{k,m}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})B_{i,m}.\" alt=\"\\delta  W_{m,0}^{(2)}=2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,0}^{(2)}}=2\\widetilde{Y}_{i,0}\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,0}}\\frac{\\partial C_{\\mu,0}}{\\partial W_{m,0}^{(2)}}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\delta_{i,\\mu}B_{\\mu,k}\\delta_{k,m}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})B_{i,m}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/526\/3c9\/d8f\/5263c9d8fae780c87dcf9e4984cd69dd.svg\" width=\"668\" height=\"56\"><\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,0}}=f_2^{'}(C_{i,0})\\delta_{i,\\mu}, \\quad\\quad \\frac{\\partial C_{\\mu,0}}{\\partial W_{m,0}^{(2)}}=B_{\\mu,k}\\frac{\\partial W_{k,0}^{(2)}}{\\partial W_{m,0}^{(2)}}=B_{\\mu,k}\\delta_{k,m}.\" alt=\"\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,0}}=f_2^{'}(C_{i,0})\\delta_{i,\\mu}, \\quad\\quad \\frac{\\partial C_{\\mu,0}}{\\partial W_{m,0}^{(2)}}=B_{\\mu,k}\\frac{\\partial W_{k,0}^{(2)}}{\\partial W_{m,0}^{(2)}}=B_{\\mu,k}\\delta_{k,m}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/038\/0ef\/54b\/0380ef54be9b3d4e9f182c7aca4ca746.svg\" width=\"446\" height=\"60\"><\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0437\u0434\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b &#8212; \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u043e\u0439. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e0\/a23\/005\/4e0a23005b31ff5baa4dddef79f6c8dc.svg\">\u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e: <img decoding=\"async\" class=\"formula inline\" source=\"B_{i,m}=(B.T)_{m,i}\" alt=\"B_{i,m}=(B.T)_{m,i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/276\/95a\/048\/27695a0480449c12deed0a5213739817.svg\">, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"f_1(A_{i,m})=(f_1(A).T)_{m,i}\" alt=\"f_1(A_{i,m})=(f_1(A).T)_{m,i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/585\/ddd\/7ff\/585ddd7ff908b981bec58a1d6358aac9.svg\">. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 <strong>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,0}^{(2)}=2(B.T)_{m,i}\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0}) \\Rightarrow \\delta  W^{(2)}=2(B.T)\\cdot(\\widetilde{Y}*f_2^{'}(C))\" alt=\"\\delta  W_{m,0}^{(2)}=2(B.T)_{m,i}\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0}) \\Rightarrow \\delta  W^{(2)}=2(B.T)\\cdot(\\widetilde{Y}*f_2^{'}(C))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a3b\/efe\/4d7\/a3befe4d759f9bc5f16f744e32643da6.svg\" width=\"450\" height=\"28\"><\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f <strong>\u201c*\u201d<\/strong> \u043c\u0430\u0442\u0440\u0438\u0446 . \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, <img decoding=\"async\" class=\"formula inline\" source=\"a\" alt=\"a\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a86\/b59\/7c4\/a86b597c41ab6182f2260a641643e871.svg\">\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"b\" alt=\"b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/41d\/89b\/7e0\/41d89b7e0751f82ced73384d3d226b22.svg\">\u200b,  \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u043e\u0439, \u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"a*b\" alt=\"a*b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/19e\/c84\/9ee\/19ec849ee6dd3922c28707938d6c5809.svg\">\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u043e\u0439, \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0432\u0435\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0440\u0435\u0442\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0440\u0430\u0432\u0435\u043d <img decoding=\"async\" class=\"formula inline\" source=\"a_{1,2}b_{1,2}\" alt=\"a_{1,2}b_{1,2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b93\/411\/c2a\/b93411c2afe70f82e598f1a5f1fbb6a4.svg\">\u200b.<\/p>\n<p>\u041f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430 \u043a\u043e\u0434\u0435. \u041f\u0443\u0441\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"f_1(x)=x^2\" alt=\"f_1(x)=x^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b4\/694\/54e\/6b469454e27b5f37265fcb0796d1b403.svg\">\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"f_2(x)=x^3\" alt=\"f_2(x)=x^3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/943\/8de\/c7f\/9438dec7fe479d32dd8b4f3279155c79.svg\">. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u0437\u0430\u0442\u0435\u043c \u0432\u043e\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0432\u043e\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NumPy\" rel=\"noopener noreferrer nofollow\"><strong>NumPy<\/strong><\/a> \u0435\u0441\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"python\">def f1(x): # \u043f\u0435\u0440\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f     return np.power(x,2) def graf1(x): # \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f     return 2*x def f2(x): # \u0432\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f     return np.power(x,3) def gradf2(x): # \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f     return 3*np.power(x,2)  A=np.dot(X,w1) # \u0432\u0445\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f B=f1(A)        # \u0432\u044b\u0445\u043e\u0434 \u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f C=np.dot(B,w2) # \u0432\u0445\u043e\u0434 \u0441\u043b\u043e\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 Y=f2(\u0421) # \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 deltaW2=2*np.dot(B.T, Y*gradf2(C)) deltaW2.shape # (4,1)<\/code><\/pre>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 \u043f\u043e <img decoding=\"async\" class=\"formula inline\" source=\"W^{(1)}\" alt=\"W^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/500\/e03\/55a\/500e0355a801302a38ca721d0672d8f8.svg\">\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0434\u0435\u0441\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0434\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434 &#8212; \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,n}^{(1)}=2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}^{(1)}}=2\\widetilde{Y}_{i,0}\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,\\nu}}\\frac{\\partial C_{\\mu,\\nu}}{\\partial B_{l,s}}\\frac{\\partial B_{l,s}}{\\partial W_{m,n}^{(1)}},\" alt=\"\\delta  W_{m,n}^{(1)}=2\\widetilde{Y}_{i,0}\\frac{\\partial \\hat{Y}_{i,0}}{\\partial W_{m,n}^{(1)}}=2\\widetilde{Y}_{i,0}\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,\\nu}}\\frac{\\partial C_{\\mu,\\nu}}{\\partial B_{l,s}}\\frac{\\partial B_{l,s}}{\\partial W_{m,n}^{(1)}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/391\/6f2\/111\/3916f2111771b5e4452c5eafa0df9e6a.svg\" width=\"381\" height=\"53\"><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"C_{\\mu,\\nu}=B_{\\mu,k}W_{k,\\nu}^{(2)}\" alt=\"C_{\\mu,\\nu}=B_{\\mu,k}W_{k,\\nu}^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb3\/4dd\/be6\/eb34ddbe66c479e4c6c4ba0fd7888e60.svg\">. \u0420\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,\\nu}}=f_2^{'}(C_{i,0})\\delta_{i,\\mu}\\delta_{0,\\nu},\\quad\\quad \\frac{\\partial C_{\\mu,\\nu}}{\\partial B_{l,s}}=\\delta_{\\mu,l}\\delta_{k,s}W_{k,\\nu}^{(2)},\\quad\\quad\" alt=\"\\frac{\\partial f_2(C_{i,0})}{\\partial C_{\\mu,\\nu}}=f_2^{'}(C_{i,0})\\delta_{i,\\mu}\\delta_{0,\\nu},\\quad\\quad \\frac{\\partial C_{\\mu,\\nu}}{\\partial B_{l,s}}=\\delta_{\\mu,l}\\delta_{k,s}W_{k,\\nu}^{(2)},\\quad\\quad\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e7\/48b\/aaa\/8e748baaa052375fb106c53332cadc3e.svg\" width=\"415\" height=\"44\"><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{\\partial B_{l,s}}{\\partial W_{m,n}^{(1)}}=\\frac{\\partial B_{l,s}}{\\partial A_{r,e}}\\frac{\\partial A_{r,e}}{\\partial W_{m,n}^{(1)}}=f_1^{'}(A_{l,s})\\delta_{l,r}\\delta_{s,e}\\delta_{j,m}\\delta_{e,n}X_{r,j}=f_1^{'}(A_{l,s})\\delta_{l,r}\\delta_{s,n}X_{r,m}.\" alt=\"\\frac{\\partial B_{l,s}}{\\partial W_{m,n}^{(1)}}=\\frac{\\partial B_{l,s}}{\\partial A_{r,e}}\\frac{\\partial A_{r,e}}{\\partial W_{m,n}^{(1)}}=f_1^{'}(A_{l,s})\\delta_{l,r}\\delta_{s,e}\\delta_{j,m}\\delta_{e,n}X_{r,j}=f_1^{'}(A_{l,s})\\delta_{l,r}\\delta_{s,n}X_{r,m}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fad\/c31\/9e2\/fadc319e203d6fb1fc3e5a34efe81a29.svg\" width=\"525\" height=\"49\"><\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,n}^{(1)}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\delta_{i,\\mu}\\delta_{0,\\nu}\\delta_{\\mu,l}\\delta_{k,s}W_{k,\\nu}^{(2)}f_1^{'}(A_{l,s})\\delta_{s,n}\\delta_{l,r}X_{r,m}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})W_{n,0}^{(2)}f_1^{'}(A_{i,n})X_{i,m},\" alt=\"\\delta  W_{m,n}^{(1)}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\delta_{i,\\mu}\\delta_{0,\\nu}\\delta_{\\mu,l}\\delta_{k,s}W_{k,\\nu}^{(2)}f_1^{'}(A_{l,s})\\delta_{s,n}\\delta_{l,r}X_{r,m}=2\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})W_{n,0}^{(2)}f_1^{'}(A_{i,n})X_{i,m},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2f\/63c\/652\/d2f63c65252a2ec89e5d1fb01b025d50.svg\" width=\"652\" height=\"28\"><\/p>\n<p> \u0433\u0434\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta_{i,\\mu}\\delta_{0,\\nu}\\delta_{\\mu,l}\\delta_{k,s}\\delta_{s,n}\\delta_{l,r}=\\delta_{i,l}\\delta_{i,r}\\delta_{k,n}\\delta_{s,n}.\" alt=\"\\delta_{i,\\mu}\\delta_{0,\\nu}\\delta_{\\mu,l}\\delta_{k,s}\\delta_{s,n}\\delta_{l,r}=\\delta_{i,l}\\delta_{i,r}\\delta_{k,n}\\delta_{s,n}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/556\/dd4\/efa\/556dd4efacd5512c27262f8e77b0e3b1.svg\" width=\"254\" height=\"20\"><\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, <img decoding=\"async\" class=\"formula inline\" source=\"\\delta_{0,\\nu}W_{k,\\nu}^{(2)}=W_{k,0}^{(2)}\" alt=\"\\delta_{0,\\nu}W_{k,\\nu}^{(2)}=W_{k,0}^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/800\/535\/34e\/80053534e147df0636b8ebc0f902e2ce.svg\">\u200b, \u0438\u043d\u0434\u0435\u043a\u0441\u044b <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21f\/f0c\/74d\/21ff0c74d31e62f9f8a331af1c8f819f.svg\">\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48d\/23d\/093\/48d23d093b2e9dba5a7caace095bd995.svg\">\u043c\u044b \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u201c\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0435\u201d, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <img decoding=\"async\" class=\"formula inline\" source=\"l,r,k,s\" alt=\"l,r,k,s\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f70\/13d\/ad3\/f7013dad343e852626eb72dfe7863697.svg\">\u200b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u201c\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0435\u201d \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W_{m,n}^{(1)}=2(X.T)_{m,i}\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})(W^{(2)}.T)_{0,n}f_1^{'}(A_{i,n}),\" alt=\"\\delta  W_{m,n}^{(1)}=2(X.T)_{m,i}\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})(W^{(2)}.T)_{0,n}f_1^{'}(A_{i,n}),\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6dd\/a54\/7a7\/6dda547a77b689e69e6be0beb0ebfe5d.svg\" width=\"363\" height=\"26\"><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\delta  W^{(1)}=2(X.T)\\cdot [[(\\widetilde{Y}*f_2^{'}(C))\\cdot(W^{(2)}.T)]*f_1^{'}(A)].\" alt=\"\\delta  W^{(1)}=2(X.T)\\cdot [[(\\widetilde{Y}*f_2^{'}(C))\\cdot(W^{(2)}.T)]*f_1^{'}(A)].\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cfb\/a83\/1aa\/cfba831aa8bf857c4c5a7d0da07a17cc.svg\" width=\"364\" height=\"24\"><\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"D_{i,o}=\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\Rightarrow\\widetilde{Y}*f_2^{'}(C)\" alt=\"D_{i,o}=\\widetilde{Y}_{i,0}f_2^{'}(C_{i,0})\\Rightarrow\\widetilde{Y}*f_2^{'}(C)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/85b\/d04\/857\/85bd04857afc4c10796728353f3a7ac8.svg\">, \u0442\u043e \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"F_{i,n}=D_{i.o}(W^{(2)}.T)_{0,n}\" alt=\"F_{i,n}=D_{i.o}(W^{(2)}.T)_{0,n}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f72\/384\/edb\/f72384edb32fd8defb857ed6737a6979.svg\">, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435  \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"F_{i,n}f_1^{'}(A_{i,n})\\Rightarrow F*f_1^{'}(A)\" alt=\"F_{i,n}f_1^{'}(A_{i,n})\\Rightarrow F*f_1^{'}(A)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/524\/1d2\/550\/5241d25501bda2a35dbb6e3a9e1a956d.svg\">\u200b.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<pre><code class=\"python\">deltaW1=2*np.dot(X.T, np.dot(Y*gradf2(C),w2.T)*gradf1(A)) deltaW1.shape # (3,4)<\/code><\/pre>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432. \u041d\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0438\u0433\u0440\u0430 \u0441 \u043a\u0430\u043c\u0435\u0448\u043a\u0430\u043c\u0438 \u043d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443 \u043e\u0437\u0435\u0440\u0430.<\/p>\n<h2>\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u201c\u0422\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e &#8212; \u043d\u044b\u043d\u0447\u0435 \u0441\u043f\u043b\u044b\u043b\u043e. \u041f\u0440\u043e\u0448\u043b\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0438-\u043f\u0440\u043e\u0449\u0430\u0439!\u201d \u0410 \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435? \u0415\u0441\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u0434\u043b\u044f  \u0432\u0430\u0441 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043f\u043e\u0440\u043e\u0439\u0442\u0435\u0441\u044c, \u043f\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435, \u043d\u043e \u043e\u0441\u043e\u0431\u043e \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e. \u0425\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0448\u0438\u0442\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0433\u043e\u0434\u0430\u043c\u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0448\u0432\u0435\u0439\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043a\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0435\u0441\u0442\u044c  \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0432\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442\u0435. \u0421\u0430\u0434\u0438\u0442\u0435\u0441\u044c \u0438 \u0448\u0435\u0439\u0442\u0435! \u0414\u0443\u043c\u0430\u044e, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438, \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u0433\u0430\u0436 \u043d\u0430\u0432\u044b\u043a\u043e\u0432. \u0412\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043c\u0435\u0441\u0442\u043e  \u0431\u0430\u0445\u0432\u0430\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0443 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445 \u0437\u043d\u0430\u0442\u043e\u043a\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0436\u0435. \u0423 <a href=\"https:\/\/github.com\/jamesloyys\" rel=\"noopener noreferrer nofollow\">James Loy<\/a> &#8212; \u0430\u0432\u0442\u043e\u0440\u0430 <a href=\"https:\/\/towardsdatascience.com\/how-to-build-your-own-neural-network-from-scratch-in-python-68998a08e4f6\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> , \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u0438\u043d\u0441\u043f\u0438\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438, \u0435\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f <a href=\"https:\/\/www.packtpub.com\/big-data-and-business-intelligence\/neural-network-projects-python?utm_source=github&amp;utm_medium=repository\" rel=\"noopener noreferrer nofollow\">\u043a\u043d\u0438\u0433\u0430<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c. \u041a \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f <a href=\"https:\/\/github.com\/jamesloyys\/Neural-Network-Projects-with-Python\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0434\u044b<\/a> . \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u0434\u044b \u043a \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u043b\u0430\u0432\u0435, \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0435\u043c \u043c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0432 \u044d\u0442\u0438\u0445 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u0445, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u201c\u0432\u0445\u043e\u0434-\u0432\u044b\u0445\u043e\u0434\u201d, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e\u0435\u0441\u0442 \u0431\u0430\u043b\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043b\u0451\u0433\u043a\u043e\u0439 \u0436\u0438\u0437\u043d\u0438, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0436\u0438\u0437\u043d\u044c \u0441 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/TensorFlow\" rel=\"noopener noreferrer nofollow\"><strong>TensorFlow<\/strong><\/a> \u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Keras\" rel=\"noopener noreferrer nofollow\"><strong>Keras<\/strong><\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0441\u0442\u044c, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 <a href=\"https:\/\/www.manning.com\/books\/deep-learning-with-python-second-edition?gclid=CjwKCAjwkN6EBhBNEiwADVfya7MUsjFLpRl-5opTQt51ZHiSVsbxm2hMhFiYMfZZ7eSr5BJcVb3GZBoCcMwQAvD_BwE\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/a> (\u0435\u0441\u0442\u044c <a href=\"https:\/\/www.ozon.ru\/product\/glubokoe-obuchenie-na-python-145615583\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439).<\/p>\n<p> \u041f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u0434\u044b, \u0432\u043d\u0438\u043a\u0430\u0439\u0442\u0435 \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043a\u043d\u0438\u0433\u0438, \u0437\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. <\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u044d\u0442\u043e <strong>Jupyter Notebook<\/strong> (<a href=\"https:\/\/www.anaconda.com\/\" rel=\"noopener noreferrer nofollow\">Anaconda<\/a> \u0440\u0443\u043b\u0438\u0442!),  <a href=\"https:\/\/colab.research.google.com\/notebooks\/intro.ipynb?utm_source=scs-index\" rel=\"noopener noreferrer nofollow\">Colab<\/a>&#8230; <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/557550\/\"> https:\/\/habr.com\/ru\/post\/557550\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption>\u0422\u0435\u043d\u0437\u043e\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443<\/figcaption><\/figure>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044f\u0445 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u0438 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430, \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043c\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c). \u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u201c\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u201d \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0438\u0437 \u043c\u0430\u0442\u0440\u0438\u0446, \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0441\u0442\u0440\u0430\u0448\u0430\u044e\u0449\u0435. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u201c\u043d\u0430\u0441 \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0441\u0442\u0435\u0440\u0435\u0433\u0430\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u201d.  \u041f\u043e\u0440\u0430 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0431\u043b\u0438\u0436\u0435.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438 : \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442; <\/p>\n<\/li>\n<li>\n<p> \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u0448\u0430\u0433\u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NumPy\" rel=\"noopener noreferrer nofollow\"><strong>NumPy<\/strong><\/a> . \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0435, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0417\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043d\u043e \u043d\u0435 \u043e\u0442\u0447\u0430\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 &#8212; \u0432\u0438\u043d\u0442\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0437\u0430\u043a\u0440\u0443\u0442\u0438\u0442\u044c, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e &#8212; \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445:  \u043b\u0438\u0431\u043e <strong>\u0441\u0431\u043e\u0439 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435<\/strong>, \u043b\u0438\u0431\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445.<\/p>\n<h2>\u041c\u0430\u0442\u0440\u0438\u0446\u044b &#8212; \u043e\u043d\u0438 \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u044b<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f &#8212; <strong>\u0442\u0435\u043d\u0437\u043e\u0440<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0442\u0435\u043d\u0437\u043e\u0440 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u043b\u0438\u0434\u043d\u0435\u0435, \u043f\u0440\u0438\u0447\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u043e\u043d \u0432\u043e\u0448\u0435\u043b \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f Google <a href=\"https:\/\/ru.wikipedia.org\/wiki\/TensorFlow\" rel=\"noopener noreferrer nofollow\"><strong>TensorFlow<\/strong><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043e\u043d \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0441\u044c\u044e, \u043e\u043d \u0436\u0435 \u0442\u0435\u043d\u0437\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <strong>\u0432\u0435\u043a\u0442\u043e\u0440<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c  , \u0433\u0434\u0435 \u0438\u043d\u0434\u0435\u043a\u0441  ;  &#8212; \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"python\">import numpy as np # \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f numpy a=np.array([1,2,5]) a.ndim # \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u0442\u0435\u043d\u0437\u043e\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0435\u0439 = 1 a.shape # \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0441\u0438 (3,) a.shape[0] # \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043e\u0441\u0438 = 3<\/code><\/pre>\n<p><strong>\u0421\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong> \u0434\u0432\u0443\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u200b. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0434\u0435\u0441\u044c \u200b \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 2 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<pre><code class=\"python\">b=np.array([3,4,7]) np.dot(a,b) # \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 = 46 a*b # \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 array([ 3,  8, 35]) np.sum(a*b) # = 46<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u0442\u0435\u043d\u0437\u043e\u0440\u0443 (\u0442\u0435\u043d\u0437\u043e\u0440\u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430) &#8212; <strong>\u043c\u0430\u0442\u0440\u0438\u0446\u0435<\/strong>\u200b, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u0430\u043a\u200b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0438 0-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 2-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0418\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0435 \u043e\u0441\u0438.<\/p>\n<pre><code class=\"python\">A=np.array([[ 1,  2,  3],             [ 2,  4,  6]]) A # array([[1, 2, 3],   #        [2, 4, 6]]) A[0, 2] # \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 = 3 A.shape # (2, 3) \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 2 \u0441\u0442\u0440\u043e\u043a\u0438, 3 \u0441\u0442\u043e\u043b\u0431\u0446\u0430<\/code><\/pre>\n<p>\u041f\u0440\u0438 <strong>\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0430\u0442\u0440\u0438\u0446<\/strong>\u0438\u200b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c  \u043c\u0430\u0442\u0440\u0438\u0446\u0443  \u200b , \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u200b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0440\u043e\u043a\u200b (\u043f\u0435\u0440\u0432\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435   \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435\u043c\u200b)<\/p>\n<pre><code class=\"python\">B=np.array([[7, 8, 1, 3],             [5, 4, 2, 7],             [3, 6, 9, 4]]) A.shape[1] == B.shape[0] # true A.shape[1], B.shape[0] # (3, 3)  A.shape, B.shape # ((2, 3), (3, 4)) C = np.dot(A, B) C # array([[26, 34, 32, 29],   #        [52, 68, 64, 58]]);    #  \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, C[0,1]=A[0,0]B[0,1]+ A[0,1]B[1,1]+A[0,2]B[2,1]=1*8+2*4+3*6=34 C.shape # (2, 4)   <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u200b , \u0442\u043e:<\/p>\n<pre><code class=\"python\">np.dot(B, A) # ValueError: shapes (3,4) and (2,3) not aligned: 4 (dim 1) != 2 (dim 0)<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 , \u043e \u0447\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u043e\u0440\u0435\u0447\u0438\u0432\u043e \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432.  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u200b. \u0417\u0430\u0442\u0435\u043c \u0438\u043c\u0435\u0435\u043c \u200b. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d \u0441\u0442\u043e\u0438\u0442 \u043d\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445  \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043e\u043c \u200b, \u0433\u0434\u0435 &#8212; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A2%D1%80%D0%B0%D0%BD%D1%81%D0%BF%D0%BE%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%B0%D1%8F_%D0%BC%D0%B0%D1%82%D1%80%D0%B8%D1%86%D0%B0\" rel=\"noopener noreferrer nofollow\"><strong>\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430<\/strong><\/a> (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f  <a href=\"https:\/\/ru.wikipedia.org\/wiki\/NumPy\" rel=\"noopener noreferrer nofollow\"><strong>NumPy<\/strong><\/a>). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u0435\u043c \u200b.  \u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u0447\u0442\u043e  \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u200b.<\/p>\n<pre><code class=\"python\">a = np.reshape(a, (3,1)) # \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0442\u0435\u043d\u0437\u043e\u0440\u0430, \u043e\u0442 a.shape = (3,) \u043a (3,1), b = np.reshape(b, (3,1)) # \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438, \u043e\u0434\u0438\u043d \u0441\u0442\u043e\u043b\u0431\u0435\u0446 D = np.dot(a,b.T) D # array([[ 3,  4,  7],   #        [ 6,  8, 14],   #        [15, 20, 35]])<\/code><\/pre>\n<h2>\u0418\u0433\u0440\u0443\u0448\u0435\u0447\u043d\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c<\/h2>\n<p>\u0412\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u043d\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043a\u0430\u043a \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a \u0441 \u0440\u0443\u0447\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u044f\u0449\u0438\u043a\u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041c\u0435\u0440\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/en.wikipedia.org\/wiki\/Loss_function\" rel=\"noopener noreferrer nofollow\"><strong>\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c<\/strong><\/a> (<strong>cost function<\/strong>). \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0440\u0443\u0447\u043a\u0438 \u043a\u0440\u0443\u0442\u044f\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0433\u0447\u0435. \u0422\u0443\u0434\u0430 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u0438 \u043a\u0440\u0443\u0442\u0438\u043c. \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0448\u043b\u0438 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0438 \u043a\u0430\u0436\u0434\u0443\u044e \u0440\u0443\u0447\u043a\u0443 \u043f\u043e\u043a\u0440\u0443\u0442\u0438\u043b\u0438 \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c (<a href=\"https:\/\/wiki.loginom.ru\/articles\/learning-rate.html\" rel=\"noopener noreferrer nofollow\"><strong>learning rate<\/strong><\/a>), \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0434\u043d\u0430 <a href=\"https:\/\/towardsdatascience.com\/epoch-vs-iterations-vs-batch-size-4dfb9c7ce9c9\" rel=\"noopener noreferrer nofollow\"><strong>\u044d\u043f\u043e\u0445\u0430<\/strong><\/a> (<strong>epoch<\/strong>). \u0418 \u0442\u0430\u043a \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c. \u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0440\u0443\u0447\u0435\u043a (<strong>\u0432\u0435\u0441\u0430<\/strong>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u0432\u0435\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432 \u043d\u0430\u0448 \u0447\u0435\u0440\u043d\u044b\u0439 \u044f\u0449\u0438\u043a \u043b\u044e\u0431\u044b\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u0420\u0430\u043d\u044c\u0448\u0435 \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c <strong>\u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435<\/strong>, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043a\u0430\u043a \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0442\u0430\u043a \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438 \u043d\u0435\u0442.<\/p>\n<figure class=\"full-width\"><figcaption>\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u044b\u0445<\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0438\u0437 <a href=\"https:\/\/towardsdatascience.com\/how-to-build-your-own-neural-network-from-scratch-in-python-68998a08e4f6\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u0440\u0443\u0441\u0441\u043a\u0438\u0439 <a href=\"https:\/\/neurohive.io\/ru\/tutorial\/kak-sozdat-nejronnuju-set-s-nulja-na-jazyke-python\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> ).<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 (<strong>samples<\/strong>) . \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u0441 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u043d\u0433\u0430 (\u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439), \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0441\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e (\u043e\u0441\u044c \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c ) &#8212; \u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 (<strong>samples<\/strong>), \u0432\u0442\u043e\u0440\u0430\u044f  &#8212; \u043e\u0441\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 (<strong>features<\/strong>).  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438\u043c\u0435\u0435\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 (<strong>\u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>). \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c (\u043c\u0443\u0436\u0447\u0438\u043d\u0430, \u0436\u0435\u043d\u0449\u0438\u043d\u0430 \u0438 \u2026) \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b  \u043a\u043e\u043d\u0447\u0438\u043a\u0430 \u043d\u043e\u0441\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430. <\/p>\n<h3>\u041f\u043e\u043b\u043d\u044b\u0439 \u0432\u043f\u0435\u0440\u0435\u0434!<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u043d\u0430\u0448\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0433\u0443\u043b\u044f\u0435\u043c \u043f\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B5%D1%82%D0%BE%D0%B4_%D0%BB%D0%BE%D0%BA%D1%83%D1%81%D0%BE%D0%B2\" rel=\"noopener noreferrer nofollow\">\u201c<strong>\u0414\u0432\u043e\u0440\u0446\u0443 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong>\u201d<\/a> . \u0422\u0430\u043c \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041c\u044b \u0432\u043e\u043b\u044c\u043d\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0446\u0435\u043f\u043b\u044f\u043b\u0430\u0441\u044c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446. \u0415\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0438 \u0435\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0439\u0434\u0435\u043c \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h4>\u0412\u0445\u043e\u0434<\/h4>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c 10 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441 \u0442\u0440\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u200b \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 (10, 3).  \u041f\u043e\u043a\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0435\u0435 \u201c\u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430\u201d, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418\u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443:<\/p>\n<ul>\n<li>\n<p>\u0446\u0435\u043b\u044b\u043c\u0438 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442 0 \u0434\u043e 50 ; <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=np.random.randint(0, 50, (10, 3))<\/code><\/pre>\n<ul>\n<li>\n<p>\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1;<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=np.random.rand(10, 3)<\/code><\/pre>\n<ul>\n<li>\n<p>\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9D%D0%BE%D1%80%D0%BC%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5_%D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u043a\u043e\u043d\u0443<\/a> \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c  \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439\u200b.  \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0413\u0430\u0443\u0441\u0441\u0430, \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a;<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">X=4*np.random.randn(10, 3) + 2<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430  \u0438 \u200b,  \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c. <\/p>\n<h4>\u0412\u044b\u0445\u043e\u0434<\/h4>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0435\u0441\u043e\u0432 \u200b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f,  \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e, \u043f\u043e\u043b\u0430\u0433\u0430\u044f\u0441\u044c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446, \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0444\u043e\u0440\u043c\u0443 . \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u200b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u200b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 &#8212; \u043f\u0440\u0438\u0447\u0435\u043c \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c &#8212; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F_%D0%B0%D0%BA%D1%82%D0%B8%D0%B2%D0%B0%D1%86%D0%B8%D0%B8\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/a> , \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u200b\u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u200b( \u0441\u0442\u0440\u043e\u043a, \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 ) \u0438 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u200b, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u043e\u0439, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0432\u043d\u044b ; \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u0435\u043c , \u0438 \u0442\u0430\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0447\u0438\u0441\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u200b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u200b. \u0418\u0442\u0430\u043a, \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u200b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 10-\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 (<strong>samples<\/strong>) \u0438 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c. \u0412 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f (<strong>bias<\/strong>).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u0434\u0435. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435, \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0444\u043e\u0440\u043c\u043e\u0439. <\/p>\n<pre><code class=\"python\">X=np.random.randint(0, 50, (10, 3)) w1=2*np.random.rand(3,4)-1 # \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 -1 \u0434\u043e +1 w2=2*np.random.rand(4,1)-1 Y=np.dot(np.dot(x,w1),w2) # \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 Y.shape # (10, 1) Y.T.shape # (1, 10) (np.dot(Y.T,Y)).shape # (1, 1), \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0432\u0435\u0440\u0442\u043a\u0435<\/code><\/pre>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b  \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u200b. \u041c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0438 \u0432\u0435\u0441\u0430 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 -1 \u0434\u043e +1, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u201c\u043c\u0443\u0442\u043d\u044b\u0445\u201d \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (\u043f\u043e\u043a\u0430 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e). <\/p>\n<p><strong>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/strong>. \u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u201c\u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f\u201d, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 . \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u0435\u043c<\/p>\n<p>\u041f\u043e\u0434\u0430\u0432\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Loss_function\" rel=\"noopener noreferrer nofollow\"><strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0435\u0440\u044c<\/strong><\/a> <\/p>\n<p> \u0433\u0434\u0435 &#8212; \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440, \u0438 \u043c\u044b \u0432\u0432\u0435\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 . \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c,  \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 .<\/p>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. <strong>\u041f\u043e\u0440\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c<\/strong>.<\/p>\n<h3>\u041d\u0430\u0437\u0430\u0434<\/h3>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u0412\u044b\u0445\u043e\u0434 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446. \u041f\u0440\u0438\u0447\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c <strong>\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0443\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432\u0435\u0441\u043e\u0432.<\/p>\n<h4>\u041c\u0435\u0442\u043e\u0434 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c &#8212; \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-323172","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=323172"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323172\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}