Skip to content

Commit 3a63cff

Browse files
fix copy right error
Signed-off-by: Yiheng Wang <[email protected]>
1 parent 15e2c6b commit 3a63cff

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

generation/image_to_image_translation/tutorial_segmentation_with_ddpm.ipynb

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
{
22
"cells": [
33
{
4-
"cell_type": "code",
5-
"execution_count": null,
4+
"cell_type": "markdown",
65
"metadata": {},
7-
"outputs": [],
86
"source": [
9-
"# Copyright (c) MONAI Consortium\n",
10-
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
11-
"# you may not use this file except in compliance with the License.\n",
12-
"# You may obtain a copy of the License at\n",
13-
"# http://www.apache.org/licenses/LICENSE-2.0\n",
14-
"# Unless required by applicable law or agreed to in writing, software\n",
15-
"# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
16-
"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
17-
"# See the License for the specific language governing permissions and\n",
18-
"# limitations under the License."
7+
"Copyright (c) MONAI Consortium \n",
8+
"Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
9+
"you may not use this file except in compliance with the License. \n",
10+
"You may obtain a copy of the License at \n",
11+
"&nbsp;&nbsp;&nbsp;&nbsp;http://www.apache.org/licenses/LICENSE-2.0 \n",
12+
"Unless required by applicable law or agreed to in writing, software \n",
13+
"distributed under the License is distributed on an \"AS IS\" BASIS, \n",
14+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n",
15+
"See the License for the specific language governing permissions and \n",
16+
"limitations under the License."
1917
]
2018
},
2119
{
@@ -210,7 +208,7 @@
210208
" section=\"training\", # validation\n",
211209
" cache_rate=1.0, # you may need a few Gb of RAM... Set to 0 otherwise\n",
212210
" num_workers=4,\n",
213-
" download=False, # Set download to True if the dataset hasnt been downloaded yet\n",
211+
" download=True, # Set download to True if the dataset hasnt been downloaded yet\n",
214212
" seed=0,\n",
215213
" transform=train_transforms,\n",
216214
")\n",
@@ -612,7 +610,7 @@
612610
"metadata": {},
613611
"outputs": [],
614612
"source": [
615-
"n_epochs = 4000\n",
613+
"max_epochs = 4000\n",
616614
"val_interval = 50\n",
617615
"epoch_loss_list = []\n",
618616
"val_epoch_loss_list = []"
@@ -725,7 +723,7 @@
725723
"scaler = GradScaler()\n",
726724
"total_start = time.time()\n",
727725
"\n",
728-
"for epoch in range(n_epochs):\n",
726+
"for epoch in range(max_epochs):\n",
729727
" model.train()\n",
730728
" epoch_loss = 0\n",
731729
"\n",
@@ -776,9 +774,9 @@
776774
"print(f\"train diffusion completed, total time: {total_time}.\")\n",
777775
"\n",
778776
"plt.title(\"Learning Curves Diffusion Model\", fontsize=20)\n",
779-
"plt.plot(np.linspace(1, n_epochs, n_epochs), epoch_loss_list, color=\"C0\", linewidth=2.0, label=\"Train\")\n",
777+
"plt.plot(np.linspace(1, max_epochs, max_epochs), epoch_loss_list, color=\"C0\", linewidth=2.0, label=\"Train\")\n",
780778
"plt.plot(\n",
781-
" np.linspace(val_interval, n_epochs, int(n_epochs / val_interval)),\n",
779+
" np.linspace(val_interval, max_epochs, int(max_epochs / val_interval)),\n",
782780
" val_epoch_loss_list,\n",
783781
" color=\"C1\",\n",
784782
" linewidth=2.0,\n",

0 commit comments

Comments
 (0)