-
Notifications
You must be signed in to change notification settings - Fork 5.9k
add TensorDataset for multiprocess DataLoader #26332
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
add TensorDataset for multiprocess DataLoader #26332
Conversation
|
Thanks for your contribution! |
… add_tensor_dataset
660e6c2 to
2bfa66d
Compare
… add_tensor_dataset
… add_tensor_dataset
… add_tensor_dataset
| import six | ||
| import time | ||
| import unittest | ||
| import multiprocessing |
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.
remove un-used importing, multiprocessing, time, ...
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.
Done, thanks!
| assert len(input) == 1 | ||
| assert len(label) == 1 | ||
| assert input.shape == [1, 3, 4] | ||
| assert label.shape == [1, 1] |
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.
you also can check the input/label type. whether it is equal to input_np/label_np.
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.
Done, thanks!
| "{}".format('__len__', self.__class__.__name__)) | ||
|
|
||
|
|
||
| class TensorDataset(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.
can TensorDataset only be used in dygraph? if so, raise error in static mode
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.
Done, thanks!
Heeenrrry
left a comment
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.
LGTM
XiaoguangHu01
left a comment
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.
LGTM
PR types
New features
PR changes
APIs
Describe
paddle.io.TensorDatasetAPI