mirror of
https://github.com/babysor/MockingBird.git
synced 2024-03-22 13:11:31 +08:00
b617a87ee4
* Init ppg extractor and ppg2mel * add preprocess and training * FIx known issues * Update __init__.py Allow to gen audio * Fix length issue * Fix bug of preparing fid * Fix sample issues * Add UI usage of PPG-vc
19 lines
483 B
Python
19 lines
483 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright 2020 Johns Hopkins University (Shinji Watanabe)
|
|
# Northwestern Polytechnical University (Pengcheng Guo)
|
|
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
"""Swish() activation function for Conformer."""
|
|
|
|
import torch
|
|
|
|
|
|
class Swish(torch.nn.Module):
|
|
"""Construct an Swish object."""
|
|
|
|
def forward(self, x):
|
|
"""Return Swich activation function."""
|
|
return x * torch.sigmoid(x)
|