Coder Social home page Coder Social logo

wave-u-net-pytorch's People

Contributors

ericguizzo avatar f90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wave-u-net-pytorch's Issues

Hello! I wanted to use my own data set, but this type error occurred during training

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

Cannot train a model with the same accuracy as the paper's

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?

Depth other than 1 does not work

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

[ConvLayer(n_outputs, n_outputs, kernel_size, 1, conv_type) for _ in range(depth - 1)])

and
combined = conv(torch.cat([combined, centre_crop(upsampled, combined)], dim=1))

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.

Weights Issue

I have download the weights^ but it is not .zip of 7z file, so how can I extract the pre-trained model weights?

Cannot be used out of the box without GPU

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.

OSError: sndfile library not found,How to solve this problem?

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

Maybe I missed sth.

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

Support for Apple Metal (MPS) backend

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)

train problems

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.