Skip to content

量化模型的时候出现不预期的问题 #103

@ThreeLord

Description

@ThreeLord

环境

1.系统环境:ubuntu1804
2.MegEngine版本:1.4.0
3.python版本:3.6.8

复现步骤

  1. git clone https://github.com/MegEngine/Models.git
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions