stylegan-v icon indicating copy to clipboard operation
stylegan-v copied to clipboard

Error: batch_size should be a positive integer value, but got batch_size=0

Open lweingart opened this issue 7 months ago • 1 comments

Hello guys,

Thank you very much for your work. I'm trying to train my model based on my own dataset, but when running the training command it always fails with the following error:

File "/home/ubuntu/git/stylegan-v/env-ampere/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 215, in __init__
    raise ValueError("batch_size should be a positive integer value, "
ValueError: batch_size should be a positive integer value, but got batch_size=0

Even if I try to specify the batch size in the command by adding training.batch_size=8 for instance, it keeps failing with the same error message.

The command I use is:

python src/infra/launch.py hydra.run.dir=test_rundir exp_suffix=test_exp env=raven-local dataset=ffs dataset.resolution=512 num_gpus=2 training.batch_size=8

Would someone have any idea what I should do to get around this please? Thank you very much for your help in advance.

Cheers

lweingart avatar Jan 06 '24 19:01 lweingart