Spaces:
Runtime error
Runtime error
Download Modules/utils.py from Scralius/StyleTTS2_French: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/Scralius/StyleTTS2_French/resolve/main/Modules/utils.py
- Command line
-
hf download hf://spaces/Scralius/StyleTTS2_French/Modules/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Scralius/StyleTTS2_French/resolve/main/Modules/utils.py
376 Bytes
| def init_weights(m, mean=0.0, std=0.01): | |
| classname = m.__class__.__name__ | |
| if classname.find("Conv") != -1: | |
| m.weight.data.normal_(mean, std) | |
| def apply_weight_norm(m): | |
| classname = m.__class__.__name__ | |
| if classname.find("Conv") != -1: | |
| weight_norm(m) | |
| def get_padding(kernel_size, dilation=1): | |
| return int((kernel_size*dilation - dilation)/2) |