Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct typos and issues with notebooks #2402

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 31 additions & 13 deletions tutorials/01_NeMo_Models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1637,16 +1637,34 @@
"-----\n",
"Wait, why did OmegaConf not fill in the value of the variable interpolation for the configs yet?\n",
"\n",
"This is because OmegaConf takes a deferred approach to variable interpolation. To force it ahead of time, we can use the following snippet - "
"This is because OmegaConf takes a deferred approach to variable interpolation. First, we fill in temporary values of the required fields (those marked by `???`). Then, to force resolution ahead of time, we can use the following snippet - "
]
},
{
"cell_type": "code",
"metadata": {
"id": "0X4C76JyOAnN"
},
"source": [
"import copy"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ugxA0TPtbHVZ"
},
"source": [
"temp_config = OmegaConf.create(OmegaConf.to_container(model_config, resolve=True))\n",
"temp_config = copy.deepcopy(model_config)\n",
"temp_config.model.vocab_size = 10\n",
"temp_config.model.block_size = 4\n",
"temp_config.model.n_layer = 1\n",
"temp_config.model.n_embd = 32\n",
"temp_config.model.n_head = 4\n",
"\n",
"temp_config = OmegaConf.create(OmegaConf.to_container(temp_config, resolve=True))\n",
"print(OmegaConf.to_yaml(temp_config))"
],
"execution_count": null,
Expand All @@ -1662,17 +1680,6 @@
"Now that we have a config, let's try to create an object of the NeMo Model !"
]
},
{
"cell_type": "code",
"metadata": {
"id": "g_jM0oOmpOUT"
},
"source": [
"import copy"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
Expand Down Expand Up @@ -2631,6 +2638,17 @@
"------\n",
"There we go ! Now our models can be serialized and de-serialized without any issue, even with an external vocab file !"
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZjCV5u3_OO7a"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}
2 changes: 1 addition & 1 deletion tutorials/asr/ASR_for_telephony_speech.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"* National Speech Corpus - 1\n",
"* Mozilla Common Voice\n",
"\n",
"Among these, Fisher and Switchboard datasets are conversational telephone speech datasets with audio sampled at 8 kHz while the other datasets were originally sampled at at least 16 kHz. Before training, all audio files from Fisher and Switchboard datasets were upsampled to 16 kHz. Because of this mixed sample rate training, our models can be used to recognize both narrowband (8kHz) and wideband speech (16kHz)"
"Among these, Fisher and Switchboard datasets are conversational telephone speech datasets with audio sampled at 8 kHz while the other datasets were originally sampled at least 16 kHz. Before training, all audio files from Fisher and Switchboard datasets were upsampled to 16 kHz. Because of this mixed sample rate training, our models can be used to recognize both narrowband (8kHz) and wideband speech (16kHz)"
]
},
{
Expand Down