Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现了个BUG,路径方面的/Found a bug, path-wise. #33

Open
rainbowjack opened this issue Dec 28, 2023 · 0 comments
Open

发现了个BUG,路径方面的/Found a bug, path-wise. #33

rainbowjack opened this issue Dec 28, 2023 · 0 comments

Comments

@rainbowjack
Copy link

data_generator里面74行,hdf5_path = os.path.join(self.hdf5s_dir, year, hdf5_name),就这么训会导致报错:

Traceback (most recent call last):
File "pytorch/main.py", line 297, in
train(args)
File "pytorch/main.py", line 201, in train
for batch_data_dict in train_loader:
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data\dataloader.py", line 345, in next
data = self._next_data()
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data
return self._process_data(data)
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data
data.reraise()
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch_utils.py", line 394, in reraise
raise self.exc_type(msg)
OSError: Caught OSError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "F:\pythonProject2\piano_transcription\pytorch../utils\data_generator.py", line 82, in getitem
with h5py.File(hdf5_path, 'r') as hf:
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\h5py_hl\files.py", line 408, in init
swmr=swmr)
File "C:\Users\ASUS\anaconda3\envs\byte\lib\site-packages\h5py_hl\files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'WORKSPACE\hdf5s\maestro\2015\WORKSPACE\hdf5s\maestro\2015\MIDI-Unprocessed_R1_D1-1-8_mid--AUDIO-from_mp3_06_R1_2015_wav--1.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

改成 hdf5_path = os.path.join(hdf5_name)就不报错了
BUG原因不知道,希望谁能给看一下,不知道是不是库版本问题或者啥之间的匹配问题或者我操作有问题亦有可能是windows独有BUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant