MS-SSIM be Nan
@aiff22 Hi, I try to train with my own data, but when level1 and level0, the MS-SSIM loss be Nan (actually MS-SSIM loss is not used at level1). So I run the training code in debug mode, I found that, in some case, the SSIM could be negative. I found the code of MS-SSIM implements at jorge-pessoa/pytorch-msssim and discussions about this problem at Issue #2.
So If I turn on the normalization code (msssim.py:92) , should the combining weights of loss be adjusted?If should,how to adjust them?
What's more, I found the tensorflow official implements about MS_SSIM at https://github.com/tensorflow/tensorflow/blob/r1.15/tensorflow/python/ops/image_ops_impl.py :3408/3414) which just truncate(using ReLU to clip the negative value of SSIM). So I read MULTI-SCALE STRUCTURAL SIMILARITY FOR IMAGE QUALITY ASSESSMENT. In my opinion,I‘d like tensorflow‘s implements more.
@Jam-G hi, I am getting this error on running the code and I have no idea why it's throwing this error.
File "train_model.py", line 12, in <module>
from msssim import MSSSIM
ModuleNotFoundError: No module named 'msssim'
Can you please help me with this?
Thank you
@singhalok641 It seems you lost msssim.py , or a search problem caused by PYTHONPATH.
You can check if the msssim.py file exists in the directory where the train_model.py is located. And if there, make sure that directory or "." in your PYTHONPATH. It's fine that you can using the code sys.path.append(os.path.abspath(os.path.dirname(__file__))) at begining of train_model.py to let python find msssim.py too.