question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in Training ConvTasNet on LibriMix

See original GitHub issue

🐛 Bug

To Reproduce

After having created all mixtures and moving onto stage 1 of run.sh, the following errors show up -

Stage 1: Training
Traceback (most recent call last):
  File "train.py", line 127, in <module>
{'data': {'n_src': 3,
          'sample_rate': 16000,
          'segment': 3,
          'task': 'sep_noisy',
          'train_dir': 'data/wav8k/min/train-360',
          'valid_dir': 'data/wav8k/min/dev'},
 'filterbank': {'kernel_size': 16, 'n_filters': 512, 'stride': 8},
 'main_args': {'exp_dir': 'exp/train_convtasnet_84932317', 'help': None},
 'masknet': {'bn_chan': 128,
             'hid_chan': 512,
             'mask_act': 'relu',
             'n_blocks': 8,
             'n_repeats': 3,
             'skip_chan': 128},
 'optim': {'lr': 0.001, 'optimizer': 'adam', 'weight_decay': 0.0},
 'positional arguments': {},
 'training': {'batch_size': 24,
              'early_stop': True,
              'epochs': 200,
              'half_lr': True,
              'num_workers': 4}}
    main(arg_dic)
  File "train.py", line 33, in main
    segment=conf['data']['segment'])
  File "/home/subhanjan/asteroid/asteroid/data/librimix_dataset.py", line 52, in __init__
    md_file = [f for f in os.listdir(csv_dir) if 'both' in f][0]
FileNotFoundError: [Errno 2] No such file or directory: 'data/wav8k/min/train-360'

Expected behavior

I have been trying to train ConvTasNet on n_src=3 for a while now and since LibriMix has this feature conveniently built in, I have been trying to use that, but I have been running into errors with the train_dir, test_dir variables in run.sh. Do they need to be changed? They’re being parsed as .csv files so what should these paths be changed to.

Environment

This is what my run.sh looks like

storage_dir=../LibriMix3spk

# After running the recipe a first time, you can run it from stage 3 directly to train new models.

# Path to the python you'll use for the experiment. Defaults to the current python
# You can run ./utils/prepare_python_env.sh to create a suitable python environment, paste the output here.
python_path=python

# Example usage
# ./run.sh --stage 3 --tag my_tag --task sep_noisy --id 0,1

# General
stage=0  # Controls from which stage to start
tag=""  # Controls the directory name associated to the experiment
# You can ask for several GPUs using id (passed to CUDA_VISIBLE_DEVICES)
id=0
out_dir=librimix # Controls the directory name associated to the evaluation results inside the experiment directory

# Network config
n_blocks=8
n_repeats=3
mask_act=relu
# Training config
epochs=200
batch_size=24
num_workers=4
half_lr=yes
early_stop=yes
# Optim config
optimizer=adam
lr=0.001
weight_decay=0.
# Data config
train_dir=data/wav8k/min/train-360
valid_dir=data/wav8k/min/dev
test_dir=data/wav8k/min/test
sample_rate=16000
n_src=3
segment=3
task=sep_noisy  # one of 'enh_single', 'enh_both', 'sep_clean', 'sep_noisy'

Kindly consider making run.sh more user-friendly and modular, since it’s the user’s only way of interacting with the program.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mparientecommented, Jul 22, 2020

@JorisCos could you look into that please?

0reactions
mancomaocommented, Aug 30, 2021

@mpariente @subhanjansaha @JorisCos

Hi guys, I encountered the same issue, and it’s a bug in this place: https://github.com/asteroid-team/asteroid/blob/master/egs/librimix/ConvTasNet/local/prepare_data.sh#L13

change this line to changed_n_src=$n_src, or local/create_local_metadata.py can’t find the right root libri directory.

thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Open-Source Dataset for Generalizable Speech Separation
Our experiments show that the generalization error is smaller for models trained with LibriMix than with WHAM!, in both clean and noisy ...
Read more >
LibriMix: An Open-Source Dataset for Generalizable Speech ...
Our experiments show that the generalization error is smaller for models trained with LibriMix than with WHAM!, in both clean and noisy ...
Read more >
An Open-Source Dataset for Generalizable Speech Separation
Using Conv-TasNet, we achieve competitive performance on all LibriMix versions ... that the generalization error is smaller for models trained with LibriMix ...
Read more >
Speech Separation Using an Asynchronous ... - OpenReview
We have stated in the paper that Conv-TasNet got 14.7 on LibriMix because it was trained on a larger dataset {train-360}, while all...
Read more >
[PDF] An Empirical Study of Conv-Tasnet - Semantic Scholar
Conv-TasNet is a recently proposed waveform-based deep neural ... generalization error is smaller for models trained with LibriMix than with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found