Download utils/__init__.py from NSect/VALL-E-X: direct link, hf CLI and curl.
- Browser
- Download file 338 Bytes
-
https://huggingface.co/spaces/NSect/VALL-E-X/resolve/main/utils/__init__.py
- Command line
-
hf download hf://spaces/NSect/VALL-E-X/utils/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/NSect/VALL-E-X/resolve/main/utils/__init__.py
338 Bytes
| import torch | |
| import torch.nn as nn | |
| # from icefall.utils import make_pad_mask | |
| from .symbol_table import SymbolTable | |
| # make_pad_mask = make_pad_mask | |
| SymbolTable = SymbolTable | |
| class Transpose(nn.Identity): | |
| """(N, T, D) -> (N, D, T)""" | |
| def forward(self, input: torch.Tensor) -> torch.Tensor: | |
| return input.transpose(1, 2) | |