varun19299 / deep-atrous-guided-filter

Deep Atrous Guided Filter for Image Restoration in Under Display Cameras (UDC Challenge, ECCV 2020).
https://varun19299.github.io/deep-atrous-guided-filter/
36 stars 6 forks source link

why change source from [0,1] to [-1,1]? #1

Closed hellolingling closed 3 years ago

hellolingling commented 3 years ago

In dataloader.py I see the code as below source = (source - 0.5) * 2 target = (target - 0.5) * 2, why change source and target from [0,1] to [-1,1]?

varun19299 commented 3 years ago

We use tanh as the final activation.

On 09-Sep-2020, at 11:58 AM, hellolingling notifications@github.com<mailto:notifications@github.com> wrote:

In dataloader.py I see the code as below source = (source - 0.5) 2 target = (target - 0.5) 2, why change source and target from [0,1] to [-1,1]?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/varun19299/deep-atrous-guided-filter/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFBQJZ666ZOQU52Y6YIOWKDSE4OATANCNFSM4RBG7THQ.

hellolingling commented 3 years ago

got it, thanks for your quickly reply!

hellolingling commented 3 years ago

We use tanh as the final activation. On 09-Sep-2020, at 11:58 AM, hellolingling notifications@github.com<mailto:notifications@github.com> wrote: In dataloader.py I see the code as below source = (source - 0.5) 2 target = (target - 0.5) 2, why change source and target from [0,1] to [-1,1]? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#1>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFBQJZ666ZOQU52Y6YIOWKDSE4OATANCNFSM4RBG7THQ.

why not using sigmoid to replace tanh? If tanh performs better results than sigmoid?

varun19299 commented 3 years ago

It shouldn't matter, tanh is a rescaled sigmoid.