我希望对PyTorch卷积进行两个操作,这些操作在文档或代码中没有提到:
I want to create a convolution with a fixed kernel like this:
000010000 000010000 100010001 000010000 000010000
The horizontal aspect is like dilation, I guess, but the vertical part is different. I see that dilation is available as a parameter in the code, but it has to be a scalar or single-element tuple (not one element per dimension), so I don't think it can do what I want here.
I would like my convolutions to "wrap around" like a toroid, rather than use padding.
EDIT TO ADD: I see that there is an open issue for this , which also provides a suboptimal workaround. So, I guess that there's no "right" way to do it, yet.
filters
是自定义内核吗?2. 环形不同于反射,参见例如https://github.com/pytorch/pytorch/issues/6124 - 这似乎是一个开放请求,目前除了使用解决方法外还无法实现。 - jmmcdweights
定义)给出。torch.nn.functional.pad
现在支持circular
填充。 - Vaelus