mirror of
https://github.com/TaterTotterson/microWakeWord-Trainer-Nvidia-Docker.git
synced 2026-06-12 20:10:19 -06:00
Update basic_training_notebook.ipynb
This commit is contained in:
@@ -510,8 +510,10 @@
|
||||
"# On Google colab, it doesn't print the mini-batch results, so it may appear\n",
|
||||
"# stuck for several minutes! Additionally, it is very slow compared to training\n",
|
||||
"# on a local GPU.\n",
|
||||
"import os\n",
|
||||
"os.environ['LD_LIBRARY_PATH'] = \"/usr/lib/x86_64-linux-gnu:\" + os.environ.get('LD_LIBRARY_PATH', '')\n",
|
||||
"\n",
|
||||
"!python -m microwakeword.model_train_eval \\\n",
|
||||
"!\"{sys.executable}\" -m microwakeword.model_train_eval \\\n",
|
||||
"--training_config='training_parameters.yaml' \\\n",
|
||||
"--train 1 \\\n",
|
||||
"--restore_checkpoint 1 \\\n",
|
||||
@@ -539,20 +541,21 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Downloads the tflite model file. To use on the device, you need to write a\n",
|
||||
"# Model JSON file. See https://esphome.io/components/micro_wake_word for the\n",
|
||||
"# documentation and\n",
|
||||
"# https://github.com/esphome/micro-wake-word-models/tree/main/models/v2 for\n",
|
||||
"# examples. Adjust the probability threshold based on the test results obtained\n",
|
||||
"# after training is finished. You may also need to increase the Tensor arena\n",
|
||||
"# model size if the model fails to load.\n",
|
||||
"import shutil\n",
|
||||
"from IPython.display import FileLink\n",
|
||||
"\n",
|
||||
"from google.colab import files\n",
|
||||
"# Define the source path and desired download location\n",
|
||||
"source_path = \"trained_models/wakeword/tflite_stream_state_internal_quant/stream_state_internal_quant.tflite\"\n",
|
||||
"destination_path = \"./stream_state_internal_quant.tflite\"\n",
|
||||
"\n",
|
||||
"files.download(f\"trained_models/wakeword/tflite_stream_state_internal_quant/stream_state_internal_quant.tflite\")"
|
||||
"# Copy the file to the current working directory\n",
|
||||
"shutil.copy(source_path, destination_path)\n",
|
||||
"\n",
|
||||
"# Generate a link to download the file\n",
|
||||
"print(\"Download your file:\")\n",
|
||||
"FileLink(destination_path)"
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"colab": {
|
||||
|
||||
Reference in New Issue
Block a user