f90 / wave-u-net-pytorch Goto Github PK
View Code? Open in Web Editor NEWImproved Wave-U-Net implemented in Pytorch
License: MIT License
Improved Wave-U-Net implemented in Pytorch
License: MIT License
Traceback (most recent call last):
File "F:/1Python/1_code_xunlian_from_githubOrOther/2_wave_u_net/Wave-U-Net-Pytorch-fuben/train.py", line 243, in
main(args)
File "F:/1Python/1_code_xunlian_from_githubOrOther/2_wave_u_net/Wave-U-Net-Pytorch-fuben/train.py", line 100, in main
utils.set_cyclic_lr(optimizer, example_num, len(train_data) // args.batch_size, args.cycles, args.min_lr, args.lr)
File "F:\1Python\1_code_xunlian_from_githubOrOther\2_wave_u_net\Wave-U-Net-Pytorch-fuben\utils.py", line 16, in set_cyclic_lr
curr_cycle = min(it // cycle_length, cycles-1)
ZeroDivisionError: integer division or modulo by zero
Thanks for such excellent work! The code is great and well-organized. But I met this problem during training.
I tried evaluating the SDR for both pretrained model and the model I trained with default setting, and the best overall SDR was around 2. That was 1. away from the accuracy claimed in the paper.
Is there any important setting I miss? Should I use the original tensorflow implement code to try it again?
Changing the depth to anything other than 1 will result in this error
RuntimeError: Given groups=1, weight of size [512, 512, 5], expected input[1, 1024, 357] to have 512 channels, but got 1024 channels instead
I am pretty certain this is the cause of said error
Wave-U-Net-Pytorch/model/waveunet.py
Line 24 in 443fe30
Wave-U-Net-Pytorch/model/waveunet.py
Line 38 in 86c113d
line 24 implies that the next modules will not take the shortcut (n_outputs as opposed to n_outputs+n_shortcut)
while line 38 adds the shortcut after the first iteration.
It should be either all post shortcut convs to take the added shortcut, or the shortcut is only added once. I think the latter makes more sense, though.
I have download the weights^ but it is not .zip of 7z file, so how can I extract the pre-trained model weights?
As my device does not have an NVIDIA GPU (it is equipped with a Radeon), I had to disable CUDA. But when removing --cuda
, I get an exception:
Using valid convolutions with 97961 inputs and 88409 outputs
Loading model from checkpoint /code/checkpoints/waveunet/model
Traceback (most recent call last):
File "/code/predict.py", line 73, in <module>
main(args)
File "/code/predict.py", line 23, in main
state = utils.load_model(model, None, args.load_model)
File "/code/utils.py", line 140, in load_model
checkpoint = torch.load(path)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 702, in _legacy_load
result = unpickler.load()
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 665, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 156, in default_restore_location
result = fn(storage, location)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 132, in _cuda_deserialize
device = validate_cuda_device(location)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 116, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
To solve this, I had to change Line 140 of utils.py
from
checkpoint = torch.load(path)
to
checkpoint = torch.load(path, map_location='cpu')
This should be done automatically when removing the --cuda
flag.
Could you share a pre-trained model? I train several times and still not get a applicable model, or should I assign a random seed? Many thanks!
In this function,when the transpose is False and padding is reflect,the output_size is equal to the input_size.But in get_input_size function under the same conditions:input_size=(output_size - 1)*self.stride + 1 (stride!=1).I think the output_size should equal to the (input_size-1)/self.stride+1 in the DS block using the get_output_size function.
Traceback (most recent call last):
File "train.py", line 19, in
from data.dataset import SeparationDataset
File "/root/autodl-tmp/wave-u-net/data/dataset.py", line 9, in
from data.utils import load
File "/root/autodl-tmp/wave-u-net/data/utils.py", line 3, in
import soundfile
File "/root/miniconda3/lib/python3.8/site-packages/soundfile.py", line 142, in
raise OSError('sndfile library not found')
OSError: sndfile library not found
When I start training, I will report this error
I use IDM to download, but it keeps showing that the download task connection has timed out and I can’t download,what should I do?
Doesn't difference output layer exist in pytorch version?
In tensorflow version I could find 'output_type' parameter, but not in pytorch version.
Is there any reason for not including that layer?
FileNotFoundError: [Errno 2] No such file or directory: 'E:\xxx\Dataset\Dataset\musdb18\train\A Classic Education - NightOwl.stem.mp4\bass.wav'
How can I solve it T_T
Please add support for the MPS backend as you do for cuda:
if torch.backends.mps.is_available():
mps = torch.device("mps")
model = model_utils.DataParallel(model)
model.to(mps)
# ... and so on...
x = x.to(mps)
Here's a problem;
RuntimeError: ffmpeg or ffprobe could not be found! Please install them before using stempeg
But I have both libraries installed
could someone help me? thankyou
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.