Skip to content

Commit

Permalink
Fix ci error in unet_plusplus.ipynb (#1573)
Browse files Browse the repository at this point in the history
Fixes #1572 .

Clean up long text outputs.


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

Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu authored Nov 16, 2023
1 parent c9fddd1 commit 5c06db8
Showing 1 changed file with 2 additions and 348 deletions.
350 changes: 2 additions & 348 deletions modules/network_contraints/unet_plusplus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,355 +117,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"BasicUNetPlusPlus features: (32, 32, 64, 128, 256, 32).\n",
"BasicUNetPlusPlus(\n",
" (conv_0_0): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(3, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" (conv_1_0): Down(\n",
" (max_pooling): MaxPool3d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (conv_2_0): Down(\n",
" (max_pooling): MaxPool3d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(32, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (conv_3_0): Down(\n",
" (max_pooling): MaxPool3d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(64, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(128, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (conv_4_0): Down(\n",
" (max_pooling): MaxPool3d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(128, 256, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(256, 256, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_0_1): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(32, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(64, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_1_1): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(64, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(64, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_2_1): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(128, 64, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(128, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_3_1): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(256, 128, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(256, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(128, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_0_2): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(32, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(96, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_1_2): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(64, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(96, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_2_2): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(128, 64, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(192, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(64, 64, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_0_3): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(32, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(128, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_1_3): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(64, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(128, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (upcat_0_4): UpCat(\n",
" (upsample): UpSample(\n",
" (deconv): ConvTranspose3d(32, 32, kernel_size=(2, 2, 2), stride=(2, 2, 2))\n",
" )\n",
" (convs): TwoConv(\n",
" (conv_0): Convolution(\n",
" (conv): Conv3d(160, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" (conv_1): Convolution(\n",
" (conv): Conv3d(32, 32, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))\n",
" (adn): ADN(\n",
" (N): BatchNorm3d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
" (D): Dropout(p=0.0, inplace=False)\n",
" (A): LeakyReLU(negative_slope=0.1, inplace=True)\n",
" )\n",
" )\n",
" )\n",
" )\n",
" (final_conv_0_1): Conv3d(32, 3, kernel_size=(1, 1, 1), stride=(1, 1, 1))\n",
" (final_conv_0_2): Conv3d(32, 3, kernel_size=(1, 1, 1), stride=(1, 1, 1))\n",
" (final_conv_0_3): Conv3d(32, 3, kernel_size=(1, 1, 1), stride=(1, 1, 1))\n",
" (final_conv_0_4): Conv3d(32, 3, kernel_size=(1, 1, 1), stride=(1, 1, 1))\n",
")\n"
]
}
],
"outputs": [],
"source": [
"model = BasicUnetPlusPlus(\n",
" spatial_dims=3,\n",
Expand Down

0 comments on commit 5c06db8

Please sign in to comment.