pytorch_entropy_loss's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.