Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
Signed-off-by: Jason <[email protected]>
  • Loading branch information
blisc committed Jul 28, 2020
1 parent aaa0761 commit 1f73b7c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions nemo/collections/tts/models/tacotron2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
# limitations under the License.

from dataclasses import dataclass
from typing import Dict, Optional, List
from typing import Dict, List, Optional

import torch
from omegaconf import MISSING, DictConfig, OmegaConf, open_dict
from torch import nn
from torch.nn.functional import pad

from nemo.collections.tts.helpers.helpers import get_mask_from_lengths, tacotron2_log_to_tb_func
from nemo.core.classes import ModelPT, Loss, typecheck
from nemo.utils import logging
from nemo.core.classes import Loss, ModelPT, typecheck
from nemo.core.neural_types.elements import (
LengthsType,
MelSpectrogramType,
LossType,
LogitsType,
AudioSignal,
EmbeddedTextType,
LengthsType,
LogitsType,
LossType,
MelSpectrogramType,
SequenceToSequenceAlignmentType,
)
from nemo.core.neural_types.neural_type import NeuralType
from nemo.utils import logging
from nemo.utils.decorators import experimental


Expand Down
14 changes: 7 additions & 7 deletions nemo/collections/tts/models/waveglow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@

from nemo.collections.tts.helpers.helpers import waveglow_log_to_tb_func
from nemo.collections.tts.modules.waveglow import OperationMode
from nemo.core.classes import ModelPT, Loss, typecheck
from nemo.utils import logging
from nemo.utils.decorators import experimental
from nemo.core.classes import Loss, ModelPT, typecheck
from nemo.core.neural_types.elements import (
NormalDistributionSamplesType,
VoidType,
LossType,
LengthsType,
AudioSignal,
LengthsType,
LossType,
MelSpectrogramType,
NormalDistributionSamplesType,
VoidType,
)
from nemo.core.neural_types.neural_type import NeuralType
from nemo.utils import logging
from nemo.utils.decorators import experimental


class WaveGlowLoss(Loss):
Expand Down
16 changes: 8 additions & 8 deletions nemo/collections/tts/modules/tacotron2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
from torch.autograd import Variable
from torch.nn import functional as F

_NATIVE_AMP = False
try:
from torch.cuda.amp import autocast

_NATIVE_AMP = True
except ImportError:
pass

from nemo.collections.tts.helpers.helpers import get_mask_from_lengths
from nemo.collections.tts.modules.submodules import Attention, ConvNorm, LinearNorm, Prenet
from nemo.core.classes import NeuralModule, typecheck
Expand All @@ -38,6 +30,14 @@
from nemo.utils import logging
from nemo.utils.decorators import experimental

_NATIVE_AMP = False
try:
from torch.cuda.amp import autocast

_NATIVE_AMP = True
except ImportError:
pass


@experimental # TODO: Need to implement abstratct methods: save_to, restore_from, but how?
class Encoder(NeuralModule):
Expand Down

0 comments on commit 1f73b7c

Please sign in to comment.