benchmark
ef39f8ca - drq: change view to reshape to support channels last (#1367)

Commit
3 years ago
drq: change view to reshape to support channels last (#1367) Summary: 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. Pull Request resolved: https://github.com/pytorch/benchmark/pull/1367 Reviewed By: erichan1 Differential Revision: D42480679 Pulled By: xuzhao9 fbshipit-source-id: 2a2b5a71950e77966637e38b5d494f8deaef1e5d
Author
Parents
Loading