-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve predictor module #562
Improve predictor module #562
Conversation
This doesn't fully fix mala-project#508 yet.
Must have been left out during merge of formatted develop branch (6629b05).
Replace code duplication by slice object.
_forward_snap_descriptors() needs a Tensor but that isn't enforced.
The linting CI thinks this is necessary. Well ok.
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.
Hi @elcorto thanks for the improvements, I left a two comments for clarification, apart from that this looks good to me!
I was wondering, should we address the second part of #508 in this PR as well? As you pointed out there, modifying the check should not be difficult. |
Ideally yes, but I left it for discussion and did not change anything since I was unsure how to change the check. |
Got it, I actually looked into it and do no longer think this part of the code is redundant. The additional check makes sure that if the user specified an inference grid AFTER loading of the predictor class, this change is taken into account. Since the predictor object is loaded and the parameters object is not created beforehand, if you want to use a different inference grid this is the only way (I think?). The part in |
OK thanks for the double check. Let's go ahead and close #508 then with this PR. |
Sounds good, will merge here. |
Some cleanup / update in
network/predictor.py
that I'd like to move out of feature branches into develop, in preparation of a larger PR later which includes one feature only.