-
Notifications
You must be signed in to change notification settings - Fork 12
Predict volume #280
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
base: main
Are you sure you want to change the base?
Predict volume #280
Conversation
@ziw-liu, @tayllatheodoro is actively working on this branch to get a prototype ready for Friday. Can you please keep an eye on it and provide quick feedback where needed? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to test that this runs.
viscy/api/inference.py
Outdated
model_class = getattr(importlib.import_module(module_path), class_name) | ||
|
||
# Instantiate model | ||
model = model_class(**init_args).to(x.device).eval() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move it to the model to device and move the tensors to the device.
viscy/translation/engine.py
Outdated
weights = x.new_zeros((1, 1, Z, 1, 1)) | ||
|
||
pad = getattr(self, "_predict_pad", None) | ||
if pad is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure if this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs a correctness test against the out-of-core implementation.
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
Co-authored-by: Ziwen Liu <[email protected]>
if not hasattr(self, "_predict_pad"): | ||
raise RuntimeError( | ||
"Missing _predict_pad; make sure to call `on_predict_start()` before inference." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attribute is assigned in __init__
, and I don't see a on_predict_start
hook implemented for this class.
Closes #279
TODO: