conex / espnet2 /enh /encoder /null_encoder.py
tobiasc's picture
Initial commit
ad16788
raw
history blame contribute delete
No virus
504 Bytes
import torch
from espnet2.enh.encoder.abs_encoder import AbsEncoder
class NullEncoder(AbsEncoder):
"""Null encoder. """
def __init__(self):
super().__init__()
@property
def output_dim(self) -> int:
return 1
def forward(self, input: torch.Tensor, ilens: torch.Tensor):
"""Forward.
Args:
input (torch.Tensor): mixed speech [Batch, sample]
ilens (torch.Tensor): input lengths [Batch]
"""
return input, ilens