acecreamu / deep-hs-prior

Single Hyperspectral Image Denoising, Inpainting, Super-Resolution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the net output shape problem

wangrong97 opened this issue · comments

Dear author,
Thank you so much for your code.
When I running the Optimize part in the "denoising.ipynb", having a problem as below:
RuntimeError: The size of tensor a (192) must match the size of tensor b (200) at non-singleton dimension 3

Then, I find the out size will become [1, 191, 192, 192] when through the "net", could you tell me how to solve this problem? Thank you very much!

Hi, thank you for the question. The simplest solution is trivial, just use only 192 out of 200 channels of original image (by simple slicing). For the 3D case, the 3rd dimension should be divisible by 2^n, so it is difficult to make it work with 200 channels.

Thank you very much for your reply. I have solved the problem through your suggestion. Have a nice day.

Hello, thank you very much for the code you shared with us. I would like to ask how do you generate 3D.mat? There is only 2d.mat in the program