Git Product home page Git Product logo

Comments (6)

fracape avatar fracape commented on August 22, 2024

Hi, thanks for reporting, that is strange indeed. You train and perform inference on the same data, so you should learn your batch with your network and get a very small, and matching, theoretical and actual bitrate. Have you checked that your aux_loss converges with the learning rate you chose? You might also face a limitation on how the channels are processed by the entropy bottleneck (and ANS) since you encode a rather small vector. 64 (8 bytes) seems to show a limit in minimum number of bytes. Please let me know if you have investigated further.

from compressai.

Cyprus-hy avatar Cyprus-hy commented on August 22, 2024

Hi, thanks for reporting, that is strange indeed. You train and perform inference on the same data, so you should learn your batch with your network and get a very small, and matching, theoretical and actual bitrate. Have you checked that your aux_loss converges with the learning rate you chose? You might also face a limitation on how the channels are processed by the entropy bottleneck (and ANS) since you encode a rather small vector. 64 (8 bytes) seems to show a limit in minimum number of bytes. Please let me know if you have investigated further.

Thanks for your reply. I have checked that aux_loss and distortion_loss both almost converge. And I also try to increase the vertor's size, from 10*64 to 10*1000000(1000000 is about the num_pixels of a normal image, and the channel of entropy bottleneck is still 16), but the actual bpp is still much larger than theoretical bpp. Besides, I compare the actual bpp and the theoretical bpp in the comparison notebook, they are indeed almost the same, just as the issue 12 shows. Until now I have no idea about this.

from compressai.

ZhangYuef avatar ZhangYuef commented on August 22, 2024

I am no sure why this issue happens but I think it's a must to add model2.eval() before model forward:

# theoretical bpp
_, y_likelihoods = model2.forward(data)

from compressai.

Cyprus-hy avatar Cyprus-hy commented on August 22, 2024

I am no sure why this issue happens but I think it's a must to add model2.eval() before model forward:

# theoretical bpp
_, y_likelihoods = model2.forward(data)

Thanks for your reply. I have added "model2.eval()" according to your suggestion, but it still doesn't work.

from compressai.

ZhangYuef avatar ZhangYuef commented on August 22, 2024

I am no sure why this issue happens but I think it's a must to add model2.eval() before model forward:

# theoretical bpp
_, y_likelihoods = model2.forward(data)

Thanks for your reply. I have added "model2.eval()" according to your suggestion, but it still doesn't work.

How about add with torch.no_grad() and model2.eval() also? Just gussing

from compressai.

jbegaint avatar jbegaint commented on August 22, 2024

Closing stale issue. If you think it should remain open, feel free to reopen it.

from compressai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.