{"id":305830,"date":"2020-06-23T21:01:10","date_gmt":"2020-06-23T21:01:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305830"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305830","title":{"rendered":"\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0443\u0437\u044b\u043a\u0438"},"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\/501550\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bc\/bm\/hs\/bcbmhstdfpzixo4cvfkw6guloai.png\"><\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043c\u0443\u0437\u044b\u043a\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0442\u0435\u0439 LSTM. <\/p>\n<p>  <\/p>\n<p>\u0426\u0435\u043b\u044e \u0441\u0442\u0430\u0442\u044c\u0438 \u0435\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0435\u0442\u0435\u0439 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f, \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<br \/>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438, \u043d\u0443\u0436\u043d\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0447\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<ul>\n<li>Python3<\/li>\n<li>BASH<\/li>\n<li>jupyter-notebook.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0434\u043e\u0431\u0440\u044f\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u0441\u0443\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0440\u0438\u0447\u0438\u043d\u0438\u0442\u044c \u0434\u043e\u0441\u0430\u0434\u0443 \u0430\u0432\u0442\u043e\u0440\u0443, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u0440\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438(\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430).<\/li>\n<li>\u043d\u0435\u0440\u0438\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/li>\n<li>\u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u0438 \u0441\u0442\u0430\u0442\u0438.<\/li>\n<\/ul>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"vhodnye-dannye\">\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>  <\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/ABC_notation\" rel=\"nofollow\">ABC<\/a><br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[V: S] (BA) !p!G2 |z AGA|(FG) A2| w: ple -na, Do-mi-nus te -cum, [V: A] F2       E2|z FEC|(DE) F2 | w: ple-na, Do-mi-nus te -cum, [V: T] (dc)     c2|z ccA|(Ac) c2 | w: ple -na, Do-mi-nus te -cum, [V: B] (B,,F,) C,2|z F,C,F,|(D,C,) F,2 | w: ple -na, Do-mi-nus te -cum,<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"http:\/\/abcplus.sourceforge.net\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u0414\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0442\u0435\u043e\u0440\u0438\u0438 \u0437\u0430\u0433\u043e\u0432\u043e\u0440\u0430, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u0432 \u0433\u0443\u0433\u043b\u0435, \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u044d\u0442\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c.<\/p>\n<p>  <\/p>\n<h1 id=\"chtenie-fayla\">\u0427\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/jupyter.org\/install\" rel=\"nofollow\">jupyter notebook <\/a>.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">import numpy as np import matplotlib.pyplot as plt import tensorflow as tf <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">with open('my_song.abc', 'r') as f:     text = f.read()<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"proslushivanie-pesni\">\u041f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0441\u043d\u0438<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u0435\u0441\u043d\u044e, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u043d\u0430\u0448\u0443 \u0441\u0440\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">!apt-get install -y -qq abcmidi timidity<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043f\u0435\u0441\u043d\u044e \u0432 \u0444\u0430\u0439\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#\u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0443\u0442 \u043d\u0443\u0436\u0435\u043d \u0433\u0438\u0431\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 song = text.split('\\n\\n') with open('my_song.abc', &quot;w&quot;) as f:     f.write(song)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 \u0444\u0430\u0439\u043b mid, \u0430 \u0437\u0430\u0442\u0435\u043c wav. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">!abc2midi &quot;my_song.abc&quot; -o &quot;my_song.mid&quot; &amp;&amp; timidity &quot;my_song.mid&quot; -Ow &quot;my_song.wav&quot;<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"rezultat\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h1>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from IPython.display import Audio Audio('my_song.wav') #\u0441\u0441\u044b\u043b\u043a\u0430 #https:\/\/github.com\/fuwiak\/Habr\/blob\/master\/my_song.wav<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"vremya-na-lstm\">\u0412\u0440\u0435\u043c\u044f \u043d\u0430 LSTM<\/h1>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 my_song.wav \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u043c, \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 LSTM.<\/p>\n<p>  <\/p>\n<h1 id=\"sozdanie-obuchayuschey-vyborki\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/h1>\n<p>  <\/p>\n<pre><code class=\"python\">#\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0435\u0441\u043d\u044f\u0445. vocab = set(text)  # \u0441\u043b\u043e\u0432\u0430\u0440\u044c: \u043a\u043b\u044e\u0447=\u0441\u0438\u043c\u0432\u043e\u043b, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435=\u0438\u043d\u0434\u0435\u043a\u0441, \u0443\u043a\u0430\u0437\u0430\u0432 \u0441\u0438\u043c\u0432\u043e\u043b, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441 char_to_index = {char_ :ind for ind, char_  in enumerate (vocab)} ind_to_char = np.array(vocab) text_as_int = np.array([char_to_index[c] for c in text])  #'X:1\\nT:dfkjds ' ----- &gt; [49 22 13  0 45 22 26 67 60 79 56 69 59] <\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"generaciya-posledovatelnosti\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h1>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/p>\n<p>  <\/p>\n<ul>\n<li>input: \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 100 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 <\/li>\n<li>target: \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 100 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u043d\u0430 1. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0440\u0443\u0447\u0435\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 100 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c RNN \u0432\u0435\u0440\u0441\u0438\u0438 &quot;many to many&quot;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (100 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439).<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"> seq_length = 100 step = 10  sequences = np.array([text_as_int[i:i+seq_length+1] for i in range(0, len(text_as_int)-seq_length-1,step)]) input_text = np.array([seq[:-1] for seq in sequences])  target_text = np.array([seq[1:] for seq in sequences]) <\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"lstm\">LSTM<\/h1>\n<p>  <\/p>\n<pre><code class=\"python\">from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, LSTM, Dense, Embedding  vocab_size = len(vocab)  #new value embedding_dim = 256*2 rnn_units = 1024*2  x = Input(shape=(seq_length,)) e = Embedding(vocab_size, embedding_dim)(x) l = LSTM(rnn_units, return_sequences=True)(e) d = Dense(vocab_size, activation='softmax')(l) model = Model(inputs=x, outputs=d) model.summary()<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"obuchenie-seti\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0438<\/h1>\n<p>  <\/p>\n<pre><code class=\"plaintext\">from tensorflow.keras.optimizers import Adam model.compile(optimizer=Adam(), loss='sparse_categorical_crossentropy')  EP=5 BS = 128  hist = model.fit(input_text, target_text, batch_size=BS, epochs=EP)<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"sozdanie-muzyki-iz-modeli\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0443\u0437\u044b\u043a\u0438 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438<\/h1>\n<p>  <\/p>\n<pre><code class=\"python\">def generate_text(model, start_string, generation_length=100):    input_eval = np.array([char_to_index[s] for s in start_string])   x = np.zeros((1, seq_length))   x[0,-len(input_eval):] = input_eval[:]   text_generated = []    model.reset_states()   for i in range(generation_length):       predictions = model.predict(x)[0,-1]        predictions = predictions.astype(np.float64)       predictions = predictions\/np.sum(predictions)           predicted_id = np.argmax(np.random.multinomial(1, predictions))       x[0,:-1] = x[0,1:]       x[0,-1] = predicted_id       text_generated.append([predicted_id])     return (start_string + ''.join(text_generated))<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">new_song = generate_text(model, &quot;X:&quot;, generation_length=500) <\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"nash-rezultat\">\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h1>\n<p>  <\/p>\n<pre><code class=\"python\">with open('new_song.abc', &quot;w&quot;) as f:     f.write(new_song)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">!abc2midi &quot;new_song.abc&quot; -o &quot;new_song.mid&quot; &amp;&amp; timidity &quot;new_song.mid&quot; -Ow &quot;new_song.wav&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\"> Audio('new_song.wav') #https:\/\/github.com\/fuwiak\/Habr\/blob\/master\/new_song.wav<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"itogi\">\u0418\u0442\u043e\u0433\u0438<\/h1>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u0438\u0438 \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432\u0441\u0435\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445\/\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u0437\u0430\u0438\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u044b\u0445 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f. \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f\u0445, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0430\u0434\u0432\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c. \u041a\u0430\u043a \u0438 \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432!<\/p>\n<p>  <\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2020\/01\/how-to-perform-automatic-music-generation\/\" rel=\"nofollow\">https:\/\/www.analyticsvidhya.com\/blog\/2020\/01\/how-to-perform-automatic-music-generation\/<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/MIDI\" rel=\"nofollow\">https:\/\/en.wikipedia.org\/wiki\/MIDI<\/a><\/li>\n<li><a href=\"https:\/\/colah.github.io\/posts\/2015-08-Understanding-LSTMs\/\" rel=\"nofollow\">https:\/\/colah.github.io\/posts\/2015-08-Understanding-LSTMs\/<\/a><\/li>\n<li><a href=\"https:\/\/towardsdatascience.com\/how-to-generate-music-using-a-lstm-neural-network-in-keras-68786834d4c5\" rel=\"nofollow\">https:\/\/towardsdatascience.com\/how-to-generate-music-using-a-lstm-neural-network-in-keras-68786834d4c5<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/ABC_notation\" rel=\"nofollow\">https:\/\/en.wikipedia.org\/wiki\/ABC_notation<\/a><\/li>\n<li><a href=\"http:\/\/abcplus.sourceforge.net\" rel=\"nofollow\">http:\/\/abcplus.sourceforge.net<\/a><\/li>\n<li><a href=\"https:\/\/www.tensorflow.org\/tutorials\/text\/text_generation\" rel=\"nofollow\">https:\/\/www.tensorflow.org\/tutorials\/text\/text_generation<\/a><\/li>\n<\/ul>\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\/501550\/\"> https:\/\/habr.com\/ru\/post\/501550\/<\/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\/501550\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bc\/bm\/hs\/bcbmhstdfpzixo4cvfkw6guloai.png\"><\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043c\u0443\u0437\u044b\u043a\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0442\u0435\u0439 LSTM. <\/p>\n<p>  <\/p>\n<p>\u0426\u0435\u043b\u044e \u0441\u0442\u0430\u0442\u044c\u0438 \u0435\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0435\u0442\u0435\u0439 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f, \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<br \/>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438, \u043d\u0443\u0436\u043d\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0447\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<ul>\n<li>Python3<\/li>\n<li>BASH<\/li>\n<li>jupyter-notebook.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0434\u043e\u0431\u0440\u044f\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u0441\u0443\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0440\u0438\u0447\u0438\u043d\u0438\u0442\u044c \u0434\u043e\u0441\u0430\u0434\u0443 \u0430\u0432\u0442\u043e\u0440\u0443, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u0440\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438(\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430).<\/li>\n<li>\u043d\u0435\u0440\u0438\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/li>\n<li>\u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0442\u0438 \u0441\u0442\u0430\u0442\u0438.<\/li>\n<\/ul>\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-305830","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305830","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=305830"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305830\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}