-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Enable TensorDataset to get any number of tensors #6038
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix syntax error on python 2.7
Contributor
|
This needs a test |
apaszke
reviewed
Mar 28, 2018
torch/utils/data/dataset.py
Outdated
| yield target_tensor | ||
| for tensor in tensors: | ||
| yield tensor | ||
| pass |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/utils/data/dataset.py
Outdated
| assert data_tensor.size(0) == target_tensor.size(0) | ||
| self.data_tensor = data_tensor | ||
| self.target_tensor = target_tensor | ||
| def __init__(self, data_tensor=None, target_tensor=None, *tensors): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
apaszke
approved these changes
Mar 28, 2018
Contributor
|
@pytorchbot test this please |
drisspg
added a commit
to drisspg/pytorch
that referenced
this pull request
Dec 1, 2022
Summary: X-link: pytorch/glow#6038 Replaces the the inline block of code in nn.funcitonal.mha with `_scaled_dot_product_attention`. This function allows the fused kernels to be called if all the required input conditions are met. cc VitalyFedyunin ngimel Pull Request resolved: pytorch#89470 Reviewed By: cpuhrsch Differential Revision: D41625335 Pulled By: drisspg fbshipit-source-id: cd7d010a6c325618e0df9dd75246a291451c8021
drisspg
added a commit
to drisspg/pytorch
that referenced
this pull request
Dec 2, 2022
Summary: X-link: pytorch/glow#6038 Replaces the the inline block of code in nn.funcitonal.mha with `_scaled_dot_product_attention`. This function allows the fused kernels to be called if all the required input conditions are met. cc VitalyFedyunin ngimel Pull Request resolved: pytorch#89470 Reviewed By: mostafaelhoushi, cpuhrsch Differential Revision: D41625335 Pulled By: drisspg fbshipit-source-id: 1723c11739fc73963bd9be8dc04f45e5abda79c0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Keeping compatibility, enable
TensorDatasetto get any number of tensors.