kaituoxu / tasnet Goto Github PK
View Code? Open in Web Editor NEWA PyTorch implementation of Time-domain Audio Separation Network (TasNet) with Permutation Invariant Training (PIT) for speech separation.
A PyTorch implementation of Time-domain Audio Separation Network (TasNet) with Permutation Invariant Training (PIT) for speech separation.
TypeError: lstm() received an invalid combination of arguments:
https://blog.csdn.net/yhoon0101/article/details/131649166
修改代码为:(line 37 in train.py)
parser.add_argument('--bidirectional', default=True, type=bool, help='Whether use bidirectional LSTM')
RuntimeError: ‘lengths‘ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor:
https://blog.csdn.net/weixin_45084253/article/details/122269699
修改代码为:(line 179 in solver.py)
estimate_source = self.model(padded_mixture, mixture_lengths.to("cpu"))
我升级为高版本torch是因为遇到runtimeerror: cudnn error: cudnn_status_mapping_error错误,我的原因是因为torch版本和cuda版本不太兼容
Traceback (most recent call last):
File "G:/speech_code/TasNet/src/train.py", line 56, in
main(ts)
File "G:/speech_code/TasNet/src/train.py", line 52, in main
solver.train()
File "G:\speech_code\TasNet\src\solver.py", line 75, in train
tr_avg_loss = self._run_one_epoch(epoch)
File "G:\speech_code\TasNet\src\solver.py", line 176, in _run_one_epoch
estimate_source = self.model(padded_mixture, mixture_lengths)
File "D:\Users\15229\anaconda3\envs\speech\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "G:\speech_code\TasNet\src\tasnet.py", line 37, in forward
est_mask = self.separator(mixture_w, mixture_lengths)
File "D:\Users\15229\anaconda3\envs\speech\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "G:\speech_code\TasNet\src\tasnet.py", line 162, in forward
packed_output, hidden = self.rnn(packed_input)
File "D:\Users\15229\anaconda3\envs\speech\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Users\15229\anaconda3\envs\speech\lib\site-packages\torch\nn\modules\rnn.py", line 664, in forward
result = _VF.lstm(input, batch_sizes, hx, self._flat_weights, self.bias,
TypeError: lstm() received an invalid combination of arguments - got (Tensor, Tensor, tuple, list, bool, int, float, bool, int), but expected one of:
What loss function is used and why the loss becomes negative?
Thanks for your nice code.
Hello, thanks for sharing your code. I'm very interested in the project. But while running the project, I encountered a problem:
Training...
Traceback (most recent call last):
File "~/TasNet/egs/wsj0/../../src/train.py", line 125, in <module>
main(args)
File "~/TasNet/egs/wsj0/../../src/train.py", line 119, in main
solver.train()
File "~/TasNet/src/solver.py", line 75, in train
tr_avg_loss = self._run_one_epoch(epoch)
File "~/TasNet/src/solver.py", line 174, in _run_one_epoch
estimate_source = self.model(padded_mixture, mixture_lengths)
File "~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "~/TasNetsrc/tasnet.py", line 36, in forward
est_mask = self.separator(mixture_w, mixture_lengths)
File "~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "~/TasNet/src/tasnet.py", line 155, in forward
packed_output, hidden = self.rnn(packed_input)
File "~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 182, in forward
self.num_layers, self.dropout, self.training, self.bidirectional)
TypeError: lstm() received an invalid combination of arguments - got (Tensor, Tensor, tuple, list, bool, int, int, bool, int), but expected one of:
* (Tensor data, Tensor batch_sizes, tuple of Tensors hx, tuple of Tensors params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional)
didn't match because some of the arguments have invalid types: (Tensor, Tensor, !tuple!, !list!, bool, int, int, bool, !int!)
* (Tensor input, tuple of Tensors hx, tuple of Tensors params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first)
didn't match because some of the arguments have invalid types: (Tensor, !Tensor!, !tuple!, !list!, !bool!, int, !int!, bool, !int!)
请问您有遇到过这个问题吗?谢谢
I found the label is [spk1,spk2],but output is [spk2,spk1].
can you help me to understand this question?
mixture_w, norm_coef = encoder(mixture)这条语句报错了,encoder没啥用吧
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.