{"id":311407,"date":"2020-10-13T15:01:11","date_gmt":"2020-10-13T15:01:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311407"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311407","title":{"rendered":"\u0421\u0435\u043c\u043f\u043b\u0438\u043d\u0433 \u043f\u043e\u043f\u0435\u0440\u0435\u043a \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u044b\u0436\u0430\u0442\u044c \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445"},"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\/523244\/\">\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u0448\u0442\u0440\u0438\u0445 \u043a \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0443 MNIST (\u043d\u0443 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447).<\/p>\n<p>  \u0412 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0432\u043a\u043b\u0430\u0434\u0435 \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0430 \u0440\u0430\u0431\u043e\u0442 \u043f\u0440\u043e \u043f\u043e\u0438\u0441\u043a \u0443\u0441\u043e\u0432, \u0445\u0432\u043e\u0441\u0442\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0438\u0445 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0440\u0435\u0439 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a. \u041f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u0432\u043e\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e<br \/>  <a href=\"https:\/\/www.youtube.com\/watch?v=v9jBkAUNshE&amp;feature=youtu.be\" rel=\"nofollow\">www.youtube.com\/watch?v=v9jBkAUNshE&amp;feature=youtu.be<\/a> <br \/>  <b>\u0414\u043e\u043a\u043b\u0430\u0434 \u00ab\u041a\u0430\u043a \u0434\u0443\u043c\u0430\u044e\u0442 \u0440\u043e\u0431\u043e\u0442\u044b. \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f ML-\u043c\u043e\u0434\u0435\u043b\u0435\u0439\u00bb <\/b><br \/>  \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438 \u043a\u0430\u043a \u043b\u044e\u0431\u043e\u0435 \u0442\u043e\u043b\u043a\u043e\u0432\u043e\u0435 \u0434\u0435\u043b\u043e, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u2014 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b?<\/p>\n<p>  \u0418\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u2014 \u0432 \u0441\u0435\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043a\u0430\u0437\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0410 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u0432\u0430\u0440\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430? \u0410 \u0435\u0441\u0442\u044c \u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 MNIST \u0438 \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u044b\u0448\u0435?<\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440, \u0441\u043b\u0435\u0434\u0443\u044f \u0441\u0432\u043e\u0435\u043c\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e, \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043c\u0435\u0448\u0430\u0442\u044c \u043a\u0443\u0447\u0443 \u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<p>  \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0432\u0441\u0435\u043c MNIST ( <a href=\"http:\/\/yann.lecun.com\/exdb\/mnist\/\" rel=\"nofollow\">yann.lecun.com\/exdb\/mnist<\/a> ) \u0438 \u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.<br \/>  \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043e\u043f\u044b\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u0443\u044e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b KERAS <br \/>  <a href=\"https:\/\/github.com\/keras-team\/keras\/blob\/master\/examples\/mnist_cnn.py\" rel=\"nofollow\">github.com\/keras-team\/keras\/blob\/master\/examples\/mnist_cnn.py<\/a> <\/p>\n<p>  \u0410 \u0441\u0430\u043c\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e.<br \/>  \u041e\u0431\u0443\u0447\u0438\u043c \u0441\u0435\u0442\u044c \u0438\u0437 KERAS \u0441 \u0442\u0430\u043a\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430, \u043a\u0430\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442.\u0435. \u0443\u0447\u0438\u043c \u0441\u0435\u0442\u044c \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 test_accuracy \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 validation_accuracy \u0438 validation_accuracy \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 15 \u044d\u043f\u043e\u0445 \u043d\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442\u0441\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0441\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0418\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 MNIST \u0441\u0434\u0435\u043b\u0430\u0435\u043c 324 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0442\u043e\u0447\u0435\u043a \u0438 \u0431\u0443\u0434\u0435\u043c \u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u044c\u044e \u043d\u0430 \u0442\u043e\u0447\u043d\u043e \u0442\u0435\u0445 \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c, \u0441\u0447\u0438\u0442\u0430\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0432\u0435\u0440\u043d\u044b\u043c \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0432\u0438\u0434\u0435\u043b\u0438 \u0435\u0433\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437.<\/p>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 mnist, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 &#8216;float32&#8217; \u0438 \u043d\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d 0. \u2014 1.<br \/>  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430.  <\/p>\n<pre><code class=\"python\">'''Trains a simple convnet on the MNIST dataset. Gets to 99.25% test accuracy after 12 epochs (there is still a lot of margin for parameter tuning). 16 seconds per epoch on a GRID K520 GPU. '''  from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Sequential, load_model from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backend as K from keras.optimizers import * from keras.callbacks import EarlyStopping  import numpy as np import os  num_classes = 10  # input image dimensions img_rows, img_cols = 28, 28  # the data, shuffled and split between train and test sets (x_train, y_train), (x_test, y_test) = mnist.load_data()  if K.image_data_format() == 'channels_first':     x_train = x_train.reshape(x_train.shape[0], 1, img_rows, img_cols)     x_test = x_test.reshape(x_test.shape[0], 1, img_rows, img_cols)     input_shape = (1, img_rows, img_cols) else:     x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)     x_test = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1)     input_shape = (img_rows, img_cols, 1)  x_train = x_train.astype('float32') x_test = x_test.astype('float32') x_train \/= np.max(x_train) x_test \/= np.max(x_test)  XX_test = np.copy(x_test) XX_train = np.copy(x_train) YY_test = np.copy(y_test) YY_train = np.copy(y_train)   print('x_train shape:', XX_train.shape) print('x_test shape:', XX_test.shape)<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u0435\u0441\u043e\u0432, \u0442\u0430\u043a\u0436\u0435 accuracy \u0438 loss \u043d\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438. \u042d\u0442\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043d\u043e \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e.<\/p>\n<pre><code class=\"python\">f_model = &quot;.\/data\/mnist_cnn_model.h5&quot; f_weights = &quot;.\/data\/mnist_cnn_weights.h5&quot; accu_f = 'accuracy' loss_f = 'binary_crossentropy' <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0430 \u0441\u0435\u0442\u044c \u2014 \u0442\u043e\u0447\u044c \u0432 \u0442\u043e\u0447\u044c \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <br \/>  <a href=\"https:\/\/github.com\/keras-team\/keras\/blob\/master\/examples\/mnist_cnn.py\" rel=\"nofollow\">github.com\/keras-team\/keras\/blob\/master\/examples\/mnist_cnn.py<\/a><br \/>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0435\u0442\u044c \u0438 \u0432\u0435\u0441\u044b \u043d\u0430 \u0434\u0438\u0441\u043a. \u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438  <\/p>\n<pre><code class=\"python\">y_train = keras.utils.to_categorical(y_train, num_classes) y_test = keras.utils.to_categorical(y_test, num_classes)  model = Sequential()  model.add(Conv2D(32, kernel_size=(3, 3),                  activation='relu',                  input_shape=input_shape)) model.add(Conv2D(64, (3, 3), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Dropout(0.25)) model.add(Flatten()) model.add(Dense(128, activation='relu')) model.add(Dropout(0.5)) model.add(Dense(num_classes, activation='softmax'))  model.compile(loss=[loss_f], optimizer=Adam(lr=1e-4), metrics=[accu_f]) model.summary()  model.save_weights(f_weights) model.save(f_model) <\/code><\/pre>\n<pre><code class=\"python\">Model: &quot;sequential&quot; _________________________________________________________________ Layer (type)                 Output Shape              Param #    ================================================================= conv2d (Conv2D)              (None, 26, 26, 32)        320        _________________________________________________________________ conv2d_1 (Conv2D)            (None, 24, 24, 64)        18496      _________________________________________________________________ max_pooling2d (MaxPooling2D) (None, 12, 12, 64)        0          _________________________________________________________________ dropout (Dropout)            (None, 12, 12, 64)        0          _________________________________________________________________ flatten (Flatten)            (None, 9216)              0          _________________________________________________________________ dense (Dense)                (None, 128)               1179776    _________________________________________________________________ dropout_1 (Dropout)          (None, 128)               0          _________________________________________________________________ dense_1 (Dense)              (None, 10)                1290       ================================================================= Total params: 1,199,882 Trainable params: 1,199,882 Non-trainable params: 0 _________________________________________________________________<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c mnist, \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440, \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"python\">x_test = np.copy(XX_test) x_train = np.copy(XX_train) s0 = 0  if os.path.isfile(f_model):     model = load_model(f_model)     model.load_weights(f_weights, by_name=False)      step = 0     while True:                  fit = model.fit(x_train, y_train,                   batch_size=batch_size,                   epochs=1,                   verbose=0,                   validation_data=(x_test, y_test)                 )                  current_accu = fit.history[accu_f][0]         current_loss = fit.history['loss'][0]         val_accu = fit.history['val_'+accu_f][0]         val_loss = fit.history['val_loss'][0]         print(&quot;\\x1b[2K&quot;,&quot;accuracy {0:12.10f} loss {1:12.10f} step {2:5d} val_accu {3:12.10f} val_loss {4:12.10f}  &quot;.\\                           format(current_accu, current_loss, step, val_accu, val_loss), end=&quot;\\r&quot;)              step += 1         if val_accu &gt; max_accu:             s0 = 0             max_accu = val_accu         else:             s0 += 1         if current_accu * 0.995 &gt; val_accu and s0 &gt; 15:             break else:     print(&quot;model not found &quot;)  accuracy 0.9967333078 loss 0.0019656278 step   405 val_accu 0.9916999936 val_loss 0.0054226643   <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u043d\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442. \u041c\u044b \u0431\u0435\u0440\u0435\u043c \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435 60000 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a, \u0438 \u0432 \u043d\u0438\u0445 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u0432\u0441\u0451, \u043a\u0440\u043e\u043c\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 9\u04459. \u041f\u043e\u043b\u0443\u0447\u0438\u043c 324 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 \u043d\u0430 \u043d\u0438\u0445 \u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u0441\u0435\u0442\u044c \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">batch_size = 5000 s0 = 0 max_accu = 0.  for i in range(28 - 9):     for j in range(28 - 9):         print(&quot;\\ni= &quot;, i, &quot;  j= &quot;,j)         x_test = np.copy(XX_test)         x_train = np.copy(XX_train)          x_train[:,:i,:j,:] = 0.         x_test [:,:i,:j,:] = 0.          x_train[:,i+9:,j+9:,:] = 0.         x_test [:,i+9:,j+9:,:] = 0.          if os.path.isfile(f_model):             model = load_model(f_model)             model.load_weights(f_weights, by_name=False)         else:             print(&quot;model not found &quot;)             break          step = 0         while True:                          fit = model.fit(x_train, y_train,                       batch_size=batch_size,                       epochs=1,                       verbose=0,                       validation_data=(x_test, y_test)                     )                          current_accu = fit.history[accu_f][0]             current_loss = fit.history['loss'][0]             val_accu = fit.history['val_'+accu_f][0]             val_loss = fit.history['val_loss'][0]             print(&quot;\\x1b[2K&quot;,&quot;accuracy {0:12.10f} loss {1:12.10f} step {2:5d} val_accu {3:12.10f} val_loss {4:12.10f}  &quot;.\\    format(current_accu, current_loss, step, val_accu, val_loss), end=&quot;\\r&quot;)                      step += 1             if val_accu &gt; max_accu:                 s0 = 0                 max_accu = val_accu             else:                 s0 += 1             if current_accu * 0.995 &gt; val_accu and s0 &gt; 15:                 break <\/code><\/pre>\n<p>  \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0442\u0443\u0442 \u0432\u0441\u0435 324 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u043c\u043e\u0433\u0443 \u0432\u044b\u0441\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e. \u0420\u0430\u0441\u0447\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0442\u043e\u043a, \u044d\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<p>  \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0435\u0442\u044c \u043d\u0430 \u043e\u0431\u0440\u0435\u0437\u043a\u0435 9\u04459 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0445\u0443\u0436\u0435, \u0447\u0442\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u043e \u0438 \u043b\u0443\u0447\u0448\u0435, \u0447\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  i= 0 j= 14<br \/>   accuracy 0.9972333312 loss 0.0017946947 step 450 val_accu 0.9922000170 val_loss 0.0054322388 <\/p>\n<p>  i= 18 j= 1<br \/>   accuracy 0.9973166585 loss 0.0019487827 step 415 val_accu 0.9922000170 val_loss 0.0053000450 <\/p>\n<p>  \u041c\u044b \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0441 \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u0432\u0441\u0451, \u043a\u0440\u043e\u043c\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 9\u04459 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0443 \u043d\u0430\u0441 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442\u0441\u044f!<br \/>  \u0422\u0430\u043a \u0436\u0435 \u044f\u0432\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0449\u0430\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0442\u0438, \u043d\u0435 \u043e\u0434\u043d\u0430. \u0418 \u043d\u0435 \u0434\u0432\u0435, \u044d\u0442\u043e \u0434\u0432\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  \u0418\u0442\u043e\u0433 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b:<\/p>\n<p>   \u2014 \u043b\u044e\u0431\u043e\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u041b\u0435\u041a\u0443\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u043b \u0447\u0442\u043e-\u0442\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043a\u0438 \u0441\u0443\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u0442\u043e\u0447\u043a\u0438 \u043c\u0435\u0448\u0430\u044e\u0449\u0438\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e. \u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u00ab\u0432\u0440\u0435\u0434\u043d\u044b\u0445\u00bb \u0442\u043e\u0447\u0435\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439, \u043e\u043d\u0438 \u0435\u0441\u0442\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435 \u0432\u0438\u0434\u043d\u043e.<\/p>\n<p>   \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0435\u043a\u0438\u043d\u0433 \u0438 \u0431\u043b\u0435\u043d\u0434\u0438\u043d\u0433 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0434\u043e\u043b\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438, \u043d\u043e \u0438 \u043f\u043e\u043f\u0435\u0440\u0435\u043a, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0438 \u0434\u0430\u043b\u0435\u0435 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u0434\u0430, \u0447\u0442\u043e \u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0438\u043d\u0433\u0430 \u043f\u043e\u043f\u0435\u0440\u0435\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435. \u0410 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 kaggle.com \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0445 \u0438\u043d\u043e\u0433\u0434\u0430 (\u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 ) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u0440\u0435\u0439\u0442\u0438\u043d\u0433.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p><\/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\/523244\/\"> https:\/\/habr.com\/ru\/post\/523244\/<\/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\/523244\/\">\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u0448\u0442\u0440\u0438\u0445 \u043a \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0443 MNIST (\u043d\u0443 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447).<\/p>\n<p>  \u0412 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0432\u043a\u043b\u0430\u0434\u0435 \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0430 \u0440\u0430\u0431\u043e\u0442 \u043f\u0440\u043e \u043f\u043e\u0438\u0441\u043a \u0443\u0441\u043e\u0432, \u0445\u0432\u043e\u0441\u0442\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0438\u0445 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0440\u0435\u0439 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a. \u041f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u0432\u043e\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435.  <\/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-311407","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311407","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=311407"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311407\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}