MCPcopy Create free account
hub / github.com/ZHKKKe/MODNet / forward

Method forward

torchscript/modnet_torchscript.py:228–239  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

226 self.backbone.load_pretrained_ckpt()
227
228 def forward(self, img):
229 # NOTE
230 lr_out = self.lr_branch(img)
231 lr8x = lr_out[0]
232 enc2x = lr_out[1]
233 enc4x = lr_out[2]
234
235 hr2x = self.hr_branch(img, enc2x, enc4x, lr8x)
236
237 pred_matte = self.f_branch(img, lr8x, hr2x)
238
239 return pred_matte
240
241 def freeze_norm(self):
242 norm_types = [nn.BatchNorm2d, nn.InstanceNorm2d]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected