espnet.nets.pytorch_backend.nets_utils.get_subsample
Less than 1 minute
espnet.nets.pytorch_backend.nets_utils.get_subsample
espnet.nets.pytorch_backend.nets_utils.get_subsample(train_args, mode, arch)
Parse the subsampling factors from the args for the specified mode and arch.
- Parameters:
- train_args – argument Namespace containing options.
- mode – one of (‘asr’, ‘mt’, ‘st’)
- arch – one of (‘rnn’, ‘rnn-t’, ‘rnn_mix’, ‘rnn_mulenc’, ‘transformer’)
- Returns: subsampling factors.
- Return type: np.ndarray / List[np.ndarray]