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

Method __init__

GCL/models/contrast_model.py:112–115  ·  view source on GitHub ↗
(self, loss: Loss, **kwargs)

Source from the content-addressed store, hash-verified

110
111class WithinEmbedContrast(torch.nn.Module):
112 def __init__(self, loss: Loss, **kwargs):
113 super(WithinEmbedContrast, self).__init__()
114 self.loss = loss
115 self.kwargs = kwargs
116
117 def forward(self, h1, h2):
118 l1 = self.loss(anchor=h1, sample=h2, **self.kwargs)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected