libffcv / ffcv

FFCV: Fast Forward Computer Vision (and other ML workloads!)
https://ffcv.io
Apache License 2.0
2.87k stars 179 forks source link

drop_last = False not supported #388

Open richardrl opened 3 months ago

richardrl commented 3 months ago
  File "/data/scratch-oc40/pulkitag/rli14/micromamba/ffcv_oct40/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/data/pulkitag/models/rli14/ffcv/ffcv/loader/epoch_iterator.py", line 84, in run
    result = self.run_pipeline(b_ix, ixes, slot, events[slot])
  File "/data/pulkitag/models/rli14/ffcv/ffcv/loader/epoch_iterator.py", line 146, in run_pipeline
    results = stage_code(**args)
  File "", line 2, in stage_code_1
  File "/data/pulkitag/models/rli14/ffcv/ffcv/transforms/ops.py", line 153, in convert
    return inp.view(self.target_dtype)
RuntimeError: shape '[2, 26, 84]' is invalid for input of size 2184

I think the code does not support the variable size final batch constructed by drop_last = False.