JusperLee / Dual-Path-RNN-Pytorch

Dual-path RNN: efficient long sequence modeling for time-domain single-channel speech separation implemented by Pytorch
Apache License 2.0
417 stars 65 forks source link

CUDA相关问题 #59

Open Johnsonabuse opened 6 months ago

Johnsonabuse commented 6 months ago

您好 想问您两个个有关代码相关的问题 将您的代码放在windows本地运行并把路径设置好后 出现了如下问题: 1:Traceback (most recent call last): File "train_rnn.py", line 91, in train() File "train_rnn.py", line 86, in train trainer = trainer_Dual_RNN.Trainer(train_dataloader, val_dataloader, Dual_Path_RNN, optimizer, scheduler, opt) File "D:\Dual-Path-RNN-Pytorch-master\Dual-Path-RNN-Pytorch-master\trainer\trainer_Dual_RNN.py", line 39, in init self.dualrnn = Dual_RNN.to(self.device) File "E:\anaconda\envs\torch_gpu\lib\site-packages\torch\nn\modules\module.py", line 1152, in to return self._apply(convert) File "E:\anaconda\envs\torch_gpu\lib\site-packages\torch\nn\modules\module.py", line 802, in _apply module._apply(fn) File "E:\anaconda\envs\torch_gpu\lib\site-packages\torch\nn\modules\module.py", line 802, in _apply module._apply(fn) File "E:\anaconda\envs\torch_gpu\lib\site-packages\torch\nn\modules\module.py", line 825, in _apply param_applied = fn(param) File "E:\anaconda\envs\torch_gpu\lib\site-packages\torch\nn\modules\module.py", line 1150, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.请问是yaml文件中cuda序号配置的问题吗?我的电脑只有一块NVIDIA 2070系列的显卡 2:在test.yaml文件中datasets设置中 cmvn_file: /home/likai/data1/DPCL/cmvn.ark这个文件在您的项目中没有找到 请问这个文件是需要我自己创建还是直接运行程序它自动生成呢? 期望能得到您的回复!

JusperLee commented 6 months ago
  1. 这个是因为你的cuda序号问题,请你按照你的显卡序号进行设置。
  2. 你自己计算一下就行了,就是所有音频的mean和var。