Skip to content

Conversation

@jaesuny
Copy link
Contributor

@jaesuny jaesuny commented Mar 27, 2018

Keeping compatibility, enable TensorDataset to get any number of tensors.

@ezyang
Copy link
Contributor

ezyang commented Mar 27, 2018

This needs a test

yield target_tensor
for tensor in tensors:
yield tensor
pass

This comment was marked as off-topic.

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.

@apaszke
Copy link
Contributor

apaszke commented Mar 28, 2018

@pytorchbot test this please

@ezyang ezyang merged commit 64e2c03 into pytorch:master Mar 28, 2018
@jaesuny jaesuny deleted the update-tensordataset branch March 28, 2018 15:43
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants