MCPcopy Create free account
hub / github.com/PyGCL/PyGCL / __init__

Method __init__

GCL/models/contrast_model.py:40–45  ·  view source on GitHub ↗
(self, loss: Loss, mode: str, intraview_negs: bool = False, **kwargs)

Source from the content-addressed store, hash-verified

38
39class DualBranchContrast(torch.nn.Module):
40 def __init__(self, loss: Loss, mode: str, intraview_negs: bool = False, **kwargs):
41 super(DualBranchContrast, self).__init__()
42 self.loss = loss
43 self.mode = mode
44 self.sampler = get_sampler(mode, intraview_negs=intraview_negs)
45 self.kwargs = kwargs
46
47 def forward(self, h1=None, h2=None, g1=None, g2=None, batch=None, h3=None, h4=None,
48 extra_pos_mask=None, extra_neg_mask=None):

Callers

nothing calls this directly

Calls 2

get_samplerFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected