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

Method __init__

GCL/models/contrast_model.py:76–80  ·  view source on GitHub ↗
(self, loss, mode='L2L')

Source from the content-addressed store, hash-verified

74
75class BootstrapContrast(torch.nn.Module):
76 def __init__(self, loss, mode='L2L'):
77 super(BootstrapContrast, self).__init__()
78 self.loss = loss
79 self.mode = mode
80 self.sampler = get_sampler(mode, intraview_negs=False)
81
82 def forward(self, h1_pred=None, h2_pred=None, h1_target=None, h2_target=None,
83 g1_pred=None, g2_pred=None, g1_target=None, g2_target=None,

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

get_samplerFunction · 0.90

Tested by

no test coverage detected