Use verbose=0 when using model.predict() many times

main
Aurélien Geron 2022-09-23 21:54:25 +12:00
parent 2339bb771b
commit 3ade542ba5
1 changed files with 1 additions and 1 deletions

View File

@ -4668,7 +4668,7 @@
" arpegio = tf.reshape(arpegio, [1, -1])\n",
" for chord in range(length):\n",
" for note in range(4):\n",
" next_note = model.predict(arpegio).argmax(axis=-1)[:1, -1:]\n",
" next_note = model.predict(arpegio, verbose=0).argmax(axis=-1)[:1, -1:]\n",
" arpegio = tf.concat([arpegio, next_note], axis=1)\n",
" arpegio = tf.where(arpegio == 0, arpegio, arpegio + min_note - 1)\n",
" return tf.reshape(arpegio, shape=[-1, 4])"