• Dragos Cristian's avatar
    adjust_hue now supports inputs of type Tensor (#2566) · bb88c452
    Dragos Cristian authored
    
    
    * adjust_hue now supports inputs of type Tensor
    
    * Added comparison between original adjust_hue and its Tensor and torch.jit.script versions.
    
    * Added a few type checkings related to adjust_hue in functional_tensor.py in hopes to make F_t.adjust_hue scriptable...but to no avail.
    
    * Changed implementation of _rgb2hsv and removed useless type declaration according to PR's review.
    
    * Handled the range of hue_factor in the assertions and temporarily increased the assertLess bound to make sure that no other test fails.
    
    * Fixed some lint issues with CircleCI and added type hints in functional_pil.py as well.
    
    * Corrected type hint mistakes.
    
    * Followed PR review recommendations and added test for class interface with hue.
    
    * Refactored test_functional_tensor.py to match vfdev-5's d016cab branch by simple copy/paste and added the test_adjust_hue and ColorJitter class interface test in the same style (class interface test was removed in vfdev-5's branch for some reason).
    
    * Removed test_adjustments from test_transforms_tensor.py and moved the ColorJitter class interface test in test_transforms_tensor.py.
    
    * Added cuda test cases for test_adjustments and tried to fix conflict.
    
    * Updated tests
    - adjust hue
    - color jitter
    
    * Fixes incompatible devices
    
    * Increased tol for cuda tests
    
    * Fixes potential issue with inplace op
    - fixes irreproducible failing test on Travis CI
    
    * Reverted fmod -> %
    Co-authored-by: default avatarvfdev-5 <vfdev.5@gmail.com>
    bb88c452
functional.py 40.9 KB