mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-02-02 04:57:51 +01:00
Update libraries to latest version, including TensorFlow 2.4.1 and Scikit-Learn 0.24.1
This commit is contained in:
@@ -1868,7 +1868,8 @@
|
||||
" arpegio = tf.reshape(arpegio, [1, -1])\n",
|
||||
" for chord in range(length):\n",
|
||||
" for note in range(4):\n",
|
||||
" next_note = model.predict_classes(arpegio)[:1, -1:]\n",
|
||||
" #next_note = model.predict_classes(arpegio)[:1, -1:]\n",
|
||||
" next_note = np.argmax(model.predict(arpegio), 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])"
|
||||
@@ -2010,7 +2011,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.6"
|
||||
"version": "3.7.9"
|
||||
},
|
||||
"nav_menu": {},
|
||||
"toc": {
|
||||
|
||||
Reference in New Issue
Block a user