pytorch
ba9d9d48 - Implement padding with slice layer (#67888)

Commit
3 years ago
Implement padding with slice layer (#67888) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67888 Implement padding with slice layer, work step is: reverse slice and pad 0 [1, 2] => [2, 1, 0 ... 0] transpose, reverse tensor back to original order, finish pre-pad [2, 1, 0 ... 0] => [0 ... 0, 1, 2] continue post-pad [0 ... 0, 1, 2] => [0 ... 0, 1, 2, 0 ... 0] Test Plan: buck test mode/dev-nosan caffe2/test/fx2trt/converters:test_pad Reviewed By: 842974287 Differential Revision: D32160739 fbshipit-source-id: dbbc04d916e23551e3ce9be480283377e9a38b34
Author
Shirong Wu
Parents
Loading