Hello,
In the function forward of the class UNet, the line x2 = self.dc2(x2) does not make sense for me it shouldn't be x3 = ... ?
thanks..
Hey,
not really, you're trying to save x2 features in order to reuse them further in the network, namely you'll do something like x = torch.cat([x2, x], dim=1). For example, the same thing happens to x3 and x4. When you have following lines:
x1 = self.dc1(x)
x2 = self.mp1(x1)
x2 = self.dc2(x2)
After x2 = self.mp1(x1), x2 is x1 features with reduced resolution (because of MaxPooling), therefore firstly they should be processed with convolutions (=> x2 = self.dc2(x2)).
Hope this helps!
Follow the pulses of EPFL on social networks
© 2023 EPFL, all rights reserved