MCPcopy Create free account
hub / github.com/FLC777/GLAT / set_num_updates

Method set_num_updates

fairseq/models/fairseq_encoder.py:85–92  ·  view source on GitHub ↗

State from trainer to pass along to model at every update.

(self, num_updates)

Source from the content-addressed store, hash-verified

83 return state_dict
84
85 def set_num_updates(self, num_updates):
86 """State from trainer to pass along to model at every update."""
87
88 def _apply(m):
89 if hasattr(m, "set_num_updates") and m != self:
90 m.set_num_updates(num_updates)
91
92 self.apply(_apply)

Callers 1

_applyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected