提交 f701882b 编写于 作者: 小湉湉's avatar 小湉湉

update add_style_melgan

上级 7b2ecb6e
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册