MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / __init__

Method __init__

pycontrast/memory/mem_moco.py:54–58  ·  view source on GitHub ↗
(self, n_dim, K=65536, T=0.07)

Source from the content-addressed store, hash-verified

52class RGBMoCo(BaseMoCo):
53 """Single Modal (e.g., RGB) MoCo-style cache"""
54 def __init__(self, n_dim, K=65536, T=0.07):
55 super(RGBMoCo, self).__init__(K, T)
56 # create memory queue
57 self.register_buffer('memory', torch.randn(K, n_dim))
58 self.memory = F.normalize(self.memory)
59
60 def forward(self, q, k, q_jig=None, all_k=None):
61 """

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected