QuartzNet Model¶
QuartzNet Model¶
-
class
openspeech.models.quartznet.model.
QuartzNet10x5Model
(configs: omegaconf.dictconfig.DictConfig, tokenizer: openspeech.tokenizers.tokenizer.Tokenizer)[source]¶ QUARTZNET: DEEP AUTOMATIC SPEECH RECOGNITION WITH 1D TIME-CHANNEL SEPARABLE CONVOLUTIONS Paper: https://arxiv.org/abs/1910.10261.pdf
- Parameters
configs (DictConfig) – configuration set.
tokenizer (Tokeizer) – tokenizer is in charge of preparing the inputs for a model.
- Inputs:
inputs (torch.FloatTensor): A input sequence passed to encoders. Typically for inputs this will be a padded FloatTensor of size
(batch, seq_length, dimension)
. input_lengths (torch.LongTensor): The length of input tensor.(batch)
- Returns
Result of model predictions that contains y_hats, logits, output_lengths
- Return type
outputs (dict)
-
class
openspeech.models.quartznet.model.
QuartzNet15x5Model
(configs: omegaconf.dictconfig.DictConfig, tokenizer: openspeech.tokenizers.tokenizer.Tokenizer)[source]¶ QUARTZNET: DEEP AUTOMATIC SPEECH RECOGNITION WITH 1D TIME-CHANNEL SEPARABLE CONVOLUTIONS Paper: https://arxiv.org/abs/1910.10261.pdf
- Parameters
configs (DictConfig) – configuration set.
tokenizer (Tokeizer) – tokenizer is in charge of preparing the inputs for a model.
- Inputs:
inputs (torch.FloatTensor): A input sequence passed to encoders. Typically for inputs this will be a padded FloatTensor of size
(batch, seq_length, dimension)
. input_lengths (torch.LongTensor): The length of input tensor.(batch)
- Returns
Result of model predictions that contains y_hats, logits, output_lengths
- Return type
outputs (dict)
-
class
openspeech.models.quartznet.model.
QuartzNet5x5Model
(configs: omegaconf.dictconfig.DictConfig, tokenizer: openspeech.tokenizers.tokenizer.Tokenizer)[source]¶ QUARTZNET: DEEP AUTOMATIC SPEECH RECOGNITION WITH 1D TIME-CHANNEL SEPARABLE CONVOLUTIONS Paper: https://arxiv.org/abs/1910.10261.pdf
- Parameters
configs (DictConfig) – configuration set.
tokenizer (Tokeizer) – tokenizer is in charge of preparing the inputs for a model.
- Inputs:
inputs (torch.FloatTensor): A input sequence passed to encoders. Typically for inputs this will be a padded FloatTensor of size
(batch, seq_length, dimension)
. input_lengths (torch.LongTensor): The length of input tensor.(batch)
- Returns
Result of model predictions that contains y_hats, logits, output_lengths
- Return type
outputs (dict)
QuartzNet Configuration¶
-
class
openspeech.models.quartznet.configurations.
QuartzNet10x5Configs
(model_name: str = 'quartznet10x5', num_blocks: int = 10, num_sub_blocks: int = 5, in_channels: str = '(None, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 1024)', out_channels: str = '(256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 1024, None)', kernel_size: str = '(33, 33, 33, 39, 39, 51, 51, 63, 63, 75, 75, 87, 1, 1)', dilation: str = '(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2)', dropout_p: str = '(0.2, None, None, None, None, None, None, None, None, None, None, 0.2, 0.2, 0.2)', optimizer: str = 'novograd')[source]¶ This is the configuration class to store the configuration of a
QuartzNet10x5
.It is used to initiated an QuartzNet10x5 model.
Configuration objects inherit from :class: ~openspeech.dataclass.configs.OpenspeechDataclass.
- Parameters
model_name (str) – Model name (default: quartznet5x5)
num_blocks (int) – Number of quartznet blocks (default: 10)
num_sub_blocks (int) – Number of quartznet sub blocks (default: 5)
in_channels (str) – Output channels of jasper block’s convolution
out_channels (str) – Output channels of jasper block’s convolution
kernel_size (str) – Kernel size of jasper block’s convolution
dilation (str) – Dilation of jasper block’s convolution
dropout_p (str) – Dropout probability
optimizer (str) – Optimizer for training.
-
class
openspeech.models.quartznet.configurations.
QuartzNet15x5Configs
(model_name: str = 'quartznet15x5', num_blocks: int = 15, num_sub_blocks: int = 5, in_channels: str = '(None, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024)', out_channels: str = '(256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, None)', kernel_size: str = '(33, 33, 33, 33, 39, 39, 39, 51, 51, 51, 63, 63, 63, 75, 75, 75, 87, 1, 1)', dilation: str = '(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2)', dropout_p: str = '(0.2, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 0.2, 0.2, 0.2)', optimizer: str = 'novograd')[source]¶ This is the configuration class to store the configuration of a
QuartzNet15x5
.It is used to initiated an QuartzNet15x5 model.
Configuration objects inherit from :class: ~openspeech.dataclass.configs.OpenspeechDataclass.
- Parameters
model_name (str) – Model name (default: quartznet15x5)
num_blocks (int) – Number of quartznet blocks (default: 15)
num_sub_blocks (int) – Number of quartznet sub blocks (default: 5)
in_channels (str) – Output channels of jasper block’s convolution
out_channels (str) – Output channels of jasper block’s convolution
kernel_size (str) – Kernel size of jasper block’s convolution
dilation (str) – Dilation of jasper block’s convolution
dropout_p (str) – Dropout probability
optimizer (str) – Optimizer for training.
-
class
openspeech.models.quartznet.configurations.
QuartzNet5x5Configs
(model_name: str = 'quartznet5x5', num_blocks: int = 5, num_sub_blocks: int = 5, in_channels: str = '(None, 256, 256, 256, 512, 512, 512, 512, 1024)', out_channels: str = '(256, 256, 256, 512, 512, 512, 512, 1024, None)', kernel_size: str = '(33, 33, 39, 51, 63, 75, 87, 1, 1)', dilation: str = '(1, 1, 1, 1, 1, 1, 1, 1, 2)', dropout_p: str = '(0.2, None, None, None, None, None, 0.2, 0.2, 0.2)', optimizer: str = 'novograd')[source]¶ This is the configuration class to store the configuration of a
QuartzNet5x5
.It is used to initiated an QuartzNet5x5 model.
Configuration objects inherit from :class: ~openspeech.dataclass.configs.OpenspeechDataclass.
- Parameters
model_name (str) – Model name (default: quartznet5x5)
num_blocks (int) – Number of quartznet blocks (default: 5)
num_sub_blocks (int) – Number of quartznet sub blocks (default: 5)
in_channels (str) – Output channels of jasper block’s convolution
out_channels (str) – Output channels of jasper block’s convolution
kernel_size (str) – Kernel size of jasper block’s convolution
dilation (str) – Dilation of jasper block’s convolution
dropout_p (str) – Dropout probability
optimizer (str) – Optimizer for training.