Closed qilicun closed 1 year ago
Thanks!
there are two possibilities:
You set the learn_sigma=True, then you want to predict the mean and the variance. Consequently, the number of output channels=2*number of input channels. If your input image has 1 channel, then your unet model has 2 output channels.
If you set learn_sigma=False, then you only predict the mean. Then, the number of output channels equals the number of input channels. If your images have 1 channel, then your unet model has 1 output channel.
Did that help? Let me know if you have further questions.
You set the learn_sigma=True, then you want to predict the mean and the variance. Consequently, the number of output channels=2*number of input channels. If your input image has 1 channel, then your unet model has 2 output channels.
Great! That helps a lot! Thanks again!
One more question. Is this a bug in line 186 and 188 of https://github.com/JuliaWolleb/Diffusion-based-Segmentation/blob/main/guided_diffusion/train_util.py#L188?
self.run_step(batch, cond)
sample = self.run_step(batch, cond)
run_step is executed twice?
Hi Thanks for pointing this out, this is a mistake. You can delete the second line.
Great job!
But I have some trouble when understanding the output channels for unet model. That is 'out_channels=2,#(3 if not learn_sigma else 6),', why set the output to 2 or six channels ? Is there any reference or formula to explain? Thanks a lot