Skip to content

Commit

Permalink
Fix to channel specification in 3d_autoencoderkl notebook (#1925)
Browse files Browse the repository at this point in the history
Fixes #1924 

Modification of channel definition within 3d_autoencoderkl notebook. 

### Description
The variable "channel" was wrongly defined after the transforms.
I have re-run the plot for channel = 2 and it runs fine. 

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [X] Avoid including large-size files in the PR.
- [X] Clean up long text outputs from code cells in the notebook.
- [X] For security purposes, please check the contents and remove any
sensitive info such as user names and private key.
- [X] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`

---------

Signed-off-by: Virginia <virginia.fernandez@kcl.ac.uk>
Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Co-authored-by: Virginia <virginia.fernandez@kcl.ac.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent 476d2fc commit 97b0f6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generation/3d_autoencoderkl/3d_autoencoderkl_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@
"metadata": {},
"outputs": [],
"source": [
"channel = 0 # 0 = Flair\n",
"assert channel in [0, 1, 2, 3], \"Choose a valid channel\"\n",
"all_transforms = [\n",
" transforms.LoadImaged(keys=[\"image\"]),\n",
" transforms.EnsureChannelFirstd(keys=[\"image\"]),\n",
Expand Down Expand Up @@ -207,8 +209,6 @@
}
],
"source": [
"channel = 0 # 0 = Flair\n",
"assert channel in [0, 1, 2, 3], \"Choose a valid channel\"\n",
"# Training\n",
"train_ds = DecathlonDataset(\n",
" root_dir=root_dir,\n",
Expand Down Expand Up @@ -785,7 +785,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 97b0f6b

Please sign in to comment.