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
Static vision model #1525
Static vision model #1525
Conversation
@@ -75,13 +89,19 @@ def __getitem__(self, index: int): | |||
|
|||
def __len__(self): | |||
"""Return length of batch.""" | |||
return len(self._batch) | |||
dataset = self._context.get_data_by_kind(self._dataset_kind) |
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'm not sure this is the best way to get batch length, maybe we should use len(batch_to_images(batch))
@noamzbr WDYT?
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.
batch_to_images not always implemented.
fixed case of sampled data
@@ -75,13 +90,19 @@ def __getitem__(self, index: int): | |||
|
|||
def __len__(self): | |||
"""Return length of batch.""" | |||
return len(self._batch) | |||
dataset = self._context.get_data_by_kind(self._dataset_kind) |
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.
@JKL98ISR Can you explain the logic of this code? Possible also in comments.
Seems to me like this returns the number of batches in the dataset.
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.
it returns the length of the batch.
dataloader_len is the amount of batches the dataloader has
closes #1364
also fixed batch length bug