YuanXue1993 / SegAN

SegAN: Semantic Segmentation with Adversarial Learning
MIT License
182 stars 58 forks source link

why NetC.zero_grad()? #15

Open NdaAzr opened 4 years ago

NdaAzr commented 4 years ago

I am wondering why you used NetC.zero_grad() in train.py, however usually zero_grad() function should set on the optimizer? Could you please explain this. It would be great if there were some more comments in the code. Thank you