MCPcopy Create free account
hub / github.com/CompVis/diff2flow / inplace_lerp

Function inplace_lerp

diff2flow/ema.py:26–30  ·  view source on GitHub ↗
(src: Tensor, tgt: Tensor, weight, *, auto_move_device = False)

Source from the content-addressed store, hash-verified

24 src.copy_(tgt)
25
26def inplace_lerp(src: Tensor, tgt: Tensor, weight, *, auto_move_device = False):
27 if auto_move_device:
28 tgt = tgt.to(src.device)
29
30 src.lerp_(tgt, weight)
31
32class EMA(Module):
33 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected