pytorch-unet icon indicating copy to clipboard operation
pytorch-unet copied to clipboard

meaning of "Depth" argument

Open I-CANT-CODE opened this issue 5 years ago • 1 comments

I just have a clarification question, when I specify a depth of 3 for the neural network, from observing the code I think that means that this network will have 3 down convolutions and 3 up convolutions, for a total of 5 U-Net blocks, rather than 3 UNET blocks total. Is this correct thinking?

I-CANT-CODE avatar May 07 '20 06:05 I-CANT-CODE

I realize this question is over a year old but it may help others who are learning.

Please have a look at the original U-Net architecture below. If depth = 5, then the original U-Net is reproduced. The code loops over depthand makes 5 down-blocks. Then it loops over depth-1 to make 4 up-blocks, for a total of 9 blocks. If you use depth = 3, I believe you are correct thinking that the result will be 3 down-blocks + 2 up-blocks, for a total of 5. img Cheers.

clberube avatar Feb 17 '21 13:02 clberube