Spaces:
Paused
Paused
Download zerorvc/f0/rmvpe/seq.py from JacobLinCool/ZeroRVC: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/JacobLinCool/ZeroRVC/resolve/main/zerorvc/f0/rmvpe/seq.py
- Command line
-
hf download hf://spaces/JacobLinCool/ZeroRVC/zerorvc/f0/rmvpe/seq.py
-
curl -L -o seq.py https://huggingface.co/spaces/JacobLinCool/ZeroRVC/resolve/main/zerorvc/f0/rmvpe/seq.py
472 Bytes
| import torch | |
| import torch.nn as nn | |
| class BiGRU(nn.Module): | |
| def __init__(self, input_features: int, hidden_features: int, num_layers: int): | |
| super().__init__() | |
| self.gru = nn.GRU( | |
| input_features, | |
| hidden_features, | |
| num_layers=num_layers, | |
| batch_first=True, | |
| bidirectional=True, | |
| ) | |
| self.gru.flatten_parameters() | |
| def forward(self, x: torch.Tensor): | |
| return self.gru(x)[0] | |