facebookresearch / FFCV-SSL

FFCV-SSL Fast Forward Computer Vision for Self-Supervised Learning.
Apache License 2.0
203 stars 14 forks source link

RandomHorizontalFlip with seed doesn't work #5

Closed fuji2021 closed 1 year ago

fuji2021 commented 1 year ago

Reproducing the example at this URL worked fine https://github.com/facebookresearch/FFCV-SSL/blob/main/examples/test_ffcv_augmentations_ssl.py. But when I change line 46 to add a parameter seed = 0, it generates the following error:

...
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f8d3a6a7e80>.
missing a required argument: 'counter'
During: resolving callee type: type(CPUDispatcher(<function RandomHorizontalFlip.generate_code.<locals>.flip at 0x7f8da2d612d0>))
During: typing of call at  (2)
nelaturuharsha commented 1 year ago

If you add flip.with_counter = True after line 60 in https://github.com/facebookresearch/FFCV-SSL/blob/main/ffcv/transforms/flip.py

this fixes the error

bordesf commented 1 year ago

Should be fixed thanks to @SreeHarshaNelaturu. I am closing the issue now.