Spaces:
Configuration error
Configuration error
Download modules/layers.py from kevinwang676/NeuCoSVC: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/spaces/kevinwang676/NeuCoSVC/resolve/main/modules/layers.py
- Command line
-
hf download hf://spaces/kevinwang676/NeuCoSVC/modules/layers.py
-
curl -L -o layers.py https://huggingface.co/spaces/kevinwang676/NeuCoSVC/resolve/main/modules/layers.py
368 Bytes
| import torch | |
| from modules.base import BaseModule | |
| class Conv1dWithInitialization(BaseModule): | |
| def __init__(self, **kwargs): | |
| super(Conv1dWithInitialization, self).__init__() | |
| self.conv1d = torch.nn.Conv1d(**kwargs) | |
| torch.nn.init.orthogonal_(self.conv1d.weight.data, gain=1) | |
| def forward(self, x): | |
| return self.conv1d(x) | |