costapt / vess2ret

A Keras implementation of pix2pix code adapted to generate retinal images from vessel networks.
MIT License
94 stars 42 forks source link

get_layer('d') = False #7

Open 32nguyen opened 7 years ago

32nguyen commented 7 years ago

Hi, Very interesting work. I would like to have a question about freezing the D model. By tracking your code, I try to find where I set D model back on by get_layer('d') = True to update the weights. But I could not find it.

costapt commented 7 years ago

Hi,

Thanks!

I freeze the discriminator on line 659 of the models.py, but only on the pix2pix model. This means that, if you train the model d, its weights will be updated. Not sure if this answers your question.

32nguyen commented 7 years ago

Thank you for quick reply,

Yes, it makes me realize that I may understand keras implementation incorrectly. Let say that your created D model with name 'd', the in pix2pix model you import it, with name 'd' as I guess since you recall get_layer('d') = False. Then when you freeze the D model in pix2pix, I do not know if all layers 'd' in whole implementation is freeze or just in pix2pix. From you answer, I think it is only in pix2pix model. Hope that my thought is right.

Thanks,

costapt commented 7 years ago

That's it. D is only frozen inside the pix2pix model. The model d can still be trained!