From 16a453568ce9acf041e4bc633aa2936d6b0b1cc2 Mon Sep 17 00:00:00 2001 From: yiitozer Date: Thu, 8 Aug 2024 13:03:09 +0200 Subject: [PATCH] bugfix --- demo_drum_sound_separation_nmf.ipynb | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) mode change 100755 => 100644 demo_drum_sound_separation_nmf.ipynb diff --git a/demo_drum_sound_separation_nmf.ipynb b/demo_drum_sound_separation_nmf.ipynb old mode 100755 new mode 100644 index 0bc85bd..0f10ac9 --- a/demo_drum_sound_separation_nmf.ipynb +++ b/demo_drum_sound_separation_nmf.ipynb @@ -63,20 +63,20 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['sput001.wav', 'electro008.wav', 'rock005.wav', 'pitched005.wav', 'rock007.wav']\n" + "['sput001.wav', 'rock007.wav', 'rock005.wav', 'electro008.wav', 'pitched005.wav']\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "6d7759d0f8444b44b3fa45bbf715420e", + "model_id": "e2936502dc3348219add938639eba699", "version_major": 2, "version_minor": 0 }, @@ -91,13 +91,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "['cheeba_002.wav', 'metal0010.wav', 'princes003.wav', 'rock018.wav', 'sonor_034.wav']\n" + "['metal0010.wav', 'rock018.wav', 'cheeba_002.wav', 'princes003.wav', 'sonor_034.wav']\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "6da634f9c5d342e68eb3e152a6750c16", + "model_id": "1ca82ba8d19e456eab6f4fa036d13970", "version_major": 2, "version_minor": 0 }, @@ -112,13 +112,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "['tama_036.wav', 'pitched006.wav', 'pres_002.wav', 'sabian_003.wav', 'funky001.wav']\n" + "['pres_002.wav', 'funky001.wav', 'pitched006.wav', 'tama_036.wav', 'sabian_003.wav']\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "676f60441de7458fae781f0af0a6a344", + "model_id": "e53dc73d45004c0cb777c25c1cd576d4", "version_major": 2, "version_minor": 0 }, @@ -220,7 +220,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -246,7 +246,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -254,11 +254,11 @@ "evalue": "list index out of range", "output_type": "error", "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/tmp/ipykernel_17870/1854988463.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;31m# NMFD core method\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 19\u001b[0;31m nmfd_W, nmfd_H, nmfd_V, divKL, _ = nmfd(V=A, \n\u001b[0m\u001b[1;32m 20\u001b[0m \u001b[0mnum_comp\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnum_comp\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0mnum_frames\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnum_frames\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/workspace/python/libnmfd/libnmfd/core/nmfconv.py\u001b[0m in \u001b[0;36mnmfd\u001b[0;34m(V, num_comp, num_frames, num_iter, num_template_frames, init_W, init_H, func_preprocess, func_postprocess, fix_W, fix_H, num_bins, **kwargs)\u001b[0m\n\u001b[1;32m 245\u001b[0m \u001b[0mnum_frames\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mM\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mnum_frames\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mnum_frames\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 246\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 247\u001b[0;31m \u001b[0mtensor_W\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mzeros\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minit_W\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mR\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 248\u001b[0m \u001b[0mcost_func\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mzeros\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mL\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 249\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mIndexError\u001b[0m: list index out of range" + "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[0;31mIndexError\u001B[0m Traceback (most recent call last)", + "\u001B[0;32m/tmp/ipykernel_650923/1854988463.py\u001B[0m in \u001B[0;36m\u001B[0;34m\u001B[0m\n\u001B[1;32m 17\u001B[0m \u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 18\u001B[0m \u001B[0;31m# NMFD core method\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0;32m---> 19\u001B[0;31m nmfd_W, nmfd_H, nmfd_V, divKL, _ = nmfd(V=A, \n\u001B[0m\u001B[1;32m 20\u001B[0m \u001B[0mnum_comp\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0mnum_comp\u001B[0m\u001B[0;34m,\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 21\u001B[0m \u001B[0mnum_frames\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0mnum_frames\u001B[0m\u001B[0;34m,\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n", + "\u001B[0;32m~/workspace/python/libnmfd/libnmfd/core/nmfconv.py\u001B[0m in \u001B[0;36mnmfd\u001B[0;34m(V, num_comp, num_frames, num_iter, num_template_frames, init_W, init_H, func_preprocess, func_postprocess, fix_W, fix_H, num_bins, **kwargs)\u001B[0m\n\u001B[1;32m 245\u001B[0m \u001B[0mnum_frames\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0mM\u001B[0m \u001B[0;32mif\u001B[0m \u001B[0mnum_frames\u001B[0m \u001B[0;32mis\u001B[0m \u001B[0;32mNone\u001B[0m \u001B[0;32melse\u001B[0m \u001B[0mnum_frames\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 246\u001B[0m \u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0;32m--> 247\u001B[0;31m \u001B[0mtensor_W\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0mnp\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mzeros\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0minit_W\u001B[0m\u001B[0;34m[\u001B[0m\u001B[0;36m0\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mshape\u001B[0m\u001B[0;34m[\u001B[0m\u001B[0;36m0\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0mR\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0mT\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0m\u001B[1;32m 248\u001B[0m \u001B[0mcost_func\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0mnp\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mzeros\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mL\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 249\u001B[0m \u001B[0;34m\u001B[0m\u001B[0m\n", + "\u001B[0;31mIndexError\u001B[0m: list index out of range" ] } ], @@ -499,7 +499,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.8.18" } }, "nbformat": 4,