Description
环境
1.系统环境:ubuntu1804
2.MegEngine版本:1.4.0
3.python版本:3.6.8
复现步骤
- git clone https://github.com/MegEngine/Models.git
- python3 train.py -a resnet18 -d /path/to/imagenet --mode normal 出现此问题
请提供关键的代码片段便于追查问题
1、train.py 和 finetune.py 同样出现此问题
请提供完整的日志及报错信息
Traceback (most recent call last):
File "finetune.py", line 315, in
main()
File "finetune.py", line 69, in main
train_proc(world_size, args)
File "finetune.py", line 159, in worker
data.RandomSampler(train_dataset, batch_size=cfg.BATCH_SIZE, drop_last=True)
File "/usr/local/python/lib/python3.6/site-packages/megengine/data/sampler.py", line 322, in init
self.sampler_iter = iter(self.sampler)
File "/usr/local/python/lib/python3.6/site-packages/megengine/data/sampler.py", line 100, in iter
return self.batch()
File "/usr/local/python/lib/python3.6/site-packages/megengine/data/sampler.py", line 146, in batch
if self.drop_last and len(batch_index[-1]) < self.batch_size:
IndexError: list index out of range