MCPcopy Create free account
hub / github.com/AMAP-ML/EMF / _sync_target_model

Method _sync_target_model

trl/trl/trainer/callbacks.py:107–109  ·  view source on GitHub ↗
(model, target_model, alpha)

Source from the content-addressed store, hash-verified

105
106 @staticmethod
107 def _sync_target_model(model, target_model, alpha):
108 for target_param, copy_param in zip(target_model.parameters(), model.parameters()):
109 target_param.data.mul_(1.0 - alpha).add_(copy_param.data, alpha=alpha)
110
111 @staticmethod
112 def sync_target_model(model, target_model, alpha):

Callers 1

sync_target_modelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected