Skip to content

Fix deepedit tutorial #696

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

Merged
merged 1 commit into from
May 11, 2022
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
2 changes: 1 addition & 1 deletion deepedit/ignite/infoANDinference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"metadata": {},
"outputs": [],
"source": [
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel tqdm]\"\n",
"!python -c \"import monai\" || pip install -q \"monai-weekly[nibabel, tqdm]\"\n",
"!python -c \"import matplotlib\" || pip install -q matplotlib==3.5.2\n",
"!pip install -q pytorch-ignite==0.4.8\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion deepedit/ignite/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def run(args):
"{}:: Loading PT Model from: {}".format(args.local_rank, args.input)
)
device = torch.device("cuda" if args.use_gpu else "cpu")
network = get_network(args.network, args.channels, args.dimensions).to(device)
network = get_network(args.network, args.labels, args.spatial_size).to(device)

map_location = {"cuda:0": "cuda:{}".format(args.local_rank)}
network.load_state_dict(torch.load(args.input, map_location=map_location))
Expand Down