conex / espnet2 /enh /abs_enh.py
tobiasc's picture
Initial commit
ad16788
raw
history blame contribute delete
658 Bytes
from abc import ABC
from abc import abstractmethod
from collections import OrderedDict
from typing import Tuple
import torch
class AbsEnhancement(torch.nn.Module, ABC):
# @abstractmethod
# def output_size(self) -> int:
# raise NotImplementedError
@abstractmethod
def forward(
self,
input: torch.Tensor,
ilens: torch.Tensor,
) -> Tuple[torch.Tensor, torch.Tensor, OrderedDict]:
raise NotImplementedError
@abstractmethod
def forward_rawwav(
self, input: torch.Tensor, ilens: torch.Tensor
) -> Tuple[torch.Tensor, torch.Tensor, OrderedDict]:
raise NotImplementedError