Closed Ale0311 closed 3 years ago
Hey, let me see what I can do:
self.nl = nn.Softmax2d()
could probably be erased without effect. The cross entropy loss in pytorch actually expects the logits which are then automatically processed by a softmax function. Probably I did forget that in between and forgot to delete this line.--model-depth-resolutions
whose standard value is 4. The for loop is therefore needed, as the depth is processed at four different resoutions of the decoder. Each resolution needs an output convolution.I hope this helps!
Thank you very much for your explanations! Everything makes sense now. 😊
Hello!
I have some curiosities about the decoder and I hope that you can provide some explanations for me.
So here are the 2 classes for the depth and segmentation decoders.
Here is the MultiRes class:
These are my questions:
Where is the self.nl = nn.Softmax2d() used in the segmentation decoder? I checked the multires class and while for the depth the nonliniarity is given as an argument here:
super().__init__(dec_chs, out_chs, nn.Sigmoid())
I couldn't find where the softmax function is used for the segmentation part: ' super().init(dec_chs, out_chs)'What does the multires class do exactly? This is my understanding so far, please correct me if I'm wrong: they take the last element from all the 6 tuples that are in a batch and for the segmentation class the output will have 20 channels because there are 20 segmentation classes, while the depth class will have only one channel because the depth map has a HxW dimension.
As far as these lines of code from MultiRes class are concerned: why is there a for? Because from this line of code
self.multires = networks.MultiResDepth(self.decoder.chs_x()[-resolutions:])
, where resolutions is 1, I understand that the MultiResDepth only takes one value as a parameter, the value '16', which is the number of output channels for the decoder (the last layer).Thank you in advance!