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
Formatters validation #875
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Given all of that, won't it make sense to make "infer" like functions also for image and label?
@@ -160,7 +164,7 @@ def assert_task_type(self, *expected_types: TaskType): | |||
def infer(self, batch: Any) -> Any: | |||
"""Return the predictions on the given batch, and cache them for later.""" | |||
if self._batch_prediction_cache is None: | |||
self._batch_prediction_cache = self.model(batch) | |||
self._batch_prediction_cache = self.prediction_formatter(batch, self.model, self.device) |
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.
does this work? Shouldn't it be self._device ?
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.
no, we have property device
resolve [FEAT] Formatters validation for users. #854