You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solution.py
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,8 @@ def forward(self, x):
283
283
# <ol>
284
284
# <li>Declare the submodules you want to use in the <code style="color: black">__init__</code> function. Because you will always be calling four submodules in sequence (<a href=https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html#torch.nn.Conv2d>torch.nn.Conv2d</a>, <a href=https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html#torch.nn.ReLU>torch.nn.ReLU</a>, Conv2d, ReLU), you can use <a href=https://pytorch.org/docs/stable/generated/torch.nn.Sequential.html>torch.nn.Sequential</a> to hold the convolutions and ReLUs.</li>
285
285
# <li>Call the modules in the forward function. If you used <code style="color: black">torch.nn.Sequential</code> in step 1, you only need to call the Sequential module, but if not, you can call the Conv2d and ReLU Modules explicitly.</li>
286
-
# </ol>
286
+
# <li>Visualize the output and maybe rerun the cell to see how the output changes. Can you explain what you see?</li>
287
+
# </ol>
287
288
# </div>
288
289
#
289
290
# If you get stuck, refer back to the <a href=https://pytorch.org/docs/stable/notes/modules.html>Module</a> documentation for hints and examples of how to define a PyTorch Module.
@@ -590,7 +591,7 @@ def forward(self, x):
590
591
# <ol>
591
592
# <li>Declare a list of encoder (left) and decoder (right) ConvBlocks. Carefully consider the input and output feature maps for each ConvPass!
592
593
# <ul>
593
-
# <li><strong>Hint:</strong> Consider implementing helper functions to calculate the encoder and decoder blocks separately - this will make your code more readable and easier to debug.</li>
594
+
# <li><strong>Hint:</strong> We provided scaffolding to implement helper functions to calculate the encoder and decoder blocks separately - this will make your code more readable. But feel free to ignore them if you find it confusing.</li>
594
595
# </ul>
595
596
# </li>
596
597
# <li>Declare an Upsample, Downsample, CropAndConcat, and OutputConv block.</li>
# Congratulations! You trained your first UNet that you implemented all by yourself!
1247
1264
#
1248
-
# We will keep using this U-Net throughout the rest of the exercises. Whenever you see an import like `import dlmbl-unet` or
1249
-
# `from dlmbl-unet import UNet` it will be importing from [this repository](https://github.com/dlmbl/dlmbl-unet) which contains the solution to this notebook as a package (including the bonus exercises so don't peek just yet if you wanna solve the bonus too).
1265
+
# We will keep using this U-Net throughout the rest of the exercises. Whenever you see an import like `import dlmbl_unet` or
1266
+
# `from dlmbl_unet import UNet` it will be importing from [this repository](https://github.com/dlmbl/dlmbl-unet) which contains the solution to this notebook as a package (including the bonus exercises so don't peek just yet if you wanna solve the bonus too).
0 commit comments