question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is the implementation for FON really 4-th order?

See original GitHub issue

Thanks for your inspiring work.

I found the implementation of FON is confusing, which may not what claimed in the paper.

Paper claims image

However,

def gen_fon(img, t, t_next, model, alphas_cump, ets):
    t_list = [t, (t + t_next) / 2.0, t_next]
    if len(ets) > 2:
        noise = model(img, t)
        img_next = transfer(img, t, t-1, noise, alphas_cump)
        delta = img_next - img
        ets.append(delta)
    else:
        noise = model(img, t_list[0])
        img_ = transfer(img, t, t - 1, noise, alphas_cump)
        delta_1 = img_ - img
        ets.append(delta_1)

        img_2 = img + delta_1 * (t - t_next).view(-1, 1, 1, 1) / 2.0
        noise = model(img_2, t_list[1])
        img_ = transfer(img, t, t - 1, noise, alphas_cump)
        delta_2 = img_ - img

        img_3 = img + delta_2 * (t - t_next).view(-1, 1, 1, 1) / 2.0
        noise = model(img_3, t_list[1])
        img_ = transfer(img, t, t - 1, noise, alphas_cump)
        delta_3 = img_ - img

        img_4 = img + delta_3 * (t - t_next).view(-1, 1, 1, 1)
        noise = model(img_4, t_list[2])
        img_ = transfer(img, t, t - 1, noise, alphas_cump)
        delta_4 = img_ - img
        delta = (1 / 6.0) * (delta_1 + 2*delta_2 + 2*delta_3 + delta_4)

    img_next = img + delta * (t - t_next).view(-1, 1, 1, 1)
    return img_next

After len(ets) > 2, delta seems only use first order info?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
luping-liucommented, Apr 1, 2022

Yes, you are right. I have fixed this bug. Replace this first-order method with the linear multistep method. https://github.com/luping-liu/PNDM/blob/f285e8e6da36049ea29e97b741fb71e531505ec8/runner/method.py#L55-L60 This bug was introduced when refactoring the code, so it does not affect our experimental results.

0reactions
qsh-zhcommented, Apr 2, 2022

I see, thanks for your response!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAFSA® Simplification Act Changes for Implementation in ...
We will continue to address other aspects of the FAFSA Simplification Act implementation in the future. Dear Colleague: On Nov. 4, 2022 ...
Read more >
TRACED Act Implementation
Implementation of STIR/SHAKEN​​ The Commission adopted a Report and Order on March 31, 2020 mandating that originating and terminating phone companies implement ......
Read more >
Math for Game Developers - Runge-Kutta Order 4 - YouTube
Runge-Kutta 4 is the go-to integration method for initial-value problems like the ones we have been studying. Then at the end I apply...
Read more >
Implementation of Additional Export Controls: Certain ...
4 : The purpose of this General Order is to avoid disruption of supply chains for items specified in paragraph (d)(1) of this...
Read more >
Current Implementation of Waters of the United States
U.S. Environmental Protection Agency. In light of this order, the agencies have halted implementation of the Navigable Waters Protection Rule ("NWPR") ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found