Skip to content

change view to reshape to support channels last#27

Open
chunyuan-w wants to merge 1 commit intodenisyarats:masterfrom
chunyuan-w:chunyuan/fix_view
Open

change view to reshape to support channels last#27
chunyuan-w wants to merge 1 commit intodenisyarats:masterfrom
chunyuan-w:chunyuan/fix_view

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.

1 participant