knazeri / edge-connect

EdgeConnect: Structure Guided Image Inpainting using Edge Prediction, ICCV 2019 https://arxiv.org/abs/1901.00212
http://openaccess.thecvf.com/content_ICCVW_2019/html/AIM/Nazeri_EdgeConnect_Structure_Guided_Image_Inpainting_using_Edge_Prediction_ICCVW_2019_paper.html
Other
2.5k stars 530 forks source link

A small problem about the code in 'edge_connect.py' #111

Closed XiaoqiangZhou closed 4 years ago

XiaoqiangZhou commented 5 years ago

Hello, I'm recently reading you codes, which are written in a good manner.

But I'm confused with the following code in edge_connect.py line 99 and line 100: self.edge_model.train() self.inpaint_model.train() There is no train() attribute inclass EdgeModel and class InpaintingModel. Could you please explain what do these two codes mean? Thanks!

rachs commented 4 years ago

Hi I've come across the same issue. Were you able to solve it?

hedjm commented 4 years ago

Hi, these are calls for internal functions in the nn.Module class (the models are extending it), it sets the mode as training or validation (issues when using BatchNorm and Dropout).

XiaoqiangZhou commented 4 years ago

@hedjm Thanks for your reply. I have got it. And I will close this issue.