Comments (7)
有成功复现吗
from cmgan.
我卡在配环境了,你们nccl报错了吗
from cmgan.
I met similar question, I resample VCTK-DEMAND/test (48000hz) to 16000hz, and the result is
pesq: 1.2306799195634508 csig: 1.6080942775665945 cbak: 2.1193723316105366 covl: 1.4202725754636616 ssnr: 0.6998261689532145 stoi: 0.6101097034995405
and I use the default loss weight
parser.add_argument("--loss_weights", type=list, default=[0.1, 0.9, 0.2, 0.05],
I use the .ckpt
CMGAN_epoch_50_0.092
from cmgan.
[0.3, 0.7, 0.2, 0.05]
I want to ask in the terminal,
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.3,0.7,0.2,0.05
,and the bug is
Traceback (most recent call last):
File "/home//CMGAN-main/src/train.py", line 355, in
main(args)
File "/home/CMGAN-main/src/train.py", line 342, in main
trainer.train()
File "/home/CMGAN-main/src/train.py", line 294, in train
loss, disc_loss = self.train_step(batch)
File "/home/CMGAN-main/src/train.py", line 224, in train_step
loss = self.calculate_generator_loss(generator_outputs)
File "/home/CMGAN-main/src/train.py", line 178, in calculate_generator_loss
args.loss_weights[0] * loss_ri
TypeError: only integer tensors of a single element can be converted to an index,
I try to change the loss weight into
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.1,0.9,0.2,0.05
according to
parser.add_argument("--loss_weights", type=list, default=[0.1, 0.9, 0.2, 0.05],
help="weights of RI components, magnitude, time loss, and Metric Disc")
but the bug is still.
I don't understand, why?
And if I remove the loss weight , the training is OK,like:
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight
This means I can't specify the loss weight,right?
May I know your way to input "--loss weight" ? Thanks.
from cmgan.
[0.3, 0.7, 0.2, 0.05]
I want to ask in the terminal,
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.3,0.7,0.2,0.05
,and the bug is
Traceback (most recent call last):
File "/home//CMGAN-main/src/train.py", line 355, in
main(args)
File "/home/CMGAN-main/src/train.py", line 342, in main
trainer.train()
File "/home/CMGAN-main/src/train.py", line 294, in train
loss, disc_loss = self.train_step(batch)
File "/home/CMGAN-main/src/train.py", line 224, in train_step
loss = self.calculate_generator_loss(generator_outputs)
File "/home/CMGAN-main/src/train.py", line 178, in calculate_generator_loss
args.loss_weights[0] * loss_ri
TypeError: only integer tensors of a single element can be converted to an index,I try to change the loss weight into
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.1,0.9,0.2,0.05
according to
parser.add_argument("--loss_weights", type=list, default=[0.1, 0.9, 0.2, 0.05],
help="weights of RI components, magnitude, time loss, and Metric Disc")but the bug is still. I don't understand, why?
And if I remove the loss weight , the training is OK,like:python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight
This means I can't specify the loss weight,right? May I know your way to input "--loss weight" ? Thanks.
Change it within the script. Passing lists as arguments through the command line using argparse isn't recommended.
thanks. And it's ok.
from cmgan.
Maybe you know how the author resample the wav into 16000hz. The .wav in the VCTK-DEMAND/test is 48000hz. I try to resample and use evaluation.py, and the result is very bad. I can't make out. The quality of generated .wav is too bad. And I use the .ckpt in the original project and the original dataset in the paper. So I think my way to resample is wrong.
evaluation.py
def evaluation(model_path, noisy_dir, clean_dir, save_tracks, saved_dir):
clean_audio, sr = sf.read(clean_path)
print("clean_audio",clean_audio) #是一个一维的 NumPy 数组
print("sr",sr) # sr 48000
clean_audio = librosa.resample(clean_audio, sr, 16000)
from cmgan.
[0.3, 0.7, 0.2, 0.05]
I want to ask in the terminal,
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.3,0.7,0.2,0.05
,and the bug is
Traceback (most recent call last):
File "/home//CMGAN-main/src/train.py", line 355, in
main(args)
File "/home/CMGAN-main/src/train.py", line 342, in main
trainer.train()
File "/home/CMGAN-main/src/train.py", line 294, in train
loss, disc_loss = self.train_step(batch)
File "/home/CMGAN-main/src/train.py", line 224, in train_step
loss = self.calculate_generator_loss(generator_outputs)
File "/home/CMGAN-main/src/train.py", line 178, in calculate_generator_loss
args.loss_weights[0] * loss_ri
TypeError: only integer tensors of a single element can be converted to an index,I try to change the loss weight into
python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight --loss_weights 0.1,0.9,0.2,0.05
according to
parser.add_argument("--loss_weights", type=list, default=[0.1, 0.9, 0.2, 0.05],
help="weights of RI components, magnitude, time loss, and Metric Disc")but the bug is still. I don't understand, why?
And if I remove the loss weight , the training is OK,like:python3 train.py --data_dir /home/CMGAN-main/VCTK-DEMAND --save_model_dir ./saved_model_0.3_0.7_0.2_0.05loss_weight
This means I can't specify the loss weight,right? May I know your way to input "--loss weight" ? Thanks.
Change it within the script. Passing lists as arguments through the command line using argparse isn't recommended.
Maybe you know how the author resample the wav into 16000hz. The .wav in the VCTK-DEMAND/test is 48000hz. I try to resample and use evaluation.py, and the result is very bad. I can't make out. The quality of generated .wav is too bad. And I use the .ckpt in the original project and the original dataset in the paper. So I think my way to resample is wrong.
evaluation.py
def evaluation(model_path, noisy_dir, clean_dir, save_tracks, saved_dir):
clean_audio, sr = sf.read(clean_path)
print("clean_audio",clean_audio) #是一个一维的 NumPy 数组
print("sr",sr) # sr 48000
clean_audio = librosa.resample(clean_audio, sr, 16000)
from cmgan.
Related Issues (20)
- RuntimeError HOT 3
- the change of gen_loss during training HOT 1
- RuntimeError
- RuntimeError HOT 2
- About the decreasing of loss HOT 1
- Can not reproduce the results HOT 12
- Training can get stuck HOT 6
- RuntimeeError HOT 1
- Can not reproduce the results HOT 3
- Training GPU requirements HOT 1
- File "pesq/cypesq.pyx", line 1, in init cypesq ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it)
- File "/anaconda3/envs/cmg/lib/python3.9/site-packages/torch/nn/parallel/distributed.py", line 578, in __init__ dist._verify_model_across_ranks(self.process_group, parameters) RuntimeError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:957, invalid usage, NCCL version 21.0.3 ncclInvalidUsage: This usually reflects invalid usage of NCCL library (such as too many async ops, too many collectives at once, mixing streams in a group, etc). HOT 2
- How do you resample to 16000? HOT 2
- 时域Loss计算疑惑
- the training speed confusion
- My server has a 3090, but reports that I don't have a gpu HOT 1
- Test set requirements when training
- epochs HOT 1
- 模型训练的采样率以及显卡训练配置咨询 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmgan.