MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / init_

Function init_

ldm/modules/attention.py:41–45  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

39
40
41def init_(tensor):
42 dim = tensor.shape[-1]
43 std = 1 / math.sqrt(dim)
44 tensor.uniform_(-std, std)
45 return tensor
46
47
48# feedforward

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected