MCPcopy Create free account
hub / github.com/ShanghaiTech-IMPACT/TeethDreamer / nonlinearity

Function nonlinearity

ldm/modules/diffusionmodules/model.py:33–35  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

31
32
33def nonlinearity(x):
34 # swish
35 return x*torch.sigmoid(x)
36
37
38def Normalize(in_channels, num_groups=32):

Callers 7

forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected