Skip to content

Commit 5d14b8b

Browse files
authored
add description of loading a pretrained bundle (#968)
Signed-off-by: binliu <binliu@nvidia.com> ### Description Add codes of how to load a pretrained bundlein this tutorial. ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] Notebook runs automatically `./runner [-p <regex_pattern>]` Signed-off-by: binliu <binliu@nvidia.com>
1 parent 9987da2 commit 5d14b8b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

computer_assisted_intervention/video_seg.ipynb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,14 @@
369369
"source": [
370370
"## Normal training loop\n",
371371
"\n",
372-
"A normal training loop will be excuted. Meanwhile, the iou value of each epoch will be recorded as the accuracy."
372+
"A normal training loop will be excuted. Meanwhile, the iou value of each epoch will be recorded as the accuracy. \n",
373+
"There is a pretrained bundle for surgical tool segmentation task in the MONAI model-zoo, the model can be automatically downloaded and loaded to the network by adding codes to the block below:\n",
374+
"```\n",
375+
"pretrained_weights = monai.bundle.load(\n",
376+
" name=\"surgical_tool_segmentation\", bundle_dir=\"./\", version=\"0.2.0\"\n",
377+
")\n",
378+
"model.load_state_dict(pretrained_weights)\n",
379+
"```"
373380
]
374381
},
375382
{

0 commit comments

Comments
 (0)