Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Forward Backward test with TensorFlow model #324

Open
tkoskela opened this issue Jun 22, 2023 · 1 comment
Open

Run Forward Backward test with TensorFlow model #324

tkoskela opened this issue Jun 22, 2023 · 1 comment
Labels

Comments

@tkoskela
Copy link
Contributor

We should now be able to repurpose

TEST_CASE("fb_factory") {

To run with the TensorFlow model

@mmcleod89
Copy link
Contributor

First attempt at this has led to a failing test, which converges on a largely uniform solution.
tf_output
solution

In both my test and in a python based test the initial imaginary component of the image, which should in theory always be zero, is quite large at first and falls in significance with subsequent iterations.
Regarding the relationship with SOPT tests of the FB + TF functionality:

  • The tf_inpainting test in SOPT tests this better than the regular forward_backward test
  • As written, tf_inpainting only tests using real values.
  • I copied that test and tried it with complex values and it still works, which is not surprising because the imaginary component is zero, but still it's nice to know that it's not going completely bonkers.
  • The SOPT test does not use the projection operator Phi. It instead uses a simple sampling algorithm which picks a random subset of data points. This means that any instability which might come from Phi would not be tested in SOPT.
  • This also means that the complex version of the SOPT test is completely stable as there is no way for complex values to creep in.
  • The purify tests use UV visibility data as their target, with a Phi operator which should in theory transform from complex UV data to a real image, but in reality (at least in the early stages) there is a non negligible imaginary component.
  • It's not clear to me yet if the convergence criteria need to be changed in the complex case.

Given that the TF model works well in SOPT within the limited scope of real images simply sampled, it could be that the problems originate in purify and that either Phi has some issues or the complex image vector contains important information in the imaginary component that can't be thrown away. Some more testing of FB+TF in sopt might be helpful, but it's difficult to think of a good complex test case given that TF is supposed to only take real values and the image should always be real in the ideal case. Possibly we can take the example image used by Tobias and test this within SOPT to see if this is a purify issue or a sopt issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants