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

Function init_

diff2flow/models/unet/attention.py:39–43  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected