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

Method update_target_encoder

examples/BGRL_G2L.py:88–91  ·  view source on GitHub ↗
(self, momentum: float)

Source from the content-addressed store, hash-verified

86 return self.target_encoder
87
88 def update_target_encoder(self, momentum: float):
89 for p, new_p in zip(self.get_target_encoder().parameters(), self.online_encoder.parameters()):
90 next_p = momentum * p.data + (1 - momentum) * new_p.data
91 p.data = next_p
92
93 def forward(self, x, edge_index, edge_weight=None, batch=None):
94 aug1, aug2 = self.augmentor

Callers 1

trainFunction · 0.45

Calls 1

get_target_encoderMethod · 0.95

Tested by

no test coverage detected