Add HOWTO: Circular Convs
See original GitHub issueXLA convs natively do not support this, but you can always manually concat a kernel/2 per dim amount of data on the edges to achieve it at some data layout cost.
A minimal example in terms of default Linen nn.Conv
and jnp.pad
:
class CircularConv(nn.Module):
features: int
kernel_size: Union[int, Iterable[int]]
@nn.compact
def __call__(self, inputs):
padding = [(0, 0)] + [(k//2, k//2) for k in self.kernel_size] + [(0, 0)]
inputs = jnp.pad(inputs, padding, mode='wrap')
return nn.Conv(self.features, self.kernel_size, padding='VALID')(inputs)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Introducing Twitter Circle, a new way to Tweet to a smaller crowd
With Twitter Circle, people now have the flexibility to choose who can see and engage with their content on a Tweet-by-Tweet basis.
Read more >Circular Convolution with and without using conv in matlab
In this video i am going to explain and implement circular convolution code in matlab with and without using conv,cconv/standard function .
Read more >Linear and Circular Convolution - MATLAB & Simulink
This example shows how to establish an equivalence between linear and circular convolution. Linear and circular convolution are fundamentally different ...
Read more >How To Type Text In A Circle In Photoshop (Step By Step)
To type text in a circle in Photoshop, select the Ellipse Tool then click and drag out on your canvas to create a...
Read more >Use Messages on your iPhone or iPad - Apple Support
Pin your conversations. And learn how to edit or undo messages. ... Or tap the image circle to choose an image, photo, emoji,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@VolodyaCO interesting suggestion! If you think this would be generally useful, could you create a feature request issue proposing this?
Closing this since @sgrigory implemented circular padding in #1661. Thanks @sgrigory!