MCPcopy
hub / github.com/zai-org/CogVideo / normalization

Function normalization

sat/sgm/modules/diffusionmodules/util.py:228–234  ·  view source on GitHub ↗

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

(channels)

Source from the content-addressed store, hash-verified

226
227
228def normalization(channels):
229 """
230 Make a standard normalization layer.
231 :param channels: number of input channels.
232 :return: an nn.Module for normalization.
233 """
234 return GroupNorm32(32, channels)
235
236
237# PyTorch 1.7 has SiLU, but we support PyTorch 1.5.

Callers 5

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 1

GroupNorm32Class · 0.85

Tested by

no test coverage detected