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
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -588,7 +588,11 @@ def forward(self, x):
588
588
# <h4>Task 6: U-Net Implementation</h4>
589
589
# <p>Now we will implement our U-Net! We have written some of it for you - follow the steps below to fill in the missing parts.</p>
590
590
# <ol>
591
-
# <li>Declare a list of encoder (left) and decoder (right) ConvBlocks. Carefully consider the input and output feature maps for each ConvPass!</li>
591
+
# <li>Declare a list of encoder (left) and decoder (right) ConvBlocks. Carefully consider the input and output feature maps for each ConvPass!
592
+
# <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
+
# </ul>
595
+
# </li>
592
596
# <li>Declare an Upsample, Downsample, CropAndConcat, and OutputConv block.</li>
593
597
# <li>Implement the <code style="color: black">forward</code> function, applying the modules you declared above in the proper order.</li>
594
598
# </ol>
@@ -661,7 +665,8 @@ def __init__(
661
665
# TASK 6.1A: Initialize list here
662
666
# Loop through each level of the encoder from top (level=0) to bottom (level=self.depth - 1)
663
667
forlevelinrange(self.depth):
664
-
# conv =
668
+
input_features,output_features= ...
669
+
conv= ...
665
670
# Adding conv module to the list
666
671
self.left_convs.append(conv)
667
672
# right convolutional passes
@@ -670,7 +675,8 @@ def __init__(
670
675
# Loop through each level of the decoder from top (level=0) to one above bottom (level=self.depth - 2)
671
676
forlevelinrange(self.depth-1):
672
677
# Initialize conv module
673
-
# conv =
678
+
input_features,output_features= ...
679
+
conv= ...
674
680
# Adding conv module to the list
675
681
self.right_convs.append(conv)
676
682
@@ -693,6 +699,19 @@ def forward(self, x):
693
699
# TASK 6.3D: Apply the final convolution and return the output
0 commit comments