mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 14:35:57 +00:00
Add hpu usage info in jupyter notebook files
This commit is contained in:
parent
6e66088bd0
commit
1be8041ede
36
notebooks/LibriSpeech.ipynb
generated
36
notebooks/LibriSpeech.ipynb
generated
@ -36,10 +36,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"metadata": {
|
|
||||||
"id": "3CqtR2Fi5-vP"
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import os\n",
|
"import os\n",
|
||||||
@ -56,10 +53,35 @@
|
|||||||
"import torchaudio\n",
|
"import torchaudio\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from tqdm.notebook import tqdm\n",
|
"from tqdm.notebook import tqdm\n",
|
||||||
"\n",
|
"\n"
|
||||||
"\n",
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"# Set the `DEVICE` based on available hardware\n",
|
||||||
|
"### If you're running on a machine with Intel Gaudi support, you can set the DEVICE to \"hpu\"\n",
|
||||||
|
"### This can be done by setting the device to \"hpu\" if Gaudi is available.\n",
|
||||||
|
"### Ensure you have the Habana PyTorch extension installed and properly configured."
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# DEVICE = \"hpu\"\n",
|
||||||
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
||||||
]
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
|||||||
30
notebooks/Multilingual_ASR.ipynb
generated
30
notebooks/Multilingual_ASR.ipynb
generated
@ -51,10 +51,33 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"pd.options.display.max_rows = 100\n",
|
"pd.options.display.max_rows = 100\n",
|
||||||
"pd.options.display.max_colwidth = 1000\n",
|
"pd.options.display.max_colwidth = 1000\n"
|
||||||
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"# Set the `DEVICE` based on available hardware\n",
|
||||||
|
"### If you're running on a machine with Intel Gaudi support, you can set the DEVICE to \"hpu\"\n",
|
||||||
|
"### This can be done by setting the device to \"hpu\" if Gaudi is available.\n",
|
||||||
|
"### Ensure you have the Habana PyTorch extension installed and properly configured."
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# DEVICE = \"hpu\"\n",
|
||||||
|
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
@ -860,8 +883,7 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"Importing the dtw module. When using in academic works please cite:\n",
|
"Importing the dtw module. When using in academic works please cite:\n",
|
||||||
" T. Giorgino. Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package.\n",
|
" T. Giorgino. Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package.\n",
|
||||||
" J. Stat. Soft., doi:10.18637/jss.v031.i07.\n",
|
" J. Stat. Soft., doi:10.18637/jss.v031.i07.\n"
|
||||||
"\n"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user