Open riyad583h opened 1 year ago
Hi, they code doesn't support windows yet. I recomned using the colab notebook. For the error above, I think it's because in windows doesn't support fork, you can probably go around it by changing the number of workers to 0: in :
File "C:\Users----\cpjku_dcase20\datasets.py", line 511, in cal_mean
for i, (x, _, _) in enumerate(torch.utils.data.DataLoader(trainset, batch_size=1, shuffle=False, num_workers=8)):
set num_workers=0
do i need to run it on ubuntu or wsl2
The code was developed on ubuntu
is the architecture in dcase2020 code same as the code in dcase 2019, if yes why the accuracy not same as dcase2019 which is about 83.7 in development set?
yes, https://github.com/kkoutini/cpjku_dcase20/blob/master/models/cp_resnet.py is the same. In DCASE 19, the audio is stereo from a single device see here In DCASE 2020, the dataset is different, there are two tasks one with 3 classes (easier) see here and one with 10 classes and different reccording devices see here
attempting to load x from cache at datasets/cached_datasets/d19t1\tr_mean_452f8f_f1_apd18_stereo_obj.pt... Invalid cache datasets/cached_datasets/d19t1\tr_mean_452f8f_f1_apd18_stereo_obj.pt , recomputing cal_mean Traceback (most recent call last): File "C:\Users------\cpjku_dcase20\datasets.py", line 450, in init self.obj = torch.load(xpath) File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\serialization.py", line 771, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\serialization.py", line 270, in _open_file_like return _open_file(name_or_buffer, mode) File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\serialization.py", line 251, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: 'datasets/cached_datasets/d19t1\tr_mean_452f8f_f1_apd18_stereo_obj.pt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users-------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "C:\Users-------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users-------\miniconda3\envs\cpjku_dcase20\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users------\miniconda3\envs\cpjku_dcase20\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users------\cpjku_dcase20\exp_cp_resnet.py", line 170, in
trainer = Trainer(default_conf, mixed_precision_training=args.mixed_precision_training)
File "C:\Users----\cpjku_dcase20\trainer.py", line 191, in init
self.init_loaders()
File "C:\Users-----\cpjku_dcase20\trainer.py", line 211, in init_loaders
ds = self.dataset_manager.get_dataset(dataset_config)
File "C:\Users-----\cpjku_dcase20\datasets.py", line 69, in get_dataset
return getattr(self, config.dataset.split(".")[1])()
File "C:\Users-----\cpjku_dcase20\datasets.py", line 176, in get_test_set
fill_norms(name, fold, train_files_csv, audio_processor, self.df_get_train_set())
File "C:\Users-----\cpjku_dcase20\datasets.py", line 680, in fill_norms
"trmean{}_f{}_ap{}".format(h6(train_files_csv), fold, audio_processor)).get()
File "C:\Users------\cpjku_dcase20\datasets.py", line 460, in init__
self.obj = get_obj_func()
File "C:\Users----\cpjku_dcase20\datasets.py", line 511, in calmean
for i, (x, , _) in enumerate(torch.utils.data.DataLoader(trainset, batch_size=1, shuffle=False, num_workers=8)):
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\utils\data\dataloader.py", line 435, in iter__
return self._get_iterator()
File "C:\Users------\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\utils\data\dataloader.py", line 381, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\site-packages\torch\utils\data\dataloader.py", line 1034, in init
w.start()
File "C:\Users----\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "C:\Users-----\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users--------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\popen_spawn_win32.py", line 46, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users-------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users------\miniconda3\envs\cpjku_dcase20\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.