MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / scale_func

Method scale_func

mogen/models/transformers/finemogen.py:254–258  ·  view source on GitHub ↗
(self, timestep)

Source from the content-addressed store, hash-verified

252 DecoderLayer(ca_block_cfg=ca_block_cfg, ffn_cfg=ffn_cfg_block))
253
254 def scale_func(self, timestep):
255 scale = self.scale_func_cfg['scale']
256 w = (1 - (1000 - timestep) / 1000) * scale + 1
257 output = {'text_coef': w, 'none_coef': 1 - w}
258 return output
259
260 def aux_loss(self):
261 aux_loss = 0

Callers 2

forward_testMethod · 0.95
forward_testMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected