codeslake / IFAN

[CVPR 2021] Official PyTorch Implementation for "Iterative Filter Adaptive Network for Single Image Defocus Deblurring"
GNU Affero General Public License v3.0
222 stars 37 forks source link

loss nan #15

Closed huzippm closed 1 year ago

huzippm commented 1 year ago

hello Junyong Lee: Thanks to your great work! I want to train the code based on the corrected IAC layer, but I have a question about loss nan when I directly re-train the model according to your parameters. Thank you for your help! @codeslake

TPZZZ commented 1 year ago

Hi huzippm,

Did you deal with this problem? I meet the same problem too, when I retrained the IFAN using my own training setting? Could you share some suggestions to solve this problem, if you successfully retrained the IFAN.

Thank you for your help

huzippm commented 1 year ago

hello TPZZZ: Did you change the network? I found that the loss would nan after I added the bn layer.

TPZZZ commented 1 year ago

No, I did not change the network. I followed these command to build the IFAN

from IFAN.models.arch.IFAN import Network from IFAN.configs.config import get_config config = get_config()

model = Network(config)

Config is default setting.