lhoyer / DAFormer

[CVPR22] Official Implementation of DAFormer: Improving Network Architectures and Training Strategies for Domain-Adaptive Semantic Segmentation
Other
470 stars 93 forks source link

where's the process of ema updating? #29

Closed sunrainyg closed 2 years ago

sunrainyg commented 2 years ago

Hello, thanks to your excellent work! I want to know where's the process of ema updating? I found it is at the begging of the function "forward_train" in dacs.py. But I wonder does it means every time I call the "forward_train" , a new model will be created and ema updating will work?

lhoyer commented 2 years ago

The ema model is initialized during the first iteration: https://github.com/lhoyer/DAFormer/blob/8d6e710700ff5e6a053c77bfe384ba44d4672cbe/mmseg/models/uda/dacs.py#L206

The ema model is updated at every iteration except the first one: https://github.com/lhoyer/DAFormer/blob/8d6e710700ff5e6a053c77bfe384ba44d4672cbe/mmseg/models/uda/dacs.py#L210

sunrainyg commented 2 years ago

thanks!