Skip to content
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

change view to reshape to support channels last #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chunyuan-w
Copy link

The current implementation of drq does not support channels last input since view has constraints on the input size and stride (https://pytorch.org/docs/stable/generated/torch.Tensor.view.html):

Cannot view a tensor with shape torch.Size([1, 32, 35, 35]) and strides (39200, 1, 1120, 32) as a tensor with shape (1, 39200)!

Change view to reshape which returns a view if the shapes are compatible, and copies (equivalent to calling contiguous()) otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant