Closed Mar-Pfa closed 3 years ago
Any Idea!? Maybe the Input-Data not correct!? I used wav 16 Bit PCM 44.100 stereo Help would be cool, thanks!
Argh... found the Reason: Validation of the Input data could be improved: the duration of the training files were entered without decimal separator -> 200 - i changed it to 200.0 and now it works
beside that it looks like that the 2stems/base_config.json is missing some entries that causes the code also to fail - i've added now all the entries from the 4stems and it runs through e.g. the entry "n_chunks_per_song":40,
so for me it's closed (just to mention -> validation of parameters would be a good improval... but i've no idea about python so i cannot create a pullrequest for this, sry)
Description
i try to run a simple training test on win10 / conda / input is only single set of files
spleeter train -p .\base_config.json -d .
{ "train_csv": "train.csv", "validation_csv": "test.csv", "model_dir": "model", "mix_name": "mix", "instrument_list": ["vocals", "accompaniment"], "sample_rate":44100, "frame_length":4096, "frame_step":1024, "T":512, "F":1024, "n_channels":2, "separation_exponent":2, "mask_extension":"zeros", "learning_rate": 1e-4, "batch_size":4, "training_cache":"training_cache", "validation_cache":"validation_cache", "train_max_steps": 1000000, "throttle_secs":300, "random_seed":0, "save_checkpoints_steps":150, "save_summary_steps":5, "model":{ "type":"unet.unet", "params":{} } }
train.csv: mix_path,vocals_path,accompaniment_path,duration output0.wav,output1.wav,output2.wav,200
validation.csv mix_path,vocals_path,accompaniment_path,duration output0.wav,output1.wav,output2.wav,200
Step to reproduce
Output
spleeter train -p .\base_config.json -d . INFO:spleeter:Start model training Traceback (most recent call last): File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\Scripts\spleeter.exe__main.py", line 7, in
File "c:\programdata\anaconda3\lib\site-packages\spleeter__main.py", line 256, in entrypoint
spleeter()
File "c:\programdata\anaconda3\lib\site-packages\typer\main.py", line 214, in call__
return get_command(self)(*args, **kwargs)
File "c:\programdata\anaconda3\lib\site-packages\click\core.py", line 829, in call
return self.main(args, kwargs)
File "c:\programdata\anaconda3\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\programdata\anaconda3\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\programdata\anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "c:\programdata\anaconda3\lib\site-packages\click\core.py", line 610, in invoke
return callback(args, kwargs)
File "c:\programdata\anaconda3\lib\site-packages\typer\main.py", line 497, in wrapper
return callback(use_params) # type: ignore
File "c:\programdata\anaconda3\lib\site-packages\spleeter__main__.py", line 89, in train
tf.estimator.train_and_evaluate(estimator, train_spec, evaluation_spec)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 505, in train_and_evaluate
return executor.run()
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 646, in run
return self.run_local()
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 743, in run_local
self._estimator.train(
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 349, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1175, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1201, in _train_model_default
self._get_features_and_labels_from_input_fn(input_fn, ModeKeys.TRAIN))
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1037, in _get_features_and_labels_from_input_fn
self._call_input_fn(input_fn, mode))
File "c:\programdata\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1130, in _call_input_fn
return input_fn(**kwargs)
File "c:\programdata\anaconda3\lib\site-packages\spleeter\dataset.py", line 85, in get_training_dataset
return builder.build(
File "c:\programdata\anaconda3\lib\site-packages\spleeter\dataset.py", line 550, in build
dataset = self.compute_segments(dataset, n_chunks_per_song)
File "c:\programdata\anaconda3\lib\site-packages\spleeter\dataset.py", line 453, in compute_segments
dataset.map(
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1695, in map
return MapDataset(self, map_func, preserve_cardinality=True)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 4041, in init__
self._map_func = StructuredFunctionWrapper(
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 3371, in init
self._function = wrapper_fn.get_concrete_function()
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\eager\function.py", line 2938, in get_concrete_function
graph_function = self._get_concrete_function_garbage_collected(
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\eager\function.py", line 2906, in _get_concrete_function_garbage_collected
graph_function, args, kwargs = self._maybe_define_function(args, kwargs)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\eager\function.py", line 3213, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\eager\function.py", line 3065, in _create_graph_function
func_graph_module.func_graph_from_py_func(
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\framework\func_graph.py", line 986, in func_graph_from_py_func
func_outputs = python_func(*func_args, *func_kwargs)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 3364, in wrapper_fn
ret = _wrapper_helper(args)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 3299, in _wrapper_helper
ret = autograph.tf_convert(func, ag_ctx)(*nested_args)
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\autograph\impl\api.py", line 258, in wrapper
raise e.ag_error_metadata.to_exception(e)
TypeError: in user code:
Environment
OS = Windows Installation type Conda / pip RAM available 32GB
Hardware spec Nvidia GPU