MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / double_step_seq

Method double_step_seq

segmentation/backbones/swin.py:119–122  ·  view source on GitHub ↗
(step1, len1, step2, len2)

Source from the content-addressed store, hash-verified

117
118 @staticmethod
119 def double_step_seq(step1, len1, step2, len2):
120 seq1 = torch.arange(0, step1 * len1, step1)
121 seq2 = torch.arange(0, step2 * len2, step2)
122 return (seq1[:, None] + seq2[None, :]).reshape(1, -1)
123
124
125class ShiftWindowMSA(BaseModule):

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected