I trained a model on 50K mono drum loops, to split them by kicks, mixed percusion, snares, brass (hats, crashes, etc).. Now when I try to test the model I get this error.
Cannot feed value of shape (1727, 2049, 2) for Tensor 'mixed_stft:0', which has shape '(None, 2049, 1)'
I've test this with a loop from my training set as well as one that much longer that wasn't used for training. Both give me the same error. This makes me wonder if the mono audio is being handled properly when trying to use the separate function.. I'd really appreciate the assistance in troubleshooting this, I've invested a lot of time and effort into building this model. - Thanks
spleeter separate -o sep_out -p drumsplit_config.json mixed.wav --verbose INFO:tensorflow:Apply unet for brass_perc_spectrogram WARNING:tensorflow:From /opt/conda/envs/spleeter/lib/python3.8/site-packages/tensorflow/python/keras/layers/normalization.py:534: _colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. INFO:tensorflow:Apply unet for kicks_spectrogram INFO:tensorflow:Apply unet for pitched_perc_spectrogram INFO:tensorflow:Apply unet for snares_claps_spectrogram INFO:tensorflow:Restoring parameters from pretrained_models/drumsplit_model/model.ckpt-200000 Traceback (most recent call last): File "/opt/conda/envs/spleeter/bin/spleeter", line 8, in <module> sys.exit(entrypoint()) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/spleeter/__main__.py", line 256, in entrypoint spleeter() File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/typer/main.py", line 214, in __call__ return get_command(self)(*args, **kwargs) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/typer/main.py", line 497, in wrapper return callback(**use_params) # type: ignore File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/spleeter/__main__.py", line 128, in separate separator.separate_to_file( File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/spleeter/separator.py", line 378, in separate_to_file sources = self.separate(waveform, audio_descriptor) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/spleeter/separator.py", line 321, in separate return self._separate_librosa(waveform, audio_descriptor) File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/spleeter/separator.py", line 266, in _separate_librosa outputs = sess.run( File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 967, in run result = self._run(None, fetches, feed_dict, options_ptr, File "/opt/conda/envs/spleeter/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1164, in _run raise ValueError( ValueError: Cannot feed value of shape (1727, 2049, 2) for Tensor 'mixed_stft:0', which has shape '(None, 2049, 1)'
Hi @dustyny,
this seems to be an issue of the stereo vs mono management (2 vs 1 last dimension of the tensor in your error).
Have you modified the n_channels parameter to 1 in the config?
I trained a model on 50K mono drum loops, to split them by kicks, mixed percusion, snares, brass (hats, crashes, etc).. Now when I try to test the model I get this error.
Cannot feed value of shape (1727, 2049, 2) for Tensor 'mixed_stft:0', which has shape '(None, 2049, 1)'
I've test this with a loop from my training set as well as one that much longer that wasn't used for training. Both give me the same error. This makes me wonder if the mono audio is being handled properly when trying to use the separate function.. I'd really appreciate the assistance in troubleshooting this, I've invested a lot of time and effort into building this model. - Thanks