Comments (3)
output = torch.prod(pow1[:-1] * pow2[-1])
I meet NaN during training on this line.
pytorch module tells me that Function 'ProdBackward0' returned nan values in its 0th output.
I've set normalize=True in the code, but nan still happens.
After changing to output = torch.prod(pow1[:-1]) * pow2[-1]
it turned out to Function 'MulBackward0' returned nan values in its 1th output.
from pytorch-msssim.
Hi, I find the official implement in tensorflow. The implementation is similar with this author's.
https://github.com/tensorflow/tensorflow/blob/r1.14/tensorflow/python/ops/image_ops_impl.py#L3143-L3267
from pytorch-msssim.
Hello,
I apologize for the delay in answering your question. As I understand from the official implementation, the product method (which is what is implemented in this repository) requires the multiplication of each value of the mcs array by the ssim of the last iteration of the SSIM calculation. See line 99 of msssim.m from https://ece.uwaterloo.ca/~z70wang/research/iwssim/ :
overall_mssim = prod(mcs_array(1:level-1).^weight(1:level-1))*(mssim_array(level).^weight(level));
Regarding your stability issues, I will be merging a different approach to ensure stability in the initial iterations which may help you (if you're still interested).
Thank you for your contributions. I will be closing this issue for now due to its age. If you still have any questions feel free to open a new one.
from pytorch-msssim.
Related Issues (20)
- nan problem HOT 2
- Output is out of range HOT 2
- Bug in your MSSSIM implementation HOT 3
- Is the threshold necessary? HOT 1
- Inquiry about standard deviations HOT 1
- ssim on mnist HOT 1
- Index map HOT 1
- Contrast Sensitivity (CS) for batch size > 1 HOT 1
- Typo in calculation? HOT 2
- Arbitrary NAN for very low MS-SSIM comparisons HOT 15
- Big in SSIM implementation, don't use this code for perceptual quality estimation HOT 3
- SSIM result is different from skimage.measure.compare_ssim HOT 1
- parameter misspelled in readme HOT 1
- Usage of this loss in the binary segmentation
- SSIM loss output range
- Artifacts on color images HOT 5
- MS-SSIM Usage HOT 1
- Expected object of scalar type Double but got scalar type Float for argument #2 'weight' HOT 2
- functools.lru_cache can be used for saving the window HOT 1
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.
from pytorch-msssim.