20200621--learning-to-fool-the-speaker-recognition-master 实验记录

learning-to-fool-the-speaker-recognition-master 实验记录
timit数据集是之前就prepare好的

出错1:
RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=10.2 and torchvision has CUDA Version=10.1. Please reinstall the torchvision that matches your PyTorch install.
解决办法:pip install torchvision0.6.1
原因:PyTorch和torchvision依赖的是不同版本的cuda,不用动cuda。之前的torchvision版本是0.6.0.dev20200319,torch版本是1.5.0,现在安装torchvision
0.6.1就好了
一开始写的命令是:pip install torchvision10.13
但是有提示,这个提示告诉了你最新版本的torchvision是0.6.1
ERROR: Could not find a version that satisfies the requirement torchvision
10.13 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.6.0, 0.6.1)
ERROR: No matching distribution found for torchvision==10.13

出错2:
ModuleNotFoundError: No module named ‘numba.decorators’
解决办法:https://blog.csdn.net/July_Wander/article/details/106857289
卸载掉numba先,然后安装 numba-0.48.0即可
pip uninstall numba
pip install numba==0.48.0

出错3:
AssertionError:
The NVIDIA driver on your system is too old (found version 10010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
解决办法:降级torch,
pip install torch1.4.0
原来是1.5.0
这个问题是没有了,但又出现了新问题
RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op. The symbolic name must match the format Domain::Name, and sould start with a letter and contain only alphanumerical characters
网上说这个问题的解决办法是:更新torch到最新版即可
晕,还是不要动NVIDIA driver吧
还是应该降pytorch的版本
经过一番折腾之后,把下面4个都降级,就可以了
torch
1.2
torchvision0.4
torchaudio
0.3
pip3 install ‘pillow<7.0.0’

出错4:
FileNotFoundError: [Errno 2] No such file or directory: ‘/workspace/TIMIT/processed/TIMIT_labels.npy’
这是少了一个文件,在github上找到了这个文件,解决

出错5:
Traceback (most recent call last):
File “train_transformer.py”, line 669, in
main(args)
File “train_transformer.py”, line 593, in main
train_dataset = TIMIT_speaker(args.data_root, train=True, phoneme=True, norm_factor=True)
File “/workspace/learning-to-fool-the-speaker-recognition-master/dataset.py”, line 66, in init
self.timit_labels = np.load(os.path.join(data_root_processed, “TIMIT_labels.npy”)).item()
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py”, line 453, in load
pickle_kwargs=pickle_kwargs)
File “/usr/local/lib/python3.6/dist-packages/numpy/lib/format.py”, line 739, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
解决办法:
在dataset.py中修改了一句话,加上allow_pickle=True,变成下面这样,就可以了
self.timit_labels = np.load(os.path.join(data_root_processed, “TIMIT_labels.npy”),allow_pickle=True).item()

至此,下面命令终于可以跑起来了

python train_transformer.py --output_dir /workspace/learning-to-fool-the-speaker-recognition-master/output --speaker_factor 1 --speech_factor 5 --norm_factor 1000 --speech_kld_factor 1 --data_root /workspace/TIMIT --no_dist --speaker_model /workspace/learning-to-fool-the-speaker-recognition-master/pretrained-speaker-recognition-model/model_raw.pkl --speech_model /workspace/learning-to-fool-the-speaker-recognition-master/pretrained-phoneme-recognition-model/epoch_23.pth --speaker_cfg /workspace/learning-to-fool-the-speaker-recognition-master/config/timit_speaker_transformer.cfg --speech_cfg /workspace/learning-to-fool-the-speaker-recognition-master/config/timit_speech.cfg --norm_clip 0.01 --no_dist

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值