Skip to content

Commit 8bd8272

Browse files
committed
ec 10.B
Update text2image.ipynb Update cddpm_mnist.ipynb Update ddpm_mnist.ipynb Update text2image.ipynb Update text2image.ipynb Update cddpm_mnist.ipynb Update text2image.ipynb Update text2image.ipynb
1 parent 1d8611d commit 8bd8272

File tree

3 files changed

+2514
-419
lines changed

3 files changed

+2514
-419
lines changed

Ch10_Diffusion/ec10_1_ddpm_mnist/ddpm_mnist.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@
515515
},
516516
{
517517
"cell_type": "code",
518-
"execution_count": 19,
518+
"execution_count": null,
519519
"metadata": {},
520520
"outputs": [
521521
{
@@ -1212,7 +1212,7 @@
12121212
" train_loss.append(running_loss / len(loader))\n",
12131213
" end_time = time.time()\n",
12141214
"\n",
1215-
" print(f\"-\" * 10 + \"\\n\" + f\"Epoch {epoch + 1}/{epochs} : \"\n",
1215+
" print(\"-\" * 10 + \"\\n\" + f\"Epoch {epoch + 1}/{epochs} : \"\n",
12161216
" f\"Train loss: {train_loss[-1]:.4f}, \"\n",
12171217
" f\"Time taken: {timedelta(seconds=end_time - start_time)}\")\n",
12181218
"\n",

Ch10_Diffusion/ec10_A_cddpm_mnist/cddpm_mnist.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
},
133133
{
134134
"cell_type": "code",
135-
"execution_count": 4,
135+
"execution_count": null,
136136
"metadata": {},
137137
"outputs": [
138138
{
@@ -148,8 +148,8 @@
148148
" \"\"\"Select device where to perform the computations.\"\"\"\n",
149149
" if torch.cuda.is_available():\n",
150150
" return torch.device(\"cuda:0\")\n",
151-
" ### elif torch.backends.mps.is_available():\n",
152-
" ### return torch.device(\"mps\")\n",
151+
" elif torch.backends.mps.is_available():\n",
152+
" return torch.device(\"mps\")\n",
153153
" else:\n",
154154
" return torch.device(\"cpu\")\n",
155155
"\n",
@@ -523,7 +523,7 @@
523523
},
524524
{
525525
"cell_type": "code",
526-
"execution_count": 18,
526+
"execution_count": null,
527527
"metadata": {},
528528
"outputs": [
529529
{
@@ -1223,7 +1223,7 @@
12231223
" train_loss.append(running_loss / len(loader))\n",
12241224
" end_time = time.time()\n",
12251225
"\n",
1226-
" print(f\"-\" * 10 + \"\\n\" + f\"Epoch {epoch + 1}/{epochs} : \"\n",
1226+
" print(\"-\" * 10 + \"\\n\" + f\"Epoch {epoch + 1}/{epochs} : \"\n",
12271227
" f\"Train loss: {train_loss[-1]:.4f}, \"\n",
12281228
" f\"Time taken: {timedelta(seconds=end_time - start_time)}\")\n",
12291229
"\n",

0 commit comments

Comments
 (0)