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

Method forward

segmentation/backbones/unet.py:404–415  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

402 in_channels = base_channels * 2**i
403
404 def forward(self, x):
405 self._check_input_divisible(x)
406 enc_outs = []
407 for enc in self.encoder:
408 x = enc(x)
409 enc_outs.append(x)
410 dec_outs = [x]
411 for i in reversed(range(len(self.decoder))):
412 x = self.decoder[i](enc_outs[i], x)
413 dec_outs.append(x)
414
415 return dec_outs
416
417 def train(self, mode=True):
418 """Convert the model into training mode while keep normalization layer

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected