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.15k stars 228 forks source link

[onnx] Are entropy_bottleneck.compress and gaussian_conditional.compress can be convert to onnx? #247

Open YI-MAX-YAN opened 1 year ago

YI-MAX-YAN commented 1 year ago

Hi, I want to convert a compress_codec containing g_a h_a h_s entropy_bottleneck.compress, and gaussian_conditional.compress . However, the output of onnx is different from the pth. Is this suitable to convert entropy_bottleneck.compress to onnx? @fracape

Jerryliao122 commented 5 months ago

Hi, I want to convert a compress_codec containing g_a h_a h_s entropy_bottleneck.compress, and gaussian_conditional.compress . However, the output of onnx is different from the pth. Is this suitable to convert entropy_bottleneck.compress to onnx? @fracape

Hi, have you solved this problem yet? I would also like to try to convert them to onnx models, but don't know how to do it. If you know can you reply me? thanks!!!

YI-MAX-YAN commented 5 months ago

sorry i still cannot fix this problem

YuKDseele commented 3 months ago

sorry i still cannot fix this problem

Hi! I'm wondering if you've also encountered the following problem: When I tried to transport the result output, I found that a Unicode decoder error (utf-8) while converting the ONNX model, preventing the proper output of the result. Then I attempted to calculate the bpp using onnx, but the final result differed significantly from the PTH. To find the reason, I used the Netron to view the exported ONNX structure, which revealed that the calculation of bpp did not utilize entropy_bottleneck,_compression, and Gaussian_conditional_compression, but instead used a constant.