A pytorch implementation of JPEG compression. This is a modified version of DiffJPEG (https://github.com/mlomnitz/DiffJPEG).
I just make the quality adjustment more flexible, and slim the code without modifying the algorithm :-)
The round operation is also changed, to make it accurate.