MCPcopy Create free account
hub / github.com/IceClear/StableSR / normalization

Function normalization

ldm/modules/diffusionmodules/util.py:199–205  ·  view source on GitHub ↗

Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.

(channels, norm_channel=32)

Source from the content-addressed store, hash-verified

197
198
199def normalization(channels, norm_channel=32):
200 """
201 Make a standard normalization layer.
202 :param channels: number of input channels.
203 :return: an nn.Module for normalization.
204 """
205 return GroupNorm32(norm_channel, channels)
206
207
208# PyTorch 1.7 has SiLU, but we support PyTorch 1.5.

Callers 6

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls 1

GroupNorm32Class · 0.85

Tested by

no test coverage detected