-
Notifications
You must be signed in to change notification settings - Fork 103
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 Fat dataset loader #312
base: master
Are you sure you want to change the base?
Conversation
paz/datasets/fat.py
Outdated
from ..abstract import Loader | ||
from .utils import get_class_names |
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.
please keep the previous conventions of importing from inside paz
paz/datasets/fat.py
Outdated
@@ -25,16 +24,23 @@ class FAT(Loader): | |||
Estimation (DOPE)](https://github.com/NVlabs/Deep_Object_Pose) | |||
""" | |||
# TODO: Allow selection of class_names. | |||
def __init__(self, path, split='train', class_names='all'): | |||
def __init__(self, path, split=(0.4, 0.4, 0.2), class_names = 'all'): |
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.
the variable split is only intended to set to be 'train', 'validation' or 'test'. Please don't change that behavior.
paz/datasets/fat.py
Outdated
data_dict = {} | ||
train_split = int(len(self.data) * self.split[0]) | ||
test_split = int(len(self.data) * self.split[1]) | ||
validation_split = int(len(self.data) * self.split[2]) | ||
data_dict['train'] = self.data[:train_split] | ||
data_dict['test'] = self.data[ | ||
train_split:(train_split + test_split)] | ||
data_dict['validation'] = self.data[(train_split + test_split):] | ||
return data_dict | ||
|
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.
One should instantiate a single data loader per dataset.
paz/datasets/fat.py
Outdated
|
||
fat = Fat('/home/ramit/git/paz') | ||
|
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 seems to not belong here.
No description provided.