• Zhun Zhong's avatar
    Fix bug to RandomErasing (#1095) · 34833427
    Zhun Zhong authored
    * Fix bug to Random Erasing
    
    1. Avoid forever loop for getting parameters of erase.
    2. replace' img_b' by 'img_c', because it indicates the channel.
    3. replace v = torch.rand([img_c, h, w]) by v = torch.empty([img_c, h, w], dtype=torch.float32).normal_(). Normally distributed achieves better performance.
    
    * add test
    
    * Update test_transforms.py
    
    * Update transforms.py
    
    * Update test_transforms.py
    
    * Update transforms.py
    
    * Update functional.py
    34833427
test_transforms.py 56.2 KB