• Philip Meier's avatar
    Add convert_image_dtype to functionals (#2078) · c2e8a008
    Philip Meier authored
    
    
    * add convert_image_dtype to functionals
    
    * add ConvertImageDtype transform
    
    * add test
    
    * remove underscores from numbers since they are not compatible with python<3.6
    
    * address review comments 1/3
    
    * fix torch.bool
    
    * use torch.iinfo in test
    
    * fix flake8
    
    * remove double conversion
    
    * fix flake9
    
    * bug fix
    
    * add error messages to test
    
    * disable torch.float16 and torch.half for now
    
    * add docstring
    
    * add test for consistency
    
    * move nested function to top
    
    * test in CI
    
    * dirty progress
    
    * add int to int and cleanup
    
    * lint
    Co-authored-by: default avatarPhilip Meier <meier.philip@posteo.de>
    c2e8a008
transforms.py 51.3 KB