Justin-Tan / high-fidelity-generative-compression

Pytorch implementation of High-Fidelity Generative Image Compression + Routines for neural image compression
Apache License 2.0
411 stars 77 forks source link

why not use 'torch.uint8' #36

Closed Huiyu-Li closed 2 years ago

Huiyu-Li commented 2 years ago

Hello, Since the range of image is 0-255, why the code use data = data.to(device, dtype=torch.float) not data = data.to(device, dtype=torch.uint8)?

For image compression, unint8 is more efficient than float, right? Thank you.