update add_style_melgan

pull/1068/head
TianYuan 3 years ago
parent 7b2ecb6eed
commit f701882b66

@ -93,8 +93,7 @@ class MelGANGenerator(nn.Layer):
initialize(self, init_type)
# for compatibility
if nonlinear_activation == "LeakyReLU":
nonlinear_activation = "leakyrelu"
nonlinear_activation = nonlinear_activation.lower()
# check hyper parameters is valid
assert channels >= np.prod(upsample_scales)
@ -328,8 +327,7 @@ class MelGANDiscriminator(nn.Layer):
super().__init__()
# for compatibility
if nonlinear_activation == "LeakyReLU":
nonlinear_activation = "leakyrelu"
nonlinear_activation = nonlinear_activation.lower()
# initialize parameters
initialize(self, init_type)
@ -479,8 +477,7 @@ class MelGANMultiScaleDiscriminator(nn.Layer):
initialize(self, init_type)
# for compatibility
if nonlinear_activation == "LeakyReLU":
nonlinear_activation = "leakyrelu"
nonlinear_activation = nonlinear_activation.lower()
self.discriminators = nn.LayerList()

@ -10,8 +10,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations
# under the License.
# limitations under the License.
import logging
from pathlib import Path
from typing import Dict
@ -28,6 +27,7 @@ from paddlespeech.t2s.training.extensions.evaluator import StandardEvaluator
from paddlespeech.t2s.training.reporter import report
from paddlespeech.t2s.training.updaters.standard_updater import StandardUpdater
from paddlespeech.t2s.training.updaters.standard_updater import UpdaterState
logging.basicConfig(
format='%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] %(message)s',
datefmt='[%Y-%m-%d %H:%M:%S]')

@ -60,8 +60,7 @@ class ResidualStack(nn.Layer):
"""
super().__init__()
# for compatibility
if nonlinear_activation == "LeakyReLU":
nonlinear_activation = "leakyrelu"
nonlinear_activation = nonlinear_activation.lower()
# defile residual stack part
if not use_causal_conv:

Loading…
Cancel
Save