Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练出错 #16

Closed
wwwjs opened this issue Oct 19, 2019 · 7 comments
Closed

训练出错 #16

wwwjs opened this issue Oct 19, 2019 · 7 comments

Comments

@wwwjs
Copy link

wwwjs commented Oct 19, 2019

您好, 我用python3 train.py -n full -g 0来训练的时候,出现了下面的错误:
Traceback (most recent call last):
File "train.py", line 101, in
main()
File "train.py", line 39, in main
train_loader = get_dataloader('train', config, config.batch_size, config.num_workers)
File "/home/sjwang/python_project/2D-Motion-Retargeting-master/dataset/init.py", line 17, in get_dataloader
num_workers=num_workers, worker_init_fn=lambda _: np.random.seed())
File "/home/sjwang/py/python3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 802, in init
sampler = RandomSampler(dataset)
File "/home/sjwang/py/python3/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 64, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0

应该怎么解决呢?

@ChrisWu1997
Copy link
Owner

请问有下载好数据并放在正确的目录下吗?

@wwwjs
Copy link
Author

wwwjs commented Oct 19, 2019 via email

@wwwjs
Copy link
Author

wwwjs commented Oct 19, 2019 via email

@ChrisWu1997
Copy link
Owner

不客气

@ClaudiaShu
Copy link

你好!请问是怎么解决的呢?我是在Colab里面运行的代码,现在的文件结构是下面这样子的:

/mixamo_data
——/train
——/test

我同样尝试了直接在原文件下进行解压

/mixamo_data
——/mixamo_release
————/train
————/test

但同样找不到数据文件
期待您的回复

@ChrisWu1997
Copy link
Owner

您好,请问是跑./dataset/preprocess.py的时候出问题,还是跑train.py的时候出问题?上面一种文件组织应该是对的。

@ClaudiaShu
Copy link

您好,请问是跑./dataset/preprocess.py的时候出问题,还是跑train.py的时候出问题?上面一种文件组织应该是对的。

您好!实在不好意思,是我的理解出现了偏差,误以为您Google drive中的数据集是已经预处理好的数据集,preprocess和train都没有问题,十分感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants