Spaces:
Sleeping
Sleeping
Download auto_encoder/components/normalize.py from JuyeopDang/KoFace-AI: direct link, hf CLI and curl.
- Browser
- Download file 172 Bytes
-
https://huggingface.co/spaces/JuyeopDang/KoFace-AI/resolve/main/auto_encoder/components/normalize.py
- Command line
-
hf download hf://spaces/JuyeopDang/KoFace-AI/auto_encoder/components/normalize.py
-
curl -L -o normalize.py https://huggingface.co/spaces/JuyeopDang/KoFace-AI/resolve/main/auto_encoder/components/normalize.py
172 Bytes
| import torch | |
| def Normalize(in_channels : int, num_groups : int = 32): | |
| return torch.nn.GroupNorm(num_groups=num_groups, num_channels=in_channels, eps=1e-6, affine=True) |