InterDigitalInc / CompressAI

A PyTorch library and evaluation platform for end-to-end compression research
https://interdigitalinc.github.io/CompressAI/
BSD 3-Clause Clear License
1.19k stars 232 forks source link

difference between compress and decompress will become smaller as the model is trained? #110

Closed TNTWEN closed 2 years ago

TNTWEN commented 2 years ago

Hello! I want to use function compress and decompress According to https://github.com/InterDigitalInc/CompressAI/issues/20, in navid-mahmoudian's code, diff = (out_net["x_hat"] - decompressed["x_hat"]).abs() is zero when using compressai's trained model.

I am wondering the performance of compress and decompress will grow better during training? which means compress and decompres are also a learned method?

I also add .update() and CompressionModel's load_state_dict(update_registered_buffers) in my training code and it works well.

At the begining ,diff is very big . After training several epochs diff becomes smaller.

Am I right to do so?

Thanks a lot !