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

Method forward

segmentation/backbones/swin.py:451–459  ·  view source on GitHub ↗
(self, x, hw_shape)

Source from the content-addressed store, hash-verified

449 self.downsample = downsample
450
451 def forward(self, x, hw_shape):
452 for block in self.blocks:
453 x = block(x, hw_shape)
454
455 if self.downsample:
456 x_down, down_hw_shape = self.downsample(x, hw_shape)
457 return x_down, down_hw_shape, x, hw_shape
458 else:
459 return x, hw_shape, x, hw_shape
460
461
462@BACKBONES.register_module()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected