{"id":309008,"date":"2020-08-25T21:00:49","date_gmt":"2020-08-25T21:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309008"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309008","title":{"rendered":"\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (\u0447\u0430\u0441\u0442\u044c 2): \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 OR; XOR \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TensorFlow.js"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516572\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 TensorFlow.JS, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043e\u0431\u0449\u0430\u044f \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u0430:<br \/>  <a href=\"https:\/\/habr.com\/ru\/post\/516458\/\">\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (\u0447\u0430\u0441\u0442\u044c 1): \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u0430<\/a><\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 OR; XOR, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u00abHello World\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439.<br \/>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c TensorFlow.js. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418. \u041d\u0430 \u0432\u0445\u043e\u0434 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 X<sub>1<\/sub> \u0438 X<sub>2<\/sub>, \u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b Y. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0439 \u0441\u0435\u0442\u0438 \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 1). <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i3\/sr\/qk\/i3srqkfbukoovry8jokjjpxvrsk.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u2013 \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418<\/i><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0437\u0430\u0434\u0430\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0441 \u043e\u0441\u044f\u043c\u0438 X<sub>1<\/sub> \u0438 X<sub>2<\/sub> (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 2, \u0441\u043b\u0435\u0432\u0430).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5l\/8m\/fs\/5l8mfsl5ipc1l4-az6s1ruje-ou.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 \u2013 \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418<\/i><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2013 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043b\u0438\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u043b\u0430 \u0431\u044b \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043b\u0438\u043d\u0438\u0438 \u0431\u044b\u043b\u0438 \u0432\u0441\u0435 <i>TRUE<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u043f\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u2013 \u0432\u0441\u0435 <i>FALSE<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 2, \u0441\u043f\u0440\u0430\u0432\u0430). \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d \u043d\u0435\u0439\u0440\u043e\u043d \u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 (\u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d), \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8d7\/bd4\/d65\/8d7bd4d65010d03c2e6763e4c6be46b7.svg\" alt=\"$y=x_1w_1+x_2w_2$\" data-tex=\"display\"><\/math><\/p>\n<p>\u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439. <\/p>\n<p>  \u0412\u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 \u043e\u0442 0 \u0434\u043e 1, \u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0441\u0438\u0433\u043c\u043e\u0438\u0434\u043d\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0448\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 3.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sw\/xv\/d7\/swxvd7prmu1uqahhllgagbuedny.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 3 \u2013 \u041d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418<\/i><\/p>\n<p>  \u0418\u0442\u0430\u043a \u0440\u0435\u0448\u0438\u043c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TensorFlow.js<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0435\u043d\u0437\u043e\u0440\u044b. <i><b>\u0422\u0435\u043d\u0437\u043e\u0440<\/b><\/i> \u2013 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u043e\u0441\u0435\u0439 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u0434\u043e\u043b\u044c \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043e\u0441\u0435\u0439. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441 \u0442\u0435\u043d\u0437\u043e\u0440\u0430\u043c\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u2013 \u0432\u0435\u043a\u0442\u043e\u0440\u044b (\u0442\u0435\u043d\u0437\u043e\u0440 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043e\u0441\u044c\u044e), \u043c\u0430\u0442\u0440\u0438\u0446\u044b (\u0442\u0435\u043d\u0437\u043e\u0440 \u0441 \u0434\u0432\u0443\u043c\u044f \u043e\u0441\u044f\u043c\u0438 \u2013 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u043b\u043e\u043d\u043a\u0438). <br \/>  \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0441\u044c (axis 0) \u2013 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u044c \u0432\u0434\u043e\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 4). <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3a\/ba\/3m\/3aba3mjtvrhrgwqkpninnttx3vi.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 4 \u2013 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u043d\u0437\u043e\u0440\u0430 <\/i><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0438\u043c\u0435\u0435\u043c 4 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 1), \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0432\u0434\u043e\u043b\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0441\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c 4 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 X<sub>1<\/sub>, X<sub>2<\/sub>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440 \u0438\u043c\u0435\u0435\u0442 2 \u043e\u0441\u0438 (\u043c\u0430\u0442\u0440\u0438\u0446\u0430), \u0432\u0434\u043e\u043b\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0441\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e 4 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0432\u0434\u043e\u043b\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u0438 \u2013 2 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.  <\/p>\n<pre><code class=\"javascript\">const input = [[0, 0], [1, 0], [0, 1], [1, 1]]; const inputTensor = tf.tensor(input, [input.length, 2]); <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u043d\u0437\u043e\u0440. \u041a\u0430\u043a \u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u0432\u0434\u043e\u043b\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u043e\u0441\u0438 \u2014 \u0438\u043c\u0435\u0435\u043c 4 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"javascript\">const output = [[0], [1], [1], [1]] const outputTensor = tf.tensor(output, [output.length, 1]); <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f TensorFlow API:  <\/p>\n<pre><code class=\"javascript\">const model = tf.sequential(); model.add(       tf.layers.dense({ inputShape: [2], units: 1, activation: 'sigmoid' }) ); <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u0437\u043e\u0432\u0430 <b><i>tf.sequential()<\/i><\/b>. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u2013 \u044d\u0442\u043e \u0441\u043b\u043e\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0435\u0432 \u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e. \u0422\u0443\u0442 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <i><b>dense<\/b> <\/i>\u0441\u043b\u043e\u0439, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u043d \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 dense \u0441\u043b\u043e\u044f, \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u043e\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2013 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/94d\/13e\/e0a\/94d13ee0aadd7f17977e0d279af38d42.svg\" alt=\"$M$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u044f\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4e2\/ebd\/dfc\/4e2ebddfccdfaff959a7723c4c3bda8a.svg\" alt=\"$NM$\" data-tex=\"inline\"><\/math>.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u2013 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0434\u0438\u043d \u043d\u0435\u0439\u0440\u043e\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <b><i>units<\/i><\/b> \u0437\u0430\u0434\u0430\u043d \u0435\u0434\u0438\u043d\u0438\u0446\u0435. <br \/>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0434\u0430\u0442\u044c <b><i>inputShape<\/i><\/b>, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 X<sub>1<\/sub> \u0438 X<sub>2<\/sub>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <b><i>inputShape=[2]<\/i><\/b>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c <b><i>inputShape<\/i><\/b> \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 TensorFlow \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e <b><i>units<\/i><\/b> \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u044f. <br \/>  \u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043b\u043e\u044e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u0432\u044b\u0448\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u0433\u043c\u043e\u0438\u0434\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 TensorFlow \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#layers.activation\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c (\u0441\u043c \u0410\u041f\u0418 <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#tf.LayersModel.compile\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2013 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0432\u0438\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c:  <\/p>\n<pre><code class=\"javascript\">model.compile({     optimizer: tf.train.sgd(0.1),     loss: 'meanSquaredError' }); <\/code><\/pre>\n<p>  \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430 stochastic gradient descent \u0441 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c 0.1.<br \/>  \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435: <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.sgd\" rel=\"nofollow\">tf.train.sgd<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.momentum\" rel=\"nofollow\">tf.train.momentum<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.adagrad\" rel=\"nofollow\">tf.train.adagrad<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.adadelta\" rel=\"nofollow\">tf.train.adadelta<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.adam\" rel=\"nofollow\">tf.train.adam<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.adamax\" rel=\"nofollow\">tf.train.adamax<\/a>, <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#train.rmsprop\" rel=\"nofollow\">tf.train.rmsprop<\/a>. \u00a0   <\/p>\n<blockquote><p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c <b><i>adam<\/i><\/b> \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 <b><i>sgd<\/i><\/b> \u2013 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 (learning rate) \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 \u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p><\/blockquote>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7e9\/e11\/e40\/7e9e11e4068f4183aa1f57eee5b6cb78.svg\" alt=\"$L=\\frac{1}{N}\\sum_{i=1}^{N}\\left(y_{predicted(i)}-y_{expected(i)}\\right)^2$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u043d\u0430, \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/js.tensorflow.org\/api\/latest\/#tf.LayersModel.fit\" rel=\"nofollow\">fit<\/a>:  <\/p>\n<pre><code class=\"javascript\">async function initModel() {     \/\/ skip for brevity      await model.fit(trainingInputTensor, trainingOutputTensor, {         epochs: 1000,         shuffle: true,         callbacks: {             onEpochEnd: async (epoch, { loss }) =&gt; {                 \/\/ any actions on during any epoch of training                 await tf.nextFrame();             }         }     }) } <\/code><\/pre>\n<p>  \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 100 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u043e\u0432 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0439); \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u044d\u043f\u043e\u0445\u0435 \u2013 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 (<i>shuffle=true<\/i>) \u2013 \u0447\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u043b\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 (4).<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u2013 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i><b>predict<\/b><\/i> \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"javascript\">const testInput = generateInputs(10); const testInputTensor = tf.tensor(testInput, [testInput.length, 2]);  const output = model.predict(testInputTensor).arraySync(); <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i><b>generateInputs<\/b><\/i> \u2013 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 10&#215;10, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u044f\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u0443\u044e \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u043d\u0430 100 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432:   <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f91\/9bc\/fd8\/f919bcfd80f6371a82df847f46515a68.svg\" alt=\"$[[0,0], [0, 0.1], [0, 0.2], \u2026. [1, 1]]$\" data-tex=\"display\"><\/math><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0442\u0443\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">import React, { useEffect, useState } from 'react'; import LossPlot from '.\/components\/LossPlot'; import Canvas from '.\/components\/Canvas'; import * as tf from &quot;@tensorflow\/tfjs&quot;;  let model;  export default () =&gt; {     const [data, changeData] = useState([]);     const [lossHistory, changeLossHistory] = useState([]);      useEffect(() =&gt; {         async function initModel() {             const input = [[0, 0], [1, 0], [0, 1], [1, 1]];             const inputTensor = tf.tensor(input, [input.length, 2]);              const output = [[0], [1], [1], [1]]             const outputTensor = tf.tensor(output, [output.length, 1]);              const testInput = generateInputs(10);             const testInputTensor = tf.tensor(testInput, [testInput.length, 2]);              model = tf.sequential();             model.add(             tf.layers.dense({ inputShape:[2], units:1, activation: 'sigmoid'})             );             model.compile({                 optimizer: tf.train.adam(0.1),                 loss: 'meanSquaredError'             });              await model.fit(inputTensor, outputTensor, {                 epochs: 100,                 shuffle: true,                 callbacks: {                     onEpochEnd: async (epoch, { loss }) =&gt; {                         changeLossHistory((prevHistory) =&gt; [...prevHistory, {                             epoch,                             loss                         }]);                          const output = model.predict(testInputTensor)                                                        .arraySync();                         changeData(() =&gt; output.map(([out], i) =&gt; ({                             out,                             x1: testInput[i][0],                             x2: testInput[i][1]                         })));                         await tf.nextFrame();                     }                 }             })         }         initModel();     }, []);      return (         &lt;div&gt;             &lt;Canvas data={data} squareAmount={10}\/&gt;             &lt;LossPlot loss={lossHistory}\/&gt;         &lt;\/div&gt;     ); }  function generateInputs(squareAmount) {     const step = 1 \/ squareAmount;     const input = [];     for (let i = 0; i &lt; 1; i += step) {         for (let j = 0; j &lt; 1; j += step) {             input.push([i, j]);         }     }     return input; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5z\/ci\/4u\/5zci4uxvoyfds5fmziqvpqhvrdw.png\"><\/div>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043f\u043b\u0430\u043d\u043a\u0435\u0440\u0435:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 66.6667%;\"><iframe src=\"https:\/\/embed.plnkr.co\/plunk\/pF8dCwQuzurgCgTu?autoCloseSidebar&amp;deferRun&amp;show=preview\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <b>\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 XOR<\/b><br \/>  \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 6, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u043c \u044d\u0442\u0438 \u0442\u043e\u0447\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418 \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/js\/5w\/n5\/js5wn538dhgmckxawmrnsdz-2nm.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 6 \u2014 \u0422\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u0421\u041a\u041b\u042e\u0427\u0410\u042e\u0429\u0415\u0415 \u0418\u041b\u0418 (XOR)<\/i><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u041b\u0418 \u2013 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0432\u0441\u0435 <i>TRUE<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u043f\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u2013 \u0432\u0441\u0435 <i>FALSE<\/i>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u044b \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u043a\u0440\u0438\u0432\u044b\u0445 (\u0440\u0438\u0441\u0443\u043d\u043e\u043a 7).<br \/>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u043d\u0438\u043c \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u043c \u0432 \u0441\u043b\u043e\u0435 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u2013 \u043d\u0443\u0436\u0435\u043d \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439 \u0441 \u0434\u0432\u0443\u043c\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0431\u044b \u043e\u0434\u043d\u0443 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043b\u0438\u043d\u0438\u0439 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-r\/bo\/ay\/-rboaylfzdtxlqejhmhlo4dmbdy.png\"><br \/>  <i>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 7 \u2013 \u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0418\u0421\u041a\u041b\u042e\u0427\u0410\u042e\u0429\u0415\u0415 \u0418\u041b\u0418 (XOR)<\/i><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043e\u0434\u043d\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 \u044d\u0442\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<pre><code class=\"javascript\">const input = [[0, 0], [1, 0], [0, 1], [1, 1]]; const inputTensor = tf.tensor(input, [input.length, 2]);  const output = [[0], [1], [1], [0]] const outputTensor = tf.tensor(output, [output.length, 1]); <\/code><\/pre>\n<p>  \u0412\u0442\u043e\u0440\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u2014 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0443 7:  <\/p>\n<pre><code class=\"javascript\">model = tf.sequential(); model.add(     tf.layers.dense({ inputShape: [2], units: 2, activation: 'sigmoid' }) ); model.add(     tf.layers.dense({ units: 1, activation: 'sigmoid' }) ); <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nt\/0k\/hp\/nt0khp8p95hmvess_sn2qjihyjm.png\"><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043f\u043b\u0430\u043d\u043a\u0435\u0440\u0435:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 66.6667%;\"><iframe src=\"https:\/\/embed.plnkr.co\/plunk\/FUYbevLR6PbyddIa?autoCloseSidebar&amp;deferRun&amp;show=preview\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <b>\u0422\u0435\u043c\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438:<\/b><br \/>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c, \u0431\u0430\u0437\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 \u0441\u043f\u0438\u0441\u043a\u0435 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432.<\/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\/516572\/\"> https:\/\/habr.com\/ru\/post\/516572\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516572\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 TensorFlow.JS, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043e\u0431\u0449\u0430\u044f \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u0430:<br \/>  <a href=\"https:\/\/habr.com\/ru\/post\/516458\/\">\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u041d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (\u0447\u0430\u0441\u0442\u044c 1): \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u0430<\/a><\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 OR; XOR, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u00abHello World\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439.<br \/>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c TensorFlow.js.   <\/p>\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-309008","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309008","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=309008"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309008\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}