Giter VIP home page Giter VIP logo

pytorch_entropy_loss's People

Contributors

fangwei123456 avatar

Stargazers

 avatar

Watchers

 avatar

pytorch_entropy_loss's Issues

About torch.histc cuda backend

Hi,
Thank you for your implementation of calculating the entropy loss using pytorch. It is really useful because (I think) all the DL model for image compression task used some kind of techniques to approximate the entropy loss in the training stage.
I tried to run this repo on my local enviroment, and I found that the torch.histc does not support a cuda tensor as its input. Therefore in the entropy_loss.py:

p[i] = torch.histc(input[i].view(-1).int(), bins = maxV - minV + 1, min = minV, max = maxV).float() / input[i].numel()

it seems not working.

I think it might be changed to:

p[i] = torch.histc(input[i].view(-1).int().data.cpu(), bins = maxV - minV + 1, min = minV, max = maxV).float() / input[i].numel()

where we might need to put input[i] on the "CPU memory".

Also, I guess that you are working on the reproduction of the algorithm mentioned in paper VARIATIONAL IMAGE COMPRESSION WITH A SCALE HYPERPRIOR. In the quantification stage, you might need to add a uniform noise as it is mentioned in the paper.

I'm also working on the reproduction of this paper, I wonder if you could share your progress? Because I faced some issue when implementing the hyperprior module and also my "factorized prior" version cannot match the performance mentioned in the paper.

Looking forward for your reply,

Gong

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.