Skip to content

Fixes attempt to access removed .factories attribute #1558

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
Oct 30, 2023
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
105 changes: 73 additions & 32 deletions modules/UNet_input_size_constraints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 1,
"id": "efcd04b9",
"metadata": {},
"outputs": [],
Expand All @@ -55,10 +55,54 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 2,
"id": "86ee1f12",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"MONAI version: 0+untagged.2891.gccd32ca\n",
"Numpy version: 1.25.1\n",
"Pytorch version: 2.0.1\n",
"MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n",
"MONAI rev id: ccd32ca5e9e84562d2f388b45b6724b5c77c1f57\n",
"MONAI __file__: /Users/<username>/Envs/monai/lib/python3.9/site-packages/monai/__init__.py\n",
"\n",
"Optional dependencies:\n",
"Pytorch Ignite version: 0.4.11\n",
"ITK version: 5.3.0\n",
"Nibabel version: 5.1.0\n",
"scikit-image version: 0.21.0\n",
"scipy version: 1.11.1\n",
"Pillow version: 10.0.0\n",
"Tensorboard version: 2.13.0\n",
"gdown version: 4.7.1\n",
"TorchVision version: 0.15.2\n",
"tqdm version: 4.65.0\n",
"lmdb version: 1.4.1\n",
"psutil version: 5.9.5\n",
"pandas version: 2.0.3\n",
"einops version: 0.6.1\n",
"transformers version: 4.21.3\n",
"mlflow version: 2.4.2\n",
"pynrrd version: 1.0.0\n",
"clearml version: 1.11.2rc0\n",
"\n",
"For details about installing the optional dependencies, please visit:\n",
" https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
"\n"
]
}
],
"source": [
"from monai.networks.nets import UNet\n",
"import monai\n",
Expand Down Expand Up @@ -91,7 +135,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 3,
"id": "fd05bcb4",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -152,7 +196,7 @@
")"
]
},
"execution_count": 21,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -247,7 +291,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 4,
"id": "37f7e0e6",
"metadata": {},
"outputs": [],
Expand All @@ -271,7 +315,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 5,
"id": "0d5b0d70",
"metadata": {},
"outputs": [
Expand All @@ -291,7 +335,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 6,
"id": "3b1b4388",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -329,7 +373,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 7,
"id": "caece123",
"metadata": {},
"outputs": [
Expand All @@ -348,7 +392,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 8,
"id": "f67804d2",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -382,23 +426,20 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 9,
"id": "dc4be9d5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['INSTANCE', 'BATCH', 'GROUP', 'LAYER', 'LOCALRESPONSE', 'SYNCBATCH'])"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
"('INSTANCE', 'BATCH', 'INSTANCE_NVFUSER', 'GROUP', 'LAYER', 'LOCALRESPONSE', 'SYNCBATCH')\n"
]
}
],
"source": [
"monai.networks.layers.factories.Norm.factories.keys()"
"print(monai.networks.layers.factories.Norm.names)"
]
},
{
Expand Down Expand Up @@ -428,7 +469,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 10,
"id": "732f2769",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -461,7 +502,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 11,
"id": "0a33cc15",
"metadata": {},
"outputs": [],
Expand All @@ -486,17 +527,17 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 12,
"id": "23d75904",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"tensor([[[[[-0.7587]]]]])"
"tensor([[[[[-0.6150]]]]])"
]
},
"execution_count": 30,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -636,7 +677,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 13,
"id": "1bdc5c8e",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -671,7 +712,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 14,
"id": "7485a83a",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -702,7 +743,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 15,
"id": "6a31861f",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -770,7 +811,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 16,
"id": "d234f140",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -806,7 +847,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 17,
"id": "ccf53aa1",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -842,7 +883,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 18,
"id": "da6e9277",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -894,7 +935,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
Loading