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.

num_samples should be a positive integer value, but got num_samples=0

See original GitHub issue

I’m trying to use my own data for training with the FixedSourcesTrackFolderDataset. Unfortunatly, the data doesn’t seem to be recognized or found by the dataloader. I am using normal wav files (not stems), organized in the following folder structure:

   dataset
         valid
              0
                guitar.wav
                piano.wav
                ...
              1
              2
              ...
         train
              3
                guitar.wav
                piano.wav
                ...
              4
              5
              ...

Next, I issue: python train.py --root /path/to/dataset --dataset trackfolder_fix --target-file piano.wav --interferer-files cello.wav guitar.wav hi-hat.wav

The following error is thrown: ValueError: num_samples should be a positive integer value, but got num_samples=0

Is this a problem with the format (folder structure) in which the data is provided? From reading the documentation I can’t figure out if a Pytorch dataclass has to be created beforehand or not. If so, how does that fit into the folder structure?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
faroitcommented, Jan 27, 2020

@loxosceles sorry for the long delay, I will look into it this week

0reactions
eranmenachemcommented, Mar 10, 2020

yes, thank you!

On Tue, Mar 10, 2020 at 12:51 PM Fabian-Robert Stöter < notifications@github.com> wrote:

@eranmenachem https://github.com/eranmenachem can this be closed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sigsep/open-unmix-pytorch/issues/29?email_source=notifications&email_token=AK5STHLANBHYG4VEKIJLIULRGYLR5A5CNFSM4KHWYXE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOK5RDY#issuecomment-597022863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5STHOGZCR5VOIJLDEOZNDRGYLR5ANCNFSM4KHWYXEQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

num_samples should be a positive integer value, but got ...
Hi, I checked the input data path and it was correct. But still i'm getting "ValueError: num_samples should be a positive integer value,...
Read more >
Num_samples should be a positive integer ... - PyTorch Forums
Hello everybody, I am new to PyTorch. I have a problem when I tried to train my data. When I run my program...
Read more >
ValueError: num_samples should be a positive integer value ...
I have the error of the title ValueError: num_samples should be a positive integer value, but got num_samples=0 because basically I am ...
Read more >
num_samples should be a positive integeral value, but got ...
Has anyone encountered and solved the below error: Error: ValueError: num_samples should be a positive integeral value, but got num_samples= ...
Read more >
num_samples should be a positive integer value ... - Medium
iam getting this error while executing this code. “num_samples should be a positive integer value, but got num_samples=0” is published by ...
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