This code aims at weakly-labeled semi-supervised sound event detection. The code embraces two methods we proposed to solve this task: specialized decision surface (SDS) and disentangled feature (DF) for weakly-supervised learning and guided learning (GL) for semi-supervised learning. We're so glad if you're interested in using it for research purpose or DCASE participation.
MIT License
125
stars
28
forks
source link
Unable to Reproduce DCASE2019 Task4 challenge results #4
Traceback (most recent call last):
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 326, in
test_models(task_name, sed_model_name, model_weights_list)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 203, in test_models
test(task_name, sed_model_name, model_list[0])
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 150, in test
at_preds_out = train.save_at_result(at_preds) #audio tagging result
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 369, in save_at_result
preds_out['vali'] = self.save_at('vali', at_preds, is_add = False)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 409, in save_at
preds, labels = self.test(mode, 'at', at_preds)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 335, in test
preds = model.predict(data[0], batch_size = data_loader.batch_size)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 88, in _method_wrapper
return method(self, *args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1268, in predict
tmp_batch_outputs = predict_function(iterator)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 580, in call
result = self._call(*args, *kwds)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 627, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 506, in _initialize
args, kwds))
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2446, in _get_concrete_function_internal_garbage_collected
graphfunction, , _ = self._maybe_define_function(args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2777, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2667, in _create_graph_function
capture_by_value=self._capture_by_value),
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 981, in func_graph_from_py_func
func_outputs = python_func(*func_args, *func_kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 441, in wrapped_fn
return weak_wrapped_fn().wrapped(args, **kwds)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 968, in wrapper
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py:1147 predict_function *
outputs = self.distribute_strategy.run(
/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/model.py:50 call *
weights = K.sum(inputs * self.kernel, axis = -1) + self.bias
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:997 binary_op_wrapper
return func(x, y, name=name)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:1283 _mul_dispatch
return gen_math_ops.mul(x, y, name=name)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py:6092 mul
"Mul", x=x, y=y, name=name)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:744 _apply_op_helper
attrs=attr_protos, op_def=op_def)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py:595 _create_op_internal
compute_device)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/ops.py:3327 _create_op_internal
op_def=op_def)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/ops.py:1817 __init__
control_input_ops, op_def)
/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/ops.py:1657 _create_c_op
raise ValueError(str(e))
ValueError: Dimensions must be equal, but are 113 and 30 for '{{node model/sed_with_cATP-DF_atten_8/mul}} = Mul[T=DT_FLOAT](model/lambda_16/strided_slice, model/sed_with_cATP-DF_atten_8/mul/ReadVariableOp)' with input shapes: [64,500,113], [1,1,30].
Hi Lin. Here's the error log -
Traceback (most recent call last): File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 326, in
test_models(task_name, sed_model_name, model_weights_list)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 203, in test_models
test(task_name, sed_model_name, model_list[0])
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/main.py", line 150, in test
at_preds_out = train.save_at_result(at_preds) #audio tagging result
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 369, in save_at_result
preds_out['vali'] = self.save_at('vali', at_preds, is_add = False)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 409, in save_at
preds, labels = self.test(mode, 'at', at_preds)
File "/home/chenyuanjian/SoundEventDetection/GuidedLearning/src/trainer.py", line 335, in test
preds = model.predict(data[0], batch_size = data_loader.batch_size)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 88, in _method_wrapper
return method(self, *args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1268, in predict
tmp_batch_outputs = predict_function(iterator)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 580, in call
result = self._call(*args, *kwds)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 627, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 506, in _initialize
args, kwds))
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2446, in _get_concrete_function_internal_garbage_collected
graphfunction, , _ = self._maybe_define_function(args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2777, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 2667, in _create_graph_function
capture_by_value=self._capture_by_value),
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 981, in func_graph_from_py_func
func_outputs = python_func(*func_args, *func_kwargs)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/eager/def_function.py", line 441, in wrapped_fn
return weak_wrapped_fn().wrapped(args, **kwds)
File "/home/chenyuanjian/anaconda3/envs/dcase2019keras/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 968, in wrapper
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code: