espnet2.enh.layers.fasnet.FaSNet_base
espnet2.enh.layers.fasnet.FaSNet_base
class espnet2.enh.layers.fasnet.FaSNet_base(enc_dim, feature_dim, hidden_dim, layer, segment_size=24, nspk=2, win_len=16, context_len=16, dropout=0.0, sr=16000)
Bases: Module
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(input, num_mic)
abstract forward function
input: shape (batch, max_num_ch, T) num_mic: shape (batch, ), the number of channels for each input.
Zero for fixed geometry configuration.
pad_input(input, window)
Zero-padding input according to window/stride size.
seg_signal_context(x, window, context)
Segmenting the signal into chunks with specific context.
input: : x: size (B, ch, T) window: int context: int
seq_cos_sim(ref, target)
Cosine similarity between some reference mics and some target mics
ref: shape (nmic1, L, seg1) target: shape (nmic2, L, seg2)
signal_context(x, context)
signal context function
Segmenting the signal into chunks with specific context. input:
x: size (B, dim, nframe) context: int