MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / CyclicShift

Class CyclicShift

Image_Classification/src/models/swin.py:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class CyclicShift(nn.Module):
10 def __init__(self, displacement):
11 super().__init__()
12 self.displacement = displacement
13
14 def forward(self, x):
15 return torch.roll(x, shifts=(self.displacement, self.displacement), dims=(1, 2))
16
17
18class Residual(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected