Skip to content

Commit 4f8f903

Browse files
Fix commented item in MONAI 101 tutorial (#1310)
Fixes a comment for MONAI 101 tutorial. #1303 (comment) ### Description A few sentences describing the changes proposed in this pull request. ### 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] Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the `./figure` folder - [x] Notebook runs automatically `./runner.sh -t <path to .ipynb file>` Signed-off-by: Mingxin Zheng <[email protected]>
1 parent bfa33b8 commit 4f8f903

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

2d_classification/monai_101.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@
6464
"name": "stdout",
6565
"output_type": "stream",
6666
"text": [
67-
"MONAI version: 1.2.0rc4\n",
67+
"MONAI version: 1.2.0rc4+2.g57c618cc\n",
6868
"Numpy version: 1.22.2\n",
6969
"Pytorch version: 1.14.0a0+410ce96\n",
7070
"MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n",
71-
"MONAI rev id: 1a55ba5423d04d2ef7ac19356ccabc4c7906f577\n",
71+
"MONAI rev id: 57c618cc0be2c081bae4caec13cf326c66874605\n",
7272
"MONAI __file__: /workspace/monai/monai-in-dev/monai/__init__.py\n",
7373
"\n",
7474
"Optional dependencies:\n",
@@ -109,7 +109,7 @@
109109
"from monai.inferers import SimpleInferer\n",
110110
"from monai.networks import eval_mode\n",
111111
"from monai.networks.nets import densenet121\n",
112-
"from monai.transforms import LoadImageD, EnsureChannelFirstD, ScaleIntensityD, ToTensorD, Compose\n",
112+
"from monai.transforms import LoadImageD, EnsureChannelFirstD, ScaleIntensityD, Compose\n",
113113
"\n",
114114
"print_config()"
115115
]
@@ -155,7 +155,7 @@
155155
"Medical images require specialized methods for I/O, preprocessing, and augmentation.\n",
156156
"They often follow specific formats, are handled with specific protocols, and the data arrays are often high-dimensional.\n",
157157
"\n",
158-
"In this example, we will perform image loading, data format verification, intensity scaling, and conversion to Tensor with four `monai.transforms` listed below, and compose a pipeline ready to be used in next steps."
158+
"In this example, we will perform image loading, data format verification, and intensity scaling with three `monai.transforms` listed below, and compose a pipeline ready to be used in next steps."
159159
]
160160
},
161161
{
@@ -169,7 +169,6 @@
169169
" LoadImageD(keys=\"image\", image_only=True),\n",
170170
" EnsureChannelFirstD(keys=\"image\"),\n",
171171
" ScaleIntensityD(keys=\"image\"),\n",
172-
" ToTensorD(keys=[\"image\", \"label\"]),\n",
173172
" ]\n",
174173
")"
175174
]
@@ -202,16 +201,16 @@
202201
"name": "stdout",
203202
"output_type": "stream",
204203
"text": [
205-
"2023-04-13 15:29:44,888 - INFO - Verified 'MedNIST.tar.gz', md5: 0bc7306e7427e00ad1c5526a6677552d.\n",
206-
"2023-04-13 15:29:44,889 - INFO - File exists: /workspace/data/MedNIST.tar.gz, skipped downloading.\n",
207-
"2023-04-13 15:29:44,889 - INFO - Non-empty folder exists in /workspace/data/MedNIST, skipped extracting.\n"
204+
"2023-04-14 11:54:20,086 - INFO - Verified 'MedNIST.tar.gz', md5: 0bc7306e7427e00ad1c5526a6677552d.\n",
205+
"2023-04-14 11:54:20,087 - INFO - File exists: /workspace/data/MedNIST.tar.gz, skipped downloading.\n",
206+
"2023-04-14 11:54:20,087 - INFO - Non-empty folder exists in /workspace/data/MedNIST, skipped extracting.\n"
208207
]
209208
},
210209
{
211210
"name": "stderr",
212211
"output_type": "stream",
213212
"text": [
214-
"Loading dataset: 100%|██████████| 47164/47164 [00:23<00:00, 2009.60it/s]\n"
213+
"Loading dataset: 100%|██████████| 47164/47164 [00:18<00:00, 2579.81it/s]\n"
215214
]
216215
}
217216
],
@@ -278,7 +277,7 @@
278277
},
279278
{
280279
"cell_type": "code",
281-
"execution_count": 13,
280+
"execution_count": 8,
282281
"metadata": {},
283282
"outputs": [
284283
{

0 commit comments

Comments
 (0)