MCPcopy
hub / github.com/Hillobar/Rope / forward

Method forward

models/clipseg.py:425–435  ·  view source on GitHub ↗
(self, img_q, cond_or_img_s, seg_s=None, return_features=False)

Source from the content-addressed store, hash-verified

423 return super().visual_forward(img_s, mask=('all', 'cls_token', seg_s))
424
425 def forward(self, img_q, cond_or_img_s, seg_s=None, return_features=False):
426
427 if seg_s is None:
428 cond = cond_or_img_s
429 else:
430 img_s = cond_or_img_s
431
432 with torch.no_grad():
433 cond, _, _ = self.visual_forward_masked(img_s, seg_s)
434
435 return super().forward(img_q, cond, return_features=return_features)
436
437
438

Callers

nothing calls this directly

Calls 2

visual_forward_maskedMethod · 0.95
forwardMethod · 0.45

Tested by

no test coverage detected