-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix gradient inversion #196
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #196 +/- ##
=======================================
Coverage 98.52% 98.52%
=======================================
Files 16 16
Lines 476 476
=======================================
Hits 469 469
Misses 7 7
☔ View full report in Codecov by Sentry. |
Looks good to me! I was able to pack the test recipe, however, it's taking a very long time to load the model in Simularium, I'm still waiting to visualize the result. One question(might not related to this PR): |
@rugeli, were you able to visualize the output? It might help if you change the radius of the As for the progress bar, it gets reprinted/interrupted when something else gets printed to the terminal. The |
Thanks for getting back to me! I wasn't able to visualize the output yesterday. I just changed the |
* check for outliers in weights
@rugeli the recipe has been updated so you should be able to run it faster and visualize in simularium. Let me know if there are still any issues |
Problem
Gradient inversion used distances instead of weights. This could result in unexpected inversion.
Solution
The type of inversion can be specified as an option now.
invert: "distance"
inverts the scaled distances andinvert: "weight"
inverts the weights after calculation.Type of change
Change summary:
Steps to Verify:
pack -r cellpack/tests/recipes/v2/test_mesh_image_gradient.json -c cellpack/tests/packing-configs/test_mesh_config.json
invert: "weight"
toinvert: "distance"
to visualize alternative inversion.Screenshots:
Inverting distances:
Inverting weights:
Keyfiles: